pyActigraphy.filters.FiltersMixin.create_inactivity_mask¶
- FiltersMixin.create_inactivity_mask(duration)[source]¶
Create a mask for inactivity (count equal to zero) periods.
This mask has the same length as its underlying data and can be used to offuscate inactive periods where the actimeter has most likely been removed. Warning: use a sufficiently long duration in order not to mask sleep periods. A minimal duration corresponding to two hours seems reasonable.
- Parameters
duration (int or str) – Minimal number of consecutive zeroes for an inactive period. Time offset strings (ex: ‘90min’) can also be used.