no data means no good data
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user