mne_denoise.dss.segmentation.FixedWindowSegmenter#

class mne_denoise.dss.segmentation.FixedWindowSegmenter(sfreq: float, window_len: float = 30.0)[source]#

Segment data into fixed-length windows.

Parameters:
sfreqfloat

Sampling frequency in Hz.

window_lenfloat, default=30.0

Window length in seconds.

segment(data: ndarray) list[tuple[int, int]][source]#

Return fixed (start_sample, end_sample) windows.

Parameters:
datandarray, shape (n_channels, n_times)

Channel-first data.

Returns:
list of tuple of int

Half-open sample intervals.

Notes

The final window is merged into the previous window when it is shorter than half the requested length.