Closed jaymtee closed 10 months ago
this isn't documented as far as I know, but you need to call flash_stats
on ds
before attempting to filter flashes.
for most properties, this raises an exception as filtering an array of nans isn't possible. However, because flash_event_count
is a uint64 array, the nan fill value is 4294967295, which suppresses the exception.
I've opened a PR #26 to add an explicit check and exception if this is the case.
example to fix:
from pyxlma.lmalib.flash.properties import flash_stats, filter_flashes
ds = flash_stats(ds)
ds = filter_flashes(ds, flash_event_count=(min_events_per_flash, None))
changing min_events_per_flash below has no effect on flash_stats. It always returns the same number of lfashes
ds = filter_flashes(ds, flash_event_count=(min_events_per_flash, None))