Flexibility of the Task Class
The real strength of the Task class is its flexibility.Because each step works directly on an MNE object (
Raw
, Epochs
, or Evoked
), you can:
- Insert custom functions for specialized preprocessing.
- Branch into different processing paths depending on your experiment.
- Call external libraries (even MATLAB functions via
matlab.engine
) when needed. - Return to the main pipeline as long as you hand back a valid MNE object.
Example: Branching for Custom Epoching
Why This Matters
- Customizable: Tailor preprocessing to your study (e.g., resting state, oddball, Go/No-Go).
- Branchable: Choose different paths for different datasets in the same task.
- Extensible: Insert ML models, advanced artifact rejection, or external tool calls.
- Future-Proof: As long as the function returns an MNE object, the pipeline can continue without breaking.
Think of the Task class as the backbone of your preprocessing recipe.
You can keep it simple or expand it into a fully customized pipeline — the framework is designed to handle both.
You can keep it simple or expand it into a fully customized pipeline — the framework is designed to handle both.