Skip to content
Snippets Groups Projects
Commit 2a71d022 authored by tomrink's avatar tomrink
Browse files

minor

parent 54efab8e
No related branches found
No related tags found
No related merge requests found
......@@ -142,6 +142,15 @@ def get_breaks(t, threshold):
return idxs
# return indexes of ts where value is within ts[i] - threshold < value < ts[i] + threshold
def get_indexes_within_threshold(ts, value, threshold):
idx_s = []
for k, v in enumerate(ts):
if (ts[k] - threshold) < value < (ts[k] + threshold):
idx_s.append(k)
return idx_s
def pressure_to_altitude(pres, temp, prof_pres, prof_temp, sfc_pres=None, sfc_temp=None, sfc_elev=0):
if not np.all(np.diff(prof_pres) > 0):
raise GenericException("target pressure profile must be monotonic increasing")
......
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