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#
Mixin class providing basic signal processing steps for autoclean tasks. |
|
Mixin class providing channel operations functionality for EEG data. |
|
Mixin class providing artifact detection and rejection functionality for EEG data. |
|
Mixin class providing functionality to clean epochs using AutoReject. |
|
Mixin class providing channel operations functionality for EEG data. |
|
Mixin class providing event ID based epochs creation functionality for EEG data. |
|
Mixin class providing regular (fixed-length) epochs creation functionality for EEG data. |
|
Mixin class providing functionality for outlier detection in epochs. |
|
Mixin class providing functionality to clean epochs based on Global Field Power (GFP). |
|
Mixin for ICA processing. |
|
Mixin for segment rejection. |
ReportingMixin#
Mixin providing visualization methods for EEG data. |
|
Mixin providing ICA reporting functionality for EEG data. |