cmp.stages.eeg.esi module
Definition of config and stage classes for computing brain parcellation.
- class cmp.stages.eeg.esi.EEGSourceImagingConfig[source]
Bases:
traits.has_traits.HasTraits
Class used to store configuration parameters of a
EEGSourceImagingStage
instance.- task_label
Task label (e.g.
_task-<label>_
)- Type
Str
- esi_tool
Select the tool used for EEG source imaging (inverse solution)
- Type
Enum
- mne_apply_electrode_transform
If
True
, apply the transform specified below to electrode positions- Type
Bool
- mne_electrode_transform_file
Instance of
CustomEEGCartoolMNETransformBIDSFile
that describes the input BIDS-formatted MNE transform file in fif format
- cartool_spi_file
Instance of
CustomEEGCartoolSpiBIDSFile
that describes the input BIDS-formatted EEG Solution Points Irregularly spaced file created by Cartool
- cartool_invsol_file
Instance of
CustomEEGCartoolInvSolBIDSFile
that describes the input BIDS-formatted EEG Inverse Solution file created by Cartool
- cartool_esi_method
Cartool Source Imaging method
- Type
Enum([‘LAURA’, ‘LORETA’])
- parcellation_scheme
Parcellation used to create the ROI source time-series
- Type
Enum([“NativeFreesurfer”, “Lausanne2018”])
- lausanne2018_parcellation_res
Resolution of the parcellation if Lausanne2018 parcellation scheme is used
- Type
Enum([“scale1”, “scale2”, “scale3”, “scale4”, “scale5”])
- cartool_esi_lamb
Regularization weight of inverse solutions computed with Cartool (Default: 6)
- Type
Float
- cartool_svd_toi_begin
Start TOI for SVD projection (Default: 0.0)
- Type
Float
- cartool_svd_toi_end
End TOI for SVD projection (Default: 0.25)
- Type
Float
- mne_esi_method
MNE Source Imaging method
- Type
Enum([“sLORETA”, “eLORETA”, “MNE”, “dSPM”])
- mne_esi_method_snr
SNR value such as the regularization weight lambda2 of MNE ESI method’ is set to
1.0 / mne_esi_method_snr ** 2
(Default: 3.0)- Type
Float
- class cmp.stages.eeg.esi.EEGSourceImagingStage(subject, session, bids_dir, output_dir)[source]
Bases:
cmp.stages.common.Stage
Class that represents the reconstruction of the inverse solutions stage of a
EEGPipeline
.If MNE is selected for ESI reconstruction, this stage consists of five processing interfaces:
CreateBem
: Create the Boundary Element Model that consists of surfaces obtained with Freesurfer.CreateSrc
: Create a bilateral hemisphere surface-based source space file with subsampling.CreateFwd
: Create the forward solution (leadfield) from the BEM and the source space.CreateCov
: Create the noise covariance matrix from the data.MNEInverseSolutionROI
: Create and apply the actual inverse operator to generate the ROI time courses.
If you decide to use ESI reconstruction outputs precomputed with Cartool, then this stage consists of two processing interfaces:
CreateSpiRoisMapping
: Create Cartool-reconstructed sources / parcellation ROI mapping file.CartoolInverseSolutionROIExtraction
: Use Pycartool to load inverse solutions estimated by Cartool and generate the ROI time courses.
- create_cartool_workflow(flow, inputnode, outputnode)[source]
Create the stage workflow using Cartool-precomputed inverse solutions.
This method is called by
create_workflow()
main function if Cartool is selected for ESI.- Parameters
flow (nipype.pipeline.engine.Workflow) – The nipype.pipeline.engine.Workflow instance of the EEG pipeline
inputnode (nipype.interfaces.utility.IdentityInterface) – Identity interface describing the inputs of the stage
outputnode (nipype.interfaces.utility.IdentityInterface) – Identity interface describing the outputs of the stage
- create_mne_workflow(flow, inputnode, outputnode)[source]
Create the stage workflow using MNE.
This method is called by
create_workflow()
main function if MNE is selected for ESI.- Parameters
flow (nipype.pipeline.engine.Workflow) – The nipype.pipeline.engine.Workflow instance of the EEG pipeline
inputnode (nipype.interfaces.utility.IdentityInterface) – Identity interface describing the inputs of the stage
outputnode (nipype.interfaces.utility.IdentityInterface) – Identity interface describing the outputs of the stage
- create_workflow(flow, inputnode, outputnode)[source]
Main method to create the stage workflow.
Based on the tool used for ESI, this method calls either the
create_cartool_workflow()
or the :func:`~cmp.stages.eeg.esi.create_mne_workflow method.- Parameters
flow (nipype.pipeline.engine.Workflow) – The nipype.pipeline.engine.Workflow instance of the EEG pipeline
inputnode (nipype.interfaces.utility.IdentityInterface) – Identity interface describing the inputs of the stage
outputnode (nipype.interfaces.utility.IdentityInterface) – Identity interface describing the outputs of the stage