- braindecode.datautil.create_fixed_length_windows(concat_ds, start_offset_samples, stop_offset_samples, window_size_samples, window_stride_samples, drop_last_window, mapping=None, preload=False, drop_bad_windows=True, picks=None, reject=None, flat=None, on_missing='error', n_jobs=1)¶
Windower that creates sliding windows.
- concat_ds: ConcatDataset
A concat of base datasets each holding raw and descpription.
- start_offset_samples: int
Start offset from beginning of recording in samples.
- stop_offset_samples: int | None
Stop offset from beginning of recording in samples. If None, set to be the end of the recording.
- window_size_samples: int
- window_stride_samples: int
Stride between windows.
- drop_last_window: bool
Whether or not have a last overlapping window, when windows do not equally divide the continuous signal.
- mapping: dict(str: int)
Mapping from event description to target value.
- preload: bool
If True, preload the data of the Epochs objects.
- drop_bad_windows: bool
If True, call .drop_bad() on the resulting mne.Epochs object. This step allows identifying e.g., windows that fall outside of the continuous recording. It is suggested to run this step here as otherwise the BaseConcatDataset has to be updated as well.
- picks: str | list | slice | None
Channels to include. If None, all available channels are used. See mne.Epochs.
- reject: dict | None
Epoch rejection parameters based on peak-to-peak amplitude. If None, no rejection is done based on peak-to-peak amplitude. See mne.Epochs.
- flat: dict | None
Epoch rejection parameters based on flatness of signals. If None, no rejection based on flatness is done. See mne.Epochs.
- on_missing: str
What to do if one or several event ids are not found in the recording. Valid keys are ‘error’ | ‘warning’ | ‘ignore’. See mne.Epochs.
- n_jobs: int
Number of jobs to use to parallelize the windowing.
- windows_ds: WindowsDataset
Dataset containing the extracted windows.