Skip to content
Snippets Groups Projects
Commit 65a30838 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent f5eeb686
No related merge requests found
......@@ -144,12 +144,15 @@ def get_breaks(t, threshold):
# return indexes of ts where value is within ts[i] - threshold < value < ts[i] + threshold
# eventually, if necessary, fully vectorize (numpy) this is possible
# threshold units: seconds
def get_indexes_within_threshold(ts, value, threshold):
idx_s = []
t_s = []
for k, v in enumerate(ts):
if (ts[k] - threshold) < value < (ts[k] + threshold):
if (ts[k] - threshold) <= value <= (ts[k] + threshold):
idx_s.append(k)
return idx_s
t_s.append(v)
return idx_s, t_s
def pressure_to_altitude(pres, temp, prof_pres, prof_temp, sfc_pres=None, sfc_temp=None, sfc_elev=0):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment