Skip to content

Instantly share code, notes, and snippets.

View gcasey's full-sized avatar

Casey Goodlett gcasey

  • Google
  • Seattle, WA
View GitHub Profile
@gcasey
gcasey / gist:576af9225ae5f85e6ae1
Created February 10, 2015 23:22
set timesteps for port
def setOutputTimesteps ( algorithm , timesteps ):
"helper routine to set timestep information"
executive = algorithm . GetExecutive ()
outInfo = executive . GetOutputInformation (0)
outInfo.Remove ( executive.TIME_STEPS () )
for timestep in timesteps :
outInfo . Append ( executive . TIME_STEPS () , timestep )
outInfo . Remove ( executive . TIME_RANGE () )
outInfo . Append ( executive . TIME_RANGE () , timesteps [0])
@gcasey
gcasey / lasreader.pxd
Last active June 23, 2020 08:34
Reading LAS file efficiently into numpy using cython
#%%cython -I/usr/local/include -L/usr/local/lib -llas_c
# Created by Casey Goodlett
cimport cython
import numpy as np
cimport numpy as np
import liblas
DTYPE = np.float64
ctypedef np.float64_t DTYPE_t