no data means no good data

This commit is contained in:
2020-07-02 12:30:54 +02:00
parent 06eb8bae7b
commit d4515028ef
+3
View File
@@ -15,6 +15,9 @@ def within_fraction(data, vmin, vmax):
ntotal = len(data)
ngood = sum(good)
if not ntotal:
return 0
fraction = ngood / ntotal
return fraction