Skip to content
Snippets Groups Projects
Commit 9b6b4f7e authored by tomrink's avatar tomrink
Browse files

snapshot...

parent ea1ca5e6
No related branches found
No related tags found
No related merge requests found
...@@ -157,7 +157,7 @@ def value_to_index(nda, value): ...@@ -157,7 +157,7 @@ def value_to_index(nda, value):
def is_night(solzen, test_angle=80.0, threshold=0.10): def is_night(solzen, test_angle=80.0, threshold=0.10):
solzen = solzen.flatten() solzen = solzen.flatten()
solzen = solzen[np.invert(np.isnan(solzen))] solzen = solzen[np.invert(np.isnan(solzen))]
if (np.sum(solzen > test_angle) / len(solzen)) > threshold: if len(solzen) == 0 or (np.sum(solzen > test_angle) / len(solzen)) > threshold:
return True return True
else: else:
return False 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