eventid_epochs.EventIDEpochsMixin#

class autoclean.mixins.signal_processing.eventid_epochs.EventIDEpochsMixin[source]#

Mixin class providing event ID based epochs creation functionality for EEG data.

create_eventid_epochs(data=None, event_id=None, tmin=-0.5, tmax=2, baseline=(None, 0), volt_threshold=None, reject_by_annotation=False, keep_all_epochs=False, stage_name='post_epochs')[source]#

Create epochs based on event IDs from raw data.

Parameters:
datamne.io.Raw, Optional

The raw data to create epochs from. If None, uses self.raw.

event_iddict, Optional

Dictionary mapping event names to event IDs (e.g., {“target”: 1, “standard”: 2}).

tminfloat, Optional

Start time of the epoch relative to the event in seconds, by default -0.5.

tmaxfloat, Optional

End time of the epoch relative to the event in seconds, by default 2.

baselinetuple, Optional

Baseline correction (tuple of start, end), by default (None, 0).

volt_thresholddict, Optional

Dictionary of channel types and thresholds for rejection, by default None.

reject_by_annotationbool, Optional

Whether to reject epochs by annotation, by default False.

keep_all_epochsbool, Optional

If True, no epochs will be dropped - bad epochs will only be marked in metadata, by default False.

stage_namestr, Optional

Name for saving and metadata, by default “post_epochs”.

Returns:
epochs_cleaninstance of mne.Epochs | None

The created epochs or None if epoching is disabled.

Notes

This method creates epochs centered around specific event IDs in the raw data. It is useful for event-related potential (ERP) analysis where you want to extract segments of data time-locked to specific events.