pynapple.core.interval_set.IntervalSet.split#
- IntervalSet.split(interval_size, time_units='s')[source]#
Split IntervalSet to a new IntervalSet with each interval being of size interval_size.
Used mostly for chunking very large dataset or looping throught multiple epoch of same duration.
This function skips the epochs that are shorter than interval_size.
Note that intervals are strictly non-overlapping in pynapple. One microsecond is removed from contiguous intervals.
- Parameters:
interval_size (Number) – Description
time_units (str, optional) – time units for the interval_size (‘us’, ‘ms’, ‘s’ [default])
- Returns:
New IntervalSet with equal sized intervals
- Return type:
- Raises:
IOError – If interval_size is not a Number or is below 0 If time_units is not a string