Skip to content
Snippets Groups Projects
Commit 79fa6500 authored by tomrink's avatar tomrink
Browse files

snapshot...

parent 03794e57
No related branches found
No related tags found
No related merge requests found
...@@ -150,4 +150,14 @@ def minimize_quadratic(xa, xb, xc, ya, yb, yc): ...@@ -150,4 +150,14 @@ def minimize_quadratic(xa, xb, xc, ya, yb, yc):
def value_to_index(nda, value): def value_to_index(nda, value):
diff = np.abs(nda - value) diff = np.abs(nda - value)
idx = np.argmin(diff) idx = np.argmin(diff)
return idx return idx
\ No newline at end of file
# array solzen must be degrees, missing values must NaN
def is_night(solzen, threshold):
solzen = solzen.flatten()
solzen = solzen[np.invert(np.isnan(solzen))]
if np.max(solzen) > threshold:
return True
else:
return False
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