regular_epochs.RegularEpochsMixin#
- class autoclean.mixins.signal_processing.regular_epochs.RegularEpochsMixin[source]#
Mixin class providing regular (fixed-length) epochs creation functionality for EEG data.
- create_regular_epochs(data=None, tmin=-1, tmax=1, baseline=None, volt_threshold=None, stage_name='post_epochs', reject_by_annotation=False, export=False)[source]#
Create regular fixed-length epochs from raw data.
- Parameters:
- data
mne.io.Raw
,Optional
The raw data to create epochs from. If None, uses self.raw.
- tmin
float
,Optional
The start time of the epoch in seconds. Default is -1.
- tmax
float
,Optional
The end time of the epoch in seconds. Default is 1.
- baseline
tuple
offloat
,Optional
The time interval to apply baseline correction. Default is None.
- volt_threshold
dict
,Optional
Dictionary of channel types and thresholds for rejection, by default None.
- stage_name
str
,Optional
Name for saving and metadata tracking. Default is “post_epochs”.
- reject_by_annotationbool,
Optional
Whether to automatically reject epochs that overlap with bad annotations, or just mark them in the metadata for later processing. Default is False.
- exportbool,
Optional
If True, exports the processed epochs to the stage directory. Default is False.
- data
- Returns:
- epochs_clean:
mne.Epochs
The created epochs object with bad epochs marked (and dropped if reject_by_annotation=True)
- epochs_clean:
See also
create_eventid_epochs
For creating epochs based on specific event markers.
Notes
If reject_by_annotation is False, an intermediate file with bad epochs marked but not dropped is saved.
The epoching parameters can be customized through the configuration file (autoclean_config.yaml) under the “epoch_settings” section. If enabled, the configuration values will override the default parameters.