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 preprocessing stage that loads the input preprocessed EGG Epochs files and convert them to the MNE fif format.

  • the EEG source imaging stage that takes care of all the steps necessary to extract the ROI time courses.

  • the EEG connectome stage that computes different frequency- and time-frequency-domain connectivity measures from the extracted ROI time courses.

check_config()[source]
check_input()[source]

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

Returns

valid_inputs – True if inputs are available

Return type

bool

create_datagrabber_node(name='eeg_datasource', base_directory=None, debug=False)[source]

Create the appropriate Nipype BIDSDataGrabber node depending on the configuration of the different EEG pipeline stages.

Parameters
  • name (str) – Name of the datagrabber node

  • base_directory (str) – Path to the directory that store the check_input node output

  • debug (bool) – Print extra debugging messages if True

Returns

datasource – Output Nipype Node with BIDSDataGrabber interface

Return type

Output Nipype BIDSDataGrabber Node

create_datasinker_node(output_directory)[source]

Create the appropriate Nipype DataSink node depending on EEG task_label and parcellation_scheme

Parameters

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

Returns

sinker – Output Nipype Node with DataSink interface

Return type

Output Nipype DataSink 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

get_nipype_eeg_pipeline_subject_dir()[source]

Return the path to Nipype eeg_pipeline folder of a given subject / session.

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 = '20221025_1349'
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