cmp.pipelines.functional.eeg module

EEG pipeline Class definition.

class cmp.pipelines.functional.eeg.EEGPipeline(project_info)[source]

Bases: cmp.pipelines.common.Pipeline

Class that extends a Pipeline and represents the processing pipeline for EEG.

It is composed of:
  • the EEG preparer stage that …

  • the EEG loader stage that …

  • the EEG inverse solution stage that …

check_config()[source]

Old method that was checking custom settings (obsolete).

check_input(layout, gui=True)[source]

Check if input of the eeg pipeline are available (Not available yet).

Parameters
  • layout (bids.BIDSLayout) – Instance of BIDSLayout

  • gui (traits.Bool) – Boolean used to display different messages but not really meaningful anymore since the GUI components have been migrated to cmp.bidsappmanager

Returns

valid_inputs – True if inputs are available

Return type

traits.Bool

create_datagrabber_node(**kwargs)[source]

Create the appropriate Nipype DataGrabber node depending on the parcellation_scheme

Parameters
  • base_directory (Directory) – Main CMP output directory of a subject e.g. /output_dir/cmp/sub-XX/(ses-YY)

  • bids_atlas_label (string) – Parcellation atlas label

Returns

datasource – Output Nipype Node with DataGrabber interface

Return type

Output Nipype DataGrabber Node

create_pipeline_flow(cmp_deriv_subject_directory, nipype_deriv_subject_directory)[source]

Create the workflow of the EEG pipeline.

Parameters
  • cmp_deriv_subject_directory (Directory) – Main CMP output directory of a subject e.g. /output_dir/cmp/sub-XX/(ses-YY)

  • nipype_deriv_subject_directory (Directory) – Intermediate Nipype output directory of a subject e.g. /output_dir/nipype/sub-XX/(ses-YY)

Returns

eeg_flow – An instance of nipype.pipeline.engine.Workflow

Return type

nipype.pipeline.engine.Workflow

global_conf = <cmp.pipelines.functional.eeg.GlobalConfig object>
init_subject_derivatives_dirs()[source]

Return the paths to Nipype and CMP derivatives folders of a given subject / session.

Notes

self.subject is updated to “sub-<participant_label>_ses-<session_label>” when subject has multiple sessions.

input_folders = ['anat', 'eeg']
now = '20220221_2042'
ordered_stage_list = ['EEGPreparer', 'EEGLoader', 'InverseSolution']
process()[source]

Executes the anatomical pipeline workflow and returns True if successful.

class cmp.pipelines.functional.eeg.GlobalConfig[source]

Bases: traits.has_traits.HasTraits

Global EEG pipeline configurations.

process_type

Processing pipeline type

Type

‘EEG’

subjects

List of subjects ID (in the form sub-XX)

Type

traits.List

subject

Subject to be processed (in the form sub-XX)

Type

traits.Str

subject_session

Subject session to be processed (in the form ses-YY)

Type

traits.Str