borsar.utils.valid_windows

borsar.utils.valid_windows(raw, tmin=None, tmax=None, winlen=2.0, step=1.0)[source]

Test which moving windows overlap with annotations.

Parameters:
raw : mne.Raw

Data to use.

tmin : flot | None

Start time for the moving windows. Defaults to None which means start of the raw data.

tmax : flot | None

End time for the moving windows. Defaults to None which means end of the raw data.

winlen : float

Window length in seconds. Defaults to 2.

step : float

Window step in seconds. Defaults to 1.

Returns:
valid : boolean numpy array

Whether the moving widnows overlap with annotations. Consecutive values inform whether consecutive windows overlap with any annotation.