Mixins (autoclean.mixins)#

This section covers the mixin classes that provide reusable functionality for EEG data processing in AutoClean. Mixins are the preferred way to add functions to your tasks in autoclean and act as a replacement for step functions. They are designed as classes that are added to the base task class so that functions may be natively accessible from any task implementation. This simplifies the process of creating new tasks as you do not need to worry about manually importing each processing function.

Mixins should be designed to be used in task implementations as such:

from autoclean.core.task import Task
# Mixins are imported inside the Task base class

class MyTask(Task):
    def run(self):
        # Calling a mixin function
        self.create_regular_epochs()  # Modifies self.epochs

Note: Most mixins may have a return value or a data parameter but are designed to use and update the task object and its data attributes in place. If you decide to use both mixin functions and non-mixin functions, be careful to update your task’s data attributes accordingly.

Example:

# Since the self.raw attribute has been updated, we can use the mixin function
self.create_regular_epochs()  # Modifies self.epochs

Available Mixins#

SignalProcessingMixin#

basic_steps.BasicStepsMixin

Mixin class providing basic signal processing steps for autoclean tasks.

channels.ChannelsMixin

Mixin class providing channel operations functionality for EEG data.

artifacts.ArtifactsMixin

Mixin class providing artifact detection and rejection functionality for EEG data.

autoreject_epochs.AutoRejectEpochsMixin

Mixin class providing functionality to clean epochs using AutoReject.

channels.ChannelsMixin

Mixin class providing channel operations functionality for EEG data.

eventid_epochs.EventIDEpochsMixin

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

regular_epochs.RegularEpochsMixin

Mixin class providing regular (fixed-length) epochs creation functionality for EEG data.

outlier_detection.OutlierDetectionMixin

Mixin class providing functionality for outlier detection in epochs.

gfp_clean_epochs.GFPCleanEpochsMixin

Mixin class providing functionality to clean epochs based on Global Field Power (GFP).

ica.IcaMixin

Mixin for ICA processing.

segment_rejection.SegmentRejectionMixin

Mixin for segment rejection.

ReportingMixin#

visualization.VisualizationMixin

Mixin providing visualization methods for EEG data.

ica.ICAReportingMixin

Mixin providing ICA reporting functionality for EEG data.