EEG Pipeline Tutorial
In this notebook, we will demonstrate how to use the newly implemented EEG pipeline of CMP3, using the “VEPCON” dataset, available at https://openneuro.org/datasets/ds003505/versions/1.1.1.
It is important to note that CMP3 does not include preprocessing of EEG data, so it is expected that you have your data ready to be analyzed.
Important: Note that the skull-surfaces provided with the dataset (“bem”, see below) which are needed to create the head model are obtained from non-defaced MRIs. You will not be able to proceed with surfaces created from VEPCON dataset alone.
Setup instructions
If you want to reproduce all the results of this notebook on your side, a conda environment.yml
file can be downloaded at the following link: EEG_tutorial_environment.yml. The original .ipynb
notebook file can be downloaded at the following link: EEG_pipeline_tutorial.ipynb.
Once you have downloaded the conda environment file, install the environment py37cmp-eeg
as follows:
$ conda env create -f /path/to/downloaded/EEG_tutorial_environment.yml
This will install all the packages needed to run this notebook including jupyter lab.
You can then activate it, go to the directory where you downloaded the EEG_pipeline_tutorial.ipynb
, and launch jupyter lab as follows:
$ cd /directory/of/downloaded/EEG_pipeline_tutorial.ipynb
$ conda activate py37cmp-eeg
$ jupyter lab
You are ready to open and interact with the notebook!
[ ]:
!pip install ../../.
Loading the python packages used in the notebook
[1]:
# General
import sys
import os
import argparse
import subprocess
import pdb
import pickle
import shutil
import json
from IPython.display import SVG, display
import warnings
# Dataset management
import datalad.api as dl
# Data/graph handling and visualization
import numpy as np
import matplotlib.pyplot as plt
import networkx as nx
# BIDS import
from bids import BIDSLayout
# MNE imports
import mne
import mne_connectivity as mnec
# CMP3 imports
import cmp.project
from cmp.info import __version__, __copyright__
from cmtklib.util import print_error, print_blue, print_warning
from cmtklib.bids.io import (
__nipype_directory__, __cartool_directory__,
__eeglab_directory__, __cmp_directory__
)
# other
from EEG_tutorial_utils import (
create_trans_files,
fix_vepcon_derivatives_dataset_description_files
)
220709-17:01:15,509 nipype.utils WARNING:
A newer version (1.8.1) of nipy/nipype is available. You are using 1.7.0
Loading the BIDS dataset
For demonstration, we are going to use the latest version of VEPCON dataset, available on Open Neuro that already contains outputs from Connectome Mapper v3.0.3 and Freesurfer 7.1.1. A full description of the dataset can be found in Pascucci, Tourbier, et al. 2022.
In case you want to rerun the notebook, make sure to remove any ds003505_demo
folder in the directory of the notebook. Otherwise, datalad install will complain.
[2]:
%%time
# Download example dataset with datalad
bids_dir = os.path.join(".", "ds003505_demo") # Adjust path to your BIDS dataset as needed
vepcon_data = dl.install(
path=bids_dir,
source="https://github.com/OpenNeuroDatasets/ds003505.git"
)
CPU times: user 9.95 ms, sys: 13.8 ms, total: 23.7 ms
Wall time: 58.6 ms
Running the EEG pipeline
As of now, the EEG pipeline can only be run directly from the application programming interface (API) as demonstrated in this notebook. As soon as possible, we will integrate it into the graphical user interface (GUI) and the command line interface (CLI).
First, we need to configure the following user-defined arguments. Please modify them as needed.
[3]:
# Adjust path to your BIDS dataset as needed
bids_dir = vepcon_data.path
# Adjust path of the output directory as needed
output_dir = os.path.join(bids_dir, 'derivatives')
# Adjust the subject to be processed as needed
participant_label = 'sub-01'
# Adjust the name of the task to be considered
task_label = 'faces'
# Adjust path to the anatomical pipeline configuration file as needed
anat_pipeline_config = os.path.join(bids_dir, 'code', 'ConnectomeMapper-Docker', 'ref_anatomical_config.json')
# Adjust path to the MNE-based pipeline configuration file as needed
eeg_pipeline_config = os.path.join('.', 'ref_mne_eeg_config.json')
The eeg pipeline config .json file contains information that CMP3 needs to correctly load EEG data and associated information like electrode positions, names of conditions, which parcellation to use, etc. as seen below:
[4]:
%cat ref_mne_eeg_config.json
{
"Global": {
"process_type": "EEG",
"subjects": [
"sub-01"
],
"subject": "sub-01",
"version": "v3.1.0"
},
"eeg_preprocessing_stage": {
"task_label": "faces",
"eeg_ts_file.extension": "set",
"eeg_ts_file.toolbox_derivatives_dir": "eeglab-v14.1.1",
"eeg_ts_file.datatype": "eeg",
"eeg_ts_file.suffix": "eeg",
"eeg_ts_file.desc": "preproc",
"eeg_ts_file.task": "faces",
"events_file.datatype": "eeg",
"events_file.suffix": "events",
"events_file.extension": "tsv",
"events_file.task": "faces",
"electrodes_file_fmt": "Cartool",
"cartool_electrodes_file.toolbox_derivatives_dir": "cartool-v3.80",
"cartool_electrodes_file.datatype": "eeg",
"cartool_electrodes_file.suffix": "eeg",
"cartool_electrodes_file.extension": "xyz",
"t_min": -0.2,
"t_max": 0.5
},
"eeg_source_imaging_stage": {
"esi_tool": "MNE",
"mne_apply_electrode_transform": true,
"mne_electrode_transform_file.toolbox_derivatives_dir": "cmp-v3.0.3",
"mne_electrode_transform_file.datatype": "eeg",
"mne_electrode_transform_file.suffix": "trans",
"mne_electrode_transform_file.extension": "fif",
"parcellation_cmp_dir": "cmp-v3.0.3",
"parcellation_scheme": "Lausanne2018",
"lausanne2018_parcellation_res": "scale1",
"mne_esi_method": "sLORETA",
"mne_esi_method_snr": 3.0
},
"eeg_connectome_stage": {
"connectivity_metrics": [
"coh",
"cohy",
"imcoh",
"plv",
"ciplv",
"ppc",
"pli",
"wpli",
"wpli2_debiased"
],
"output_types": [
"tsv",
"gpickle",
"mat",
"graphml"
]
},
"Multi-processing": {
"number_of_cores": 1
}
}
Note: If you would like to run another subject (all available subjects except subjects 5 and 15 can be run), you will need to modify the config files (replacing sub-<label>
accordingly).
Then, we need to tell datalad to download the actual content of the structural MRI and EEG files that will be input to the pipelines.
[5]:
%%time
# Raw MRI
vepcon_data.get(f'{participant_label}/anat/')
CPU times: user 7.09 ms, sys: 9.96 ms, total: 17 ms
Wall time: 135 ms
[5]:
[{'action': 'get',
'path': '/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/sub-01/anat',
'type': 'directory',
'refds': '/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo',
'status': 'notneeded',
'message': ('nothing to get from %s',
'/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/sub-01/anat')}]
[6]:
%%time
# CMP3 and Freesurfer derivatives
vepcon_data.get(f'derivatives/cmp-v3.0.3/{participant_label}/anat/')
vepcon_data.get(f'derivatives/freesurfer-7.1.1/{participant_label}/')
CPU times: user 7.82 ms, sys: 10.2 ms, total: 18.1 ms
Wall time: 165 ms
[6]:
[{'action': 'get',
'path': '/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/freesurfer-7.1.1/sub-01',
'type': 'directory',
'refds': '/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo',
'status': 'notneeded',
'message': ('nothing to get from %s',
'/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/freesurfer-7.1.1/sub-01')}]
[7]:
%%time
# Electrode position
vepcon_data.get(f'derivatives/{__cartool_directory__}/{participant_label}/' +
f'eeg/{participant_label}_eeg.xyz')
# Preprocessed EEG in EEGLab .fdt/.set format
vepcon_data.get(f'derivatives/{__eeglab_directory__}/{participant_label}/eeg/' +
f'{participant_label}_task-faces_desc-preproc_eeg.fdt')
vepcon_data.get(f'derivatives/{__eeglab_directory__}/{participant_label}/eeg/' +
f'{participant_label}_task-faces_desc-preproc_eeg.set')
CPU times: user 11.1 ms, sys: 14.5 ms, total: 25.6 ms
Wall time: 223 ms
[7]:
[{'action': 'get',
'path': '/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/eeglab-v14.1.1/sub-01/eeg/sub-01_task-faces_desc-preproc_eeg.set',
'type': 'file',
'refds': '/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo',
'status': 'notneeded',
'message': 'already present'}]
In the latest version of VEPCON (v1.1.1
) that we use in this tutorial, we notice that dataset_description.json
files in the derivatives/cartool-v3.80
and derivatives/eeglab-v14.1.1
are invalid and will create an error if these directories are added to the BIDSLayout representation of the VEPCON dataset. We need to fix them by running the following helper function provided along this tutorial:
[8]:
fix_vepcon_derivatives_dataset_description_files(os.path.abspath(bids_dir))
Replace /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cartool-v3.80/dataset_description.json
Replace /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/eeglab-v14.1.1/dataset_description.json
We can then configure a new CMP3 project.
[9]:
# initialize project
project = cmp.project.ProjectInfo()
project.base_directory = os.path.abspath(bids_dir)
project.output_directory = os.path.abspath(output_dir)
project.subjects = ["{}".format(participant_label)]
project.subject = "{}".format(participant_label)
# VEPCON dataset does not have a subject/sessions structure
project.subject_sessions = [""]
project.subject_session = ""
# Set the path to the anatomical pipeline configuration file
project.anat_config_file = os.path.abspath(anat_pipeline_config)
As the dataset is in BIDS, we can use Pybids to help us with the task of interacting with the files of the dataset.
[10]:
# Represent the BIDS dataset as a PyBIDS BIDSLayout
bids_layout = BIDSLayout(project.base_directory)
Once set, we can run the anatomical pipeline, in order to obtain, among other things, Freesurfer derivatives necessary for the MNE pipeline.
Freesurfer and CMP3 derivatives are indeed provided with the VEPCON dataset, so we do not need to run it, but if run on a fresh dataset
[11]:
%%time
# Do not run again the anatomical pipeline
# You will have to set it to True on a fresh dataset
run = False
# Initialize the anatomical pipeline reading the configuration file
anat_pipeline = cmp.project.init_anat_project(project, False)
if anat_pipeline is not None:
# Check if inputs to anatomical pipeline are valid
anat_valid_inputs = anat_pipeline.check_input(bids_layout, gui=False)
if anat_valid_inputs:
if run:
print(">> Process anatomical pipeline")
anat_pipeline.process()
else:
print_error(" .. ERROR: Invalid inputs")
exit_code = 1
# Check if outputs to anatomical pipeline are valid
if run:
anat_valid_outputs, msg = anat_pipeline.check_output()
else:
anat_valid_outputs = True
# Set the freesurfer subjects directory and the subject id
project.freesurfer_subjects_dir = anat_pipeline.stages['Segmentation'].config.freesurfer_subjects_dir
project.freesurfer_subject_id = anat_pipeline.stages['Segmentation'].config.freesurfer_subject_id
.. LOAD: Load anatomical config file : /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/code/ConnectomeMapper-Docker/ref_anatomical_config.json
.. WARNING: CMP3 version used to generate the configuration files (v3.0.2) and version of CMP3 used (v3.1.0) differ
**** Check Inputs ****
> Looking in /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo for....
/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/sub-01/anat/sub-01_T1w.nii.gz
... t1_file : /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/sub-01/anat/sub-01_T1w.nii.gz
/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/sub-01/anat/sub-01_T1w.json
... t1_json_file : /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/sub-01/anat/sub-01_T1w.json
Inputs check finished successfully.
Only anatomical data (T1) available.
CPU times: user 29.6 ms, sys: 6.12 ms, total: 35.7 ms
Wall time: 33.1 ms
In VEPCON, the electrode positions are provided in a file in the Cartool-derivatives folder, but CMP3 expects them in the EEGLAB-derivatives folder.
[12]:
# To be Removed !!!
# Copy the file to the appropriate location
#cartool_file_location = os.path.join(
# bids_dir, 'derivatives', __cartool_directory__,
# participant_label,'eeg', participant_label + '_eeg.xyz'
#)
#eeglab_file_location = os.path.join(
# bids_dir, 'derivatives', 'eeglab-v14.1.1',
# participant_label, 'eeg', participant_label + '_eeg.xyz')
# if not os.path.exists(eeglab_file_location):
# _ = shutil.copyfile(cartool_file_location, eeglab_file_location)
Since we are using non-defaced MRIs, which are not exactly the same as the ones provided on OpenNeuro, we need an additional transform that will be applied to the electrode positions.
[13]:
# The following line creates the appropriate file with this transform in derivatives/cmp-v3.0.3:
create_trans_files(bids_dir, participant_label)
Overwriting existing file.
Finally, you can run the EEG pipeline.
[14]:
%%time
from cmtklib import config
# IF on MacOSX, add /usr/sbin to the $PATH
# which contains sysctl
# Otherwise, Nipype raises an "/bin/sh: sysctl: command not found" error
# when trying to get the system memory
if "darwin" in sys.platform:
os.environ["PATH"] = f'/usr/sbin/:{os.environ["PATH"]}'
# Note that "sysctl" can be located in a different place
# than "/usr/sbin".
# To know which path has to be added, you can run
# `locate sysctl`
# Set the path to the anatomical pipeline configurration file
eeg_pipeline_config = 'ref_mne_eeg_config.json'
project.eeg_config_file = os.path.abspath(eeg_pipeline_config)
if anat_valid_outputs:
# Initialize the EEG pipeline reading the configuration file and
# check input validity
eeg_valid_inputs, eeg_pipeline = cmp.project.init_eeg_project(
project, False
)
if eeg_pipeline is not None:
eeg_pipeline.parcellation_scheme = anat_pipeline.parcellation_scheme
eeg_pipeline.atlas_info = anat_pipeline.atlas_info
eeg_pipeline.stages['EEGPreprocessing'].config.task_label = 'faces'
if eeg_valid_inputs:
print(">> Process EEG pipeline")
eeg_pipeline.process()
else:
print(" .. ERROR: Invalid inputs")
exit_code = 1
else:
print_error(f' .. ERROR: Invalid anatomical outputs for eeg pipeline')
print_error(f'{msg}')
exit_code = 1
**** Check Inputs ****
Base dir: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline
.. DEBUG : Generated file name = sub-01_atlas-L2018_res-scale1_dseg.nii.gz
.. DEBUG : Generated file name = sub-01_atlas-L2018_res-scale1_dseg.nii.gz
cmp-v3.0.3
220709-17:01:27,860 nipype.workflow INFO:
[Node] Setting-up "eeg_check_input" in "/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_check_input".
220709-17:01:27,869 nipype.workflow INFO:
[Node] Executing "eeg_check_input" <nipype.interfaces.io.BIDSDataGrabber>
Load dataset_description for: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.0.3
Load dataset_description for: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/eeglab-v14.1.1
Load dataset_description for: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cartool-v3.80
220709-17:01:36,614 nipype.workflow INFO:
[Node] Finished "eeg_check_input", elapsed time 8.742065s.
.. Input file for "eeg_ts_file" key: ['/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/eeglab-v14.1.1/sub-01/eeg/sub-01_task-faces_desc-preproc_eeg.set']
.. Input file for "events_file" key: ['/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/sub-01/eeg/sub-01_task-faces_events.tsv']
.. Input file for "electrodes_file" key: ['/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/sub-01/eeg/sub-01_task-faces_electrodes.tsv']
.. Input file for "roi_volume_file" key: ['/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.0.3/sub-01/anat/sub-01_atlas-L2018_res-scale1_dseg.nii.gz', '/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.0.3/sub-01/anat/sub-01_space-DWI_atlas-L2018_res-scale1_dseg.nii.gz']
.. LOAD: Load EEG config file : /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ref_mne_eeg_config.json
.. INFO: Generated with the same CMP3 version
{'Global': {'process_type': 'EEG', 'subjects': ['sub-01'], 'subject': 'sub-01', 'version': 'v3.1.0'}, 'eeg_preprocessing_stage': {'task_label': 'faces', 'eeg_ts_file.extension': 'set', 'eeg_ts_file.toolbox_derivatives_dir': 'eeglab-v14.1.1', 'eeg_ts_file.datatype': 'eeg', 'eeg_ts_file.suffix': 'eeg', 'eeg_ts_file.desc': 'preproc', 'eeg_ts_file.task': 'faces', 'events_file.datatype': 'eeg', 'events_file.suffix': 'events', 'events_file.extension': 'tsv', 'events_file.task': 'faces', 'electrodes_file_fmt': 'Cartool', 'cartool_electrodes_file.toolbox_derivatives_dir': 'cartool-v3.80', 'cartool_electrodes_file.datatype': 'eeg', 'cartool_electrodes_file.suffix': 'eeg', 'cartool_electrodes_file.extension': 'xyz', 't_min': -0.2, 't_max': 0.5}, 'eeg_source_imaging_stage': {'esi_tool': 'MNE', 'mne_apply_electrode_transform': True, 'mne_electrode_transform_file.toolbox_derivatives_dir': 'cmp-v3.0.3', 'mne_electrode_transform_file.datatype': 'eeg', 'mne_electrode_transform_file.suffix': 'trans', 'mne_electrode_transform_file.extension': 'fif', 'parcellation_cmp_dir': 'cmp-v3.0.3', 'parcellation_scheme': 'Lausanne2018', 'lausanne2018_parcellation_res': 'scale1', 'mne_esi_method': 'sLORETA', 'mne_esi_method_snr': 3.0}, 'eeg_connectome_stage': {'connectivity_metrics': ['coh', 'cohy', 'imcoh', 'plv', 'ciplv', 'ppc', 'pli', 'wpli', 'wpli2_debiased'], 'output_types': ['tsv', 'gpickle', 'mat', 'graphml']}, 'Multi-processing': {'number_of_cores': 1}}
>> Process EEG pipeline
220709-17:01:36,634 nipype.interface INFO:
**** Processing ****
.. DEBUG : Generated file name = sub-01_atlas-L2018_res-scale1_dseg.nii.gz
.. DEBUG : Generated file path (no extension) = /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/sub-01/eeg/sub-01_task-faces_events
.. DEBUG: Event_ids for Epochs extraction: {'SCRAMBLED': '0', 'FACES': '1'}
220709-17:01:37,164 nipype.workflow INFO:
Generated workflow graph: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/graph.svg (graph2use=colored, simple_form=True).
220709-17:01:37,205 nipype.workflow INFO:
Workflow eeg_pipeline settings: ['check', 'execution', 'logging', 'monitoring']
220709-17:01:37,219 nipype.workflow INFO:
Running in parallel.
220709-17:01:37,222 nipype.workflow INFO:
[MultiProc] Running 0 tasks, and 3 jobs ready. Free memory (GB): 14.40/14.40, Free processors: 1/1.
220709-17:01:37,344 nipype.workflow INFO:
[Node] Outdated cache found for "eeg_pipeline.eeg_datasource".
220709-17:01:37,365 nipype.workflow INFO:
[Node] Setting-up "eeg_pipeline.eeg_datasource" in "/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_datasource".
220709-17:01:37,371 nipype.workflow INFO:
[Node] Outdated cache found for "eeg_pipeline.eeg_datasource".
220709-17:01:37,380 nipype.workflow INFO:
[Node] Executing "eeg_datasource" <nipype.interfaces.io.BIDSDataGrabber>
220709-17:01:39,229 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 2 jobs ready. Free memory (GB): 14.20/14.40, Free processors: 0/1.
Currently running:
* eeg_pipeline.eeg_datasource
Load dataset_description for: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/eeglab-v14.1.1
Load dataset_description for: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cartool-v3.80
Load dataset_description for: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.0.3
220709-17:01:46,693 nipype.workflow INFO:
[Node] Finished "eeg_datasource", elapsed time 9.308715s.
220709-17:01:47,241 nipype.workflow INFO:
[Job 0] Completed (eeg_pipeline.eeg_datasource).
220709-17:01:47,249 nipype.workflow INFO:
[MultiProc] Running 0 tasks, and 3 jobs ready. Free memory (GB): 14.40/14.40, Free processors: 1/1.
220709-17:01:47,431 nipype.workflow INFO:
[Node] Setting-up "eeg_pipeline.eeg_source_imaging_stage.mne_createbem" in "/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_source_imaging_stage/mne_createbem".
220709-17:01:47,437 nipype.workflow INFO:
[Node] Executing "mne_createbem" <cmtklib.interfaces.mne.CreateBEM>
Creating the BEM geometry...
Going from 5th to 4th subdivision of an icosahedron (n_tri: 20480 -> 5120)
Going from 5th to 4th subdivision of an icosahedron (n_tri: 20480 -> 5120)
Going from 5th to 4th subdivision of an icosahedron (n_tri: 20480 -> 5120)
outer skin CM is -1.05 -8.88 11.57 mm
outer skull CM is -1.05 -8.80 11.09 mm
inner skull CM is -1.05 -10.32 19.78 mm
Checking that surface outer skull is inside surface outer skin ...
220709-17:01:49,241 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 2 jobs ready. Free memory (GB): 14.20/14.40, Free processors: 0/1.
Currently running:
* eeg_pipeline.eeg_source_imaging_stage.mne_createbem
Checking that surface inner skull is inside surface outer skull ...
Checking distance between outer skin and outer skull surfaces...
Minimum distance between the outer skin and outer skull surfaces is approximately 1.6 mm
Checking distance between outer skull and inner skull surfaces...
Minimum distance between the outer skull and inner skull surfaces is approximately 1.8 mm
Surfaces passed the basic topology checks.
Complete.
Approximation method : Linear collocation
Three-layer model surfaces loaded.
Computing the linear collocation solution...
Matrix coefficients...
outer skin (2562) -> outer skin (2562) ...
outer skin (2562) -> outer skull (2562) ...
outer skin (2562) -> inner skull (2562) ...
outer skull (2562) -> outer skin (2562) ...
outer skull (2562) -> outer skull (2562) ...
outer skull (2562) -> inner skull (2562) ...
inner skull (2562) -> outer skin (2562) ...
inner skull (2562) -> outer skull (2562) ...
inner skull (2562) -> inner skull (2562) ...
Inverting the coefficient matrix...
IP approach required...
Matrix coefficients (homog)...
inner skull (2562) -> inner skull (2562) ...
Inverting the coefficient matrix (homog)...
Modify the original solution to incorporate IP approach...
Combining...
Scaling...
Solution ready.
BEM geometry computations complete.
220709-17:02:50,820 nipype.workflow INFO:
[Node] Finished "mne_createbem", elapsed time 63.377566s.
220709-17:02:51,340 nipype.workflow INFO:
[Job 1] Completed (eeg_pipeline.eeg_source_imaging_stage.mne_createbem).
220709-17:02:51,346 nipype.workflow INFO:
[MultiProc] Running 0 tasks, and 2 jobs ready. Free memory (GB): 14.40/14.40, Free processors: 1/1.
220709-17:02:51,455 nipype.workflow INFO:
[Node] Setting-up "eeg_pipeline.eeg_source_imaging_stage.mne_createsrc" in "/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_source_imaging_stage/mne_createsrc".
220709-17:02:51,460 nipype.workflow INFO:
[Node] Executing "mne_createsrc" <cmtklib.interfaces.mne.CreateSrc>
Setting up the source space with the following parameters:
SUBJECTS_DIR = /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/freesurfer-7.1.1
Subject = sub-01
Surface = white
Octahedron subdivision grade 6
>>> 1. Creating the source space...
Doing the octahedral vertex picking...
Loading /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/freesurfer-7.1.1/sub-01/surf/lh.white...
Mapping lh sub-01 -> oct (6) ...
Triangle neighbors and vertex normals...
Loading geometry from /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/freesurfer-7.1.1/sub-01/surf/lh.sphere...
Setting up the triangulation for the decimated surface...
loaded lh.white 4098/149863 selected to source space (oct = 6)
Loading /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/freesurfer-7.1.1/sub-01/surf/rh.white...
Mapping rh sub-01 -> oct (6) ...
Triangle neighbors and vertex normals...
Loading geometry from /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/freesurfer-7.1.1/sub-01/surf/rh.sphere...
Setting up the triangulation for the decimated surface...
loaded rh.white 4098/147183 selected to source space (oct = 6)
Calculating source space distances (limit=inf mm)...
220709-17:02:53,344 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 1 jobs ready. Free memory (GB): 14.20/14.40, Free processors: 0/1.
Currently running:
* eeg_pipeline.eeg_source_imaging_stage.mne_createsrc
Computing patch statistics...
Patch information added...
Computing patch statistics...
Patch information added...
You are now one step closer to computing the gain matrix
Write a source space...
[done]
Write a source space...
[done]
2 source spaces written
220709-17:13:09,333 nipype.workflow INFO:
[Node] Finished "mne_createsrc", elapsed time 617.869614s.
220709-17:13:10,258 nipype.workflow INFO:
[Job 2] Completed (eeg_pipeline.eeg_source_imaging_stage.mne_createsrc).
220709-17:13:10,264 nipype.workflow INFO:
[MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 14.40/14.40, Free processors: 1/1.
220709-17:13:10,360 nipype.workflow INFO:
[Node] Setting-up "eeg_pipeline.eeg_preprocessing_stage.eeglab2fif" in "/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_preprocessing_stage/eeglab2fif".
220709-17:13:10,367 nipype.workflow INFO:
[Node] Executing "eeglab2fif" <cmtklib.interfaces.mne.EEGLAB2fif>
eeg_ts_file = /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/eeglab-v14.1.1/sub-01/eeg/sub-01_task-faces_desc-preproc_eeg.set
electrodes_file = /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cartool-v3.80/sub-01/eeg/sub-01_eeg.xyz
event_ids = {'SCRAMBLED': '0', 'FACES': '1'}
events_file = /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/sub-01/eeg/sub-01_task-faces_events.tsv
out_epochs_fif_fname = epo.fif
t_max = 0.5
t_min = -0.2
Extracting parameters from /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/eeglab-v14.1.1/sub-01/eeg/sub-01_task-faces_desc-preproc_eeg.set...
Not setting metadata
Not setting metadata
588 matching events found
No baseline correction applied
0 projection items activated
Ready.
Applying baseline correction (mode: mean)
Adding average EEG reference projection.
1 projection items deactivated
Average reference projection was added, but has not been applied yet. Use the apply_proj method to apply it.
.. INFO: montage_fname = /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cartool-v3.80/sub-01/eeg/sub-01_eeg.xyz
.. INFO: Create montage from Cartool electrodes file...
220709-17:13:11,693 nipype.workflow INFO:
[Node] Finished "eeglab2fif", elapsed time 1.322598s.
220709-17:13:12,258 nipype.workflow INFO:
[Job 3] Completed (eeg_pipeline.eeg_preprocessing_stage.eeglab2fif).
220709-17:13:12,264 nipype.workflow INFO:
[MultiProc] Running 0 tasks, and 2 jobs ready. Free memory (GB): 14.40/14.40, Free processors: 1/1.
220709-17:13:12,361 nipype.workflow INFO:
[Node] Setting-up "eeg_pipeline.eeg_source_imaging_stage.mne_createcov" in "/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_source_imaging_stage/mne_createcov".
220709-17:13:12,366 nipype.workflow INFO:
[Node] Executing "mne_createcov" <cmtklib.interfaces.mne.CreateCov>
Reading /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_preprocessing_stage/eeglab2fif/epo.fif ...
Read a total of 1 projection items:
Average EEG reference (1 x 128) idle
Found the data of interest:
t = -200.00 ... 500.00 ms
0 CTF compensation matrices available
Not setting metadata
Not setting metadata
588 matching events found
No baseline correction applied
Created an SSP operator (subspace dimension = 1)
1 projection items activated
Computing rank from data with rank=None
Using tolerance 3.2e-11 (2.2e-16 eps * 128 dim * 1.1e+03 max singular value)
Estimated rank (eeg): 127
EEG: rank 127 computed from 128 data channels with 1 projector
Created an SSP operator (subspace dimension = 1)
Setting small EEG eigenvalues to zero (without PCA)
Reducing data rank from 128 -> 127
Estimating covariance using SHRUNK
220709-17:13:14,260 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 1 jobs ready. Free memory (GB): 14.20/14.40, Free processors: 0/1.
Currently running:
* eeg_pipeline.eeg_source_imaging_stage.mne_createcov
Done.
Estimating covariance using EMPIRICAL
Done.
Using cross-validation to select the best estimator.
Number of samples used : 29988
log-likelihood on unseen data (descending order):
shrunk: 71.873
empirical: -373.964
selecting best estimator: shrunk
[done]
220709-17:13:15,592 nipype.workflow INFO:
[Node] Finished "mne_createcov", elapsed time 3.22245s.
220709-17:13:16,262 nipype.workflow INFO:
[Job 4] Completed (eeg_pipeline.eeg_source_imaging_stage.mne_createcov).
220709-17:13:16,270 nipype.workflow INFO:
[MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 14.40/14.40, Free processors: 1/1.
220709-17:13:16,364 nipype.workflow INFO:
[Node] Setting-up "eeg_pipeline.eeg_source_imaging_stage.mne_createfwd" in "/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_source_imaging_stage/mne_createfwd".
220709-17:13:16,370 nipype.workflow INFO:
[Node] Executing "mne_createfwd" <cmtklib.interfaces.mne.CreateFwd>
Reading /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_preprocessing_stage/eeglab2fif/epo.fif ...
Read a total of 1 projection items:
Average EEG reference (1 x 128) idle
Found the data of interest:
t = -200.00 ... 500.00 ms
0 CTF compensation matrices available
Not setting metadata
Not setting metadata
588 matching events found
No baseline correction applied
Created an SSP operator (subspace dimension = 1)
1 projection items activated
Source space : /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_source_imaging_stage/mne_createsrc/src.fif
MRI -> head transform : /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.0.3/sub-01/eeg/sub-01_trans.fif
Measurement data : instance of Info
Conductor model : /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_source_imaging_stage/mne_createbem/bem.fif
Accurate field computations
Do computations in head coordinates
Free source orientations
Reading /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_source_imaging_stage/mne_createsrc/src.fif...
Read 2 source spaces a total of 8196 active source locations
Coordinate transformation: MRI (surface RAS) -> head
1.000000 0.000000 0.000000 0.00 mm
0.000000 1.000000 0.000000 9.00 mm
0.000000 0.000000 1.000000 -11.00 mm
0.000000 0.000000 0.000000 1.00
Read 128 EEG channels from info
Head coordinate coil definitions created.
Source spaces are now in head coordinates.
Setting up the BEM model using /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_source_imaging_stage/mne_createbem/bem.fif...
Loading surfaces...
Loading the solution matrix...
Three-layer model surfaces loaded.
Loaded linear_collocation BEM solution from /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_source_imaging_stage/mne_createbem/bem.fif
Employing the head->MRI coordinate transform with the BEM model.
BEM model bem.fif is now set up
Source spaces are in head coordinates.
Checking that the sources are inside the surface (will take a few...)
Skipping interior check for 1736 sources that fit inside a sphere of radius 53.7 mm
Skipping solid angle check for 0 points using Qhull
[Parallel(n_jobs=4)]: Using backend LokyBackend with 4 concurrent workers.
220709-17:13:18,262 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 0 jobs ready. Free memory (GB): 14.20/14.40, Free processors: 0/1.
Currently running:
* eeg_pipeline.eeg_source_imaging_stage.mne_createfwd
[Parallel(n_jobs=4)]: Done 2 out of 4 | elapsed: 8.9s remaining: 8.9s
[Parallel(n_jobs=4)]: Done 4 out of 4 | elapsed: 9.0s remaining: 0.0s
[Parallel(n_jobs=4)]: Done 4 out of 4 | elapsed: 9.0s finished
Skipping interior check for 1721 sources that fit inside a sphere of radius 53.7 mm
Skipping solid angle check for 0 points using Qhull
[Parallel(n_jobs=4)]: Using backend LokyBackend with 4 concurrent workers.
[Parallel(n_jobs=4)]: Done 2 out of 4 | elapsed: 0.3s remaining: 0.3s
[Parallel(n_jobs=4)]: Done 4 out of 4 | elapsed: 0.3s remaining: 0.0s
[Parallel(n_jobs=4)]: Done 4 out of 4 | elapsed: 0.3s finished
Setting up for EEG...
Computing EEG at 8196 source locations (free orientations)...
[Parallel(n_jobs=4)]: Using backend LokyBackend with 4 concurrent workers.
[Parallel(n_jobs=4)]: Done 2 out of 4 | elapsed: 1.1s remaining: 1.1s
[Parallel(n_jobs=4)]: Done 4 out of 4 | elapsed: 1.3s remaining: 0.0s
[Parallel(n_jobs=4)]: Done 4 out of 4 | elapsed: 1.3s finished
Finished.
Write a source space...
[done]
Write a source space...
[done]
2 source spaces written
220709-17:13:30,321 nipype.workflow INFO:
[Node] Finished "mne_createfwd", elapsed time 13.943436s.
220709-17:13:32,276 nipype.workflow INFO:
[Job 5] Completed (eeg_pipeline.eeg_source_imaging_stage.mne_createfwd).
220709-17:13:32,282 nipype.workflow INFO:
[MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 14.40/14.40, Free processors: 1/1.
220709-17:13:32,370 nipype.workflow INFO:
[Node] Setting-up "eeg_pipeline.eeg_source_imaging_stage.mne_invsol" in "/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_source_imaging_stage/mne_invsol".
220709-17:13:32,379 nipype.workflow INFO:
[Node] Executing "mne_invsol" <cmtklib.interfaces.mne.MNEInverseSolutionROI>
Reading /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_preprocessing_stage/eeglab2fif/epo.fif ...
Read a total of 1 projection items:
Average EEG reference (1 x 128) idle
Found the data of interest:
t = -200.00 ... 500.00 ms
0 CTF compensation matrices available
Not setting metadata
Not setting metadata
588 matching events found
No baseline correction applied
Created an SSP operator (subspace dimension = 1)
1 projection items activated
Reading forward solution from /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_source_imaging_stage/mne_createfwd/fwd.fif...
Reading a source space...
Computing patch statistics...
Patch information added...
Distance information added...
[done]
Reading a source space...
Computing patch statistics...
Patch information added...
Distance information added...
[done]
2 source spaces read
Desired named matrix (kind = 3523) not available
Read EEG forward solution (8196 sources, 128 channels, free orientations)
Source spaces transformed to the forward solution coordinate frame
128 x 128 full covariance (kind = 1) found.
Read a total of 1 projection items:
Average EEG reference (1 x 128) active
Reading a source space...
Computing patch statistics...
Patch information added...
Distance information added...
[done]
Reading a source space...
Computing patch statistics...
Patch information added...
Distance information added...
[done]
2 source spaces read
Computing inverse operator with 128 channels.
128 out of 128 channels remain after picking
Selected 128 channels
Whitening the forward solution.
Created an SSP operator (subspace dimension = 1)
Computing rank from covariance with rank=None
Using tolerance 1.2e-14 (2.2e-16 eps * 128 dim * 0.43 max singular value)
Estimated rank (eeg): 127
EEG: rank 127 computed from 128 data channels with 1 projector
Setting small EEG eigenvalues to zero (without PCA)
Creating the source covariance matrix
Adjusting source covariance matrix.
Computing SVD of whitened and weighted lead field matrix.
220709-17:13:34,277 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 0 jobs ready. Free memory (GB): 14.20/14.40, Free processors: 0/1.
Currently running:
* eeg_pipeline.eeg_source_imaging_stage.mne_invsol
largest singular value = 6.48933
scaling factor to adjust the trace = 4.66048e+24 (nchan = 128 nzero = 1)
Write inverse operator decomposition in /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_source_imaging_stage/mne_invsol/inv.fif...
Write a source space...
[done]
Write a source space...
[done]
2 source spaces written
Writing inverse operator info...
Writing noise covariance matrix.
Writing source covariance matrix.
Writing orientation priors.
[done]
Preparing the inverse operator for use...
Scaled noise and source covariance from nave = 1 to nave = 588
Created the regularized inverter
Created an SSP operator (subspace dimension = 1)
Created the whitener using a noise covariance matrix with rank 127 (1 small eigenvalues omitted)
Computing noise-normalization factors (sLORETA)...
[done]
Picked 128 channels from the data
Computing inverse...
Eigenleads need to be weighted ...
Processing epoch : 1 / 588
combining the current components...
Processing epoch : 2 / 588
combining the current components...
Processing epoch : 3 / 588
combining the current components...
Processing epoch : 4 / 588
combining the current components...
Processing epoch : 5 / 588
combining the current components...
Processing epoch : 6 / 588
combining the current components...
Processing epoch : 7 / 588
combining the current components...
Processing epoch : 8 / 588
combining the current components...
Processing epoch : 9 / 588
combining the current components...
Processing epoch : 10 / 588
combining the current components...
Processing epoch : 11 / 588
combining the current components...
Processing epoch : 12 / 588
combining the current components...
Processing epoch : 13 / 588
combining the current components...
Processing epoch : 14 / 588
combining the current components...
Processing epoch : 15 / 588
combining the current components...
Processing epoch : 16 / 588
combining the current components...
Processing epoch : 17 / 588
combining the current components...
Processing epoch : 18 / 588
combining the current components...
Processing epoch : 19 / 588
combining the current components...
Processing epoch : 20 / 588
combining the current components...
Processing epoch : 21 / 588
combining the current components...
Processing epoch : 22 / 588
combining the current components...
Processing epoch : 23 / 588
combining the current components...
Processing epoch : 24 / 588
combining the current components...
Processing epoch : 25 / 588
combining the current components...
Processing epoch : 26 / 588
combining the current components...
Processing epoch : 27 / 588
combining the current components...
Processing epoch : 28 / 588
combining the current components...
Processing epoch : 29 / 588
combining the current components...
Processing epoch : 30 / 588
combining the current components...
Processing epoch : 31 / 588
combining the current components...
Processing epoch : 32 / 588
combining the current components...
Processing epoch : 33 / 588
combining the current components...
Processing epoch : 34 / 588
combining the current components...
Processing epoch : 35 / 588
combining the current components...
Processing epoch : 36 / 588
combining the current components...
Processing epoch : 37 / 588
combining the current components...
Processing epoch : 38 / 588
combining the current components...
Processing epoch : 39 / 588
combining the current components...
Processing epoch : 40 / 588
combining the current components...
Processing epoch : 41 / 588
combining the current components...
Processing epoch : 42 / 588
combining the current components...
Processing epoch : 43 / 588
combining the current components...
Processing epoch : 44 / 588
combining the current components...
Processing epoch : 45 / 588
combining the current components...
Processing epoch : 46 / 588
combining the current components...
Processing epoch : 47 / 588
combining the current components...
Processing epoch : 48 / 588
combining the current components...
Processing epoch : 49 / 588
combining the current components...
Processing epoch : 50 / 588
combining the current components...
Processing epoch : 51 / 588
combining the current components...
Processing epoch : 52 / 588
combining the current components...
Processing epoch : 53 / 588
combining the current components...
Processing epoch : 54 / 588
combining the current components...
Processing epoch : 55 / 588
combining the current components...
Processing epoch : 56 / 588
combining the current components...
Processing epoch : 57 / 588
combining the current components...
Processing epoch : 58 / 588
combining the current components...
Processing epoch : 59 / 588
combining the current components...
Processing epoch : 60 / 588
combining the current components...
Processing epoch : 61 / 588
combining the current components...
Processing epoch : 62 / 588
combining the current components...
Processing epoch : 63 / 588
combining the current components...
Processing epoch : 64 / 588
combining the current components...
Processing epoch : 65 / 588
combining the current components...
Processing epoch : 66 / 588
combining the current components...
Processing epoch : 67 / 588
combining the current components...
Processing epoch : 68 / 588
combining the current components...
Processing epoch : 69 / 588
combining the current components...
Processing epoch : 70 / 588
combining the current components...
Processing epoch : 71 / 588
combining the current components...
Processing epoch : 72 / 588
combining the current components...
Processing epoch : 73 / 588
combining the current components...
Processing epoch : 74 / 588
combining the current components...
Processing epoch : 75 / 588
combining the current components...
Processing epoch : 76 / 588
combining the current components...
Processing epoch : 77 / 588
combining the current components...
Processing epoch : 78 / 588
combining the current components...
Processing epoch : 79 / 588
combining the current components...
Processing epoch : 80 / 588
combining the current components...
Processing epoch : 81 / 588
combining the current components...
Processing epoch : 82 / 588
combining the current components...
Processing epoch : 83 / 588
combining the current components...
Processing epoch : 84 / 588
combining the current components...
Processing epoch : 85 / 588
combining the current components...
Processing epoch : 86 / 588
combining the current components...
Processing epoch : 87 / 588
combining the current components...
Processing epoch : 88 / 588
combining the current components...
Processing epoch : 89 / 588
combining the current components...
Processing epoch : 90 / 588
combining the current components...
Processing epoch : 91 / 588
combining the current components...
Processing epoch : 92 / 588
combining the current components...
Processing epoch : 93 / 588
combining the current components...
Processing epoch : 94 / 588
combining the current components...
Processing epoch : 95 / 588
combining the current components...
Processing epoch : 96 / 588
combining the current components...
Processing epoch : 97 / 588
combining the current components...
Processing epoch : 98 / 588
combining the current components...
Processing epoch : 99 / 588
combining the current components...
Processing epoch : 100 / 588
combining the current components...
Processing epoch : 101 / 588
combining the current components...
Processing epoch : 102 / 588
combining the current components...
Processing epoch : 103 / 588
combining the current components...
Processing epoch : 104 / 588
combining the current components...
Processing epoch : 105 / 588
combining the current components...
Processing epoch : 106 / 588
combining the current components...
Processing epoch : 107 / 588
combining the current components...
Processing epoch : 108 / 588
combining the current components...
Processing epoch : 109 / 588
combining the current components...
Processing epoch : 110 / 588
combining the current components...
Processing epoch : 111 / 588
combining the current components...
Processing epoch : 112 / 588
combining the current components...
Processing epoch : 113 / 588
combining the current components...
Processing epoch : 114 / 588
combining the current components...
Processing epoch : 115 / 588
combining the current components...
Processing epoch : 116 / 588
combining the current components...
Processing epoch : 117 / 588
combining the current components...
Processing epoch : 118 / 588
combining the current components...
Processing epoch : 119 / 588
combining the current components...
Processing epoch : 120 / 588
combining the current components...
Processing epoch : 121 / 588
combining the current components...
Processing epoch : 122 / 588
combining the current components...
Processing epoch : 123 / 588
combining the current components...
Processing epoch : 124 / 588
combining the current components...
Processing epoch : 125 / 588
combining the current components...
Processing epoch : 126 / 588
combining the current components...
Processing epoch : 127 / 588
combining the current components...
Processing epoch : 128 / 588
combining the current components...
Processing epoch : 129 / 588
combining the current components...
Processing epoch : 130 / 588
combining the current components...
Processing epoch : 131 / 588
combining the current components...
Processing epoch : 132 / 588
combining the current components...
Processing epoch : 133 / 588
combining the current components...
Processing epoch : 134 / 588
combining the current components...
Processing epoch : 135 / 588
combining the current components...
Processing epoch : 136 / 588
combining the current components...
Processing epoch : 137 / 588
combining the current components...
Processing epoch : 138 / 588
combining the current components...
Processing epoch : 139 / 588
combining the current components...
Processing epoch : 140 / 588
combining the current components...
Processing epoch : 141 / 588
combining the current components...
Processing epoch : 142 / 588
combining the current components...
Processing epoch : 143 / 588
combining the current components...
Processing epoch : 144 / 588
combining the current components...
Processing epoch : 145 / 588
combining the current components...
Processing epoch : 146 / 588
combining the current components...
Processing epoch : 147 / 588
combining the current components...
Processing epoch : 148 / 588
combining the current components...
Processing epoch : 149 / 588
combining the current components...
Processing epoch : 150 / 588
combining the current components...
Processing epoch : 151 / 588
combining the current components...
Processing epoch : 152 / 588
combining the current components...
Processing epoch : 153 / 588
combining the current components...
Processing epoch : 154 / 588
combining the current components...
Processing epoch : 155 / 588
combining the current components...
Processing epoch : 156 / 588
combining the current components...
Processing epoch : 157 / 588
combining the current components...
Processing epoch : 158 / 588
combining the current components...
Processing epoch : 159 / 588
combining the current components...
Processing epoch : 160 / 588
combining the current components...
Processing epoch : 161 / 588
combining the current components...
Processing epoch : 162 / 588
combining the current components...
Processing epoch : 163 / 588
combining the current components...
Processing epoch : 164 / 588
combining the current components...
Processing epoch : 165 / 588
combining the current components...
Processing epoch : 166 / 588
combining the current components...
Processing epoch : 167 / 588
combining the current components...
Processing epoch : 168 / 588
combining the current components...
Processing epoch : 169 / 588
combining the current components...
Processing epoch : 170 / 588
combining the current components...
Processing epoch : 171 / 588
combining the current components...
Processing epoch : 172 / 588
combining the current components...
Processing epoch : 173 / 588
combining the current components...
Processing epoch : 174 / 588
combining the current components...
Processing epoch : 175 / 588
combining the current components...
Processing epoch : 176 / 588
combining the current components...
Processing epoch : 177 / 588
combining the current components...
Processing epoch : 178 / 588
combining the current components...
Processing epoch : 179 / 588
combining the current components...
Processing epoch : 180 / 588
combining the current components...
Processing epoch : 181 / 588
combining the current components...
Processing epoch : 182 / 588
combining the current components...
Processing epoch : 183 / 588
combining the current components...
Processing epoch : 184 / 588
combining the current components...
Processing epoch : 185 / 588
combining the current components...
Processing epoch : 186 / 588
combining the current components...
Processing epoch : 187 / 588
combining the current components...
Processing epoch : 188 / 588
combining the current components...
Processing epoch : 189 / 588
combining the current components...
Processing epoch : 190 / 588
combining the current components...
Processing epoch : 191 / 588
combining the current components...
Processing epoch : 192 / 588
combining the current components...
Processing epoch : 193 / 588
combining the current components...
Processing epoch : 194 / 588
combining the current components...
Processing epoch : 195 / 588
combining the current components...
Processing epoch : 196 / 588
combining the current components...
Processing epoch : 197 / 588
combining the current components...
Processing epoch : 198 / 588
combining the current components...
Processing epoch : 199 / 588
combining the current components...
Processing epoch : 200 / 588
combining the current components...
Processing epoch : 201 / 588
combining the current components...
Processing epoch : 202 / 588
combining the current components...
Processing epoch : 203 / 588
combining the current components...
Processing epoch : 204 / 588
combining the current components...
Processing epoch : 205 / 588
combining the current components...
Processing epoch : 206 / 588
combining the current components...
Processing epoch : 207 / 588
combining the current components...
Processing epoch : 208 / 588
combining the current components...
Processing epoch : 209 / 588
combining the current components...
Processing epoch : 210 / 588
combining the current components...
Processing epoch : 211 / 588
combining the current components...
Processing epoch : 212 / 588
combining the current components...
Processing epoch : 213 / 588
combining the current components...
Processing epoch : 214 / 588
combining the current components...
Processing epoch : 215 / 588
combining the current components...
Processing epoch : 216 / 588
combining the current components...
Processing epoch : 217 / 588
combining the current components...
Processing epoch : 218 / 588
combining the current components...
Processing epoch : 219 / 588
combining the current components...
Processing epoch : 220 / 588
combining the current components...
Processing epoch : 221 / 588
combining the current components...
Processing epoch : 222 / 588
combining the current components...
Processing epoch : 223 / 588
combining the current components...
Processing epoch : 224 / 588
combining the current components...
Processing epoch : 225 / 588
combining the current components...
Processing epoch : 226 / 588
combining the current components...
Processing epoch : 227 / 588
combining the current components...
Processing epoch : 228 / 588
combining the current components...
Processing epoch : 229 / 588
combining the current components...
Processing epoch : 230 / 588
combining the current components...
Processing epoch : 231 / 588
combining the current components...
Processing epoch : 232 / 588
combining the current components...
Processing epoch : 233 / 588
combining the current components...
Processing epoch : 234 / 588
combining the current components...
Processing epoch : 235 / 588
combining the current components...
Processing epoch : 236 / 588
combining the current components...
Processing epoch : 237 / 588
combining the current components...
Processing epoch : 238 / 588
combining the current components...
Processing epoch : 239 / 588
combining the current components...
Processing epoch : 240 / 588
combining the current components...
Processing epoch : 241 / 588
combining the current components...
Processing epoch : 242 / 588
combining the current components...
Processing epoch : 243 / 588
combining the current components...
Processing epoch : 244 / 588
combining the current components...
Processing epoch : 245 / 588
combining the current components...
Processing epoch : 246 / 588
combining the current components...
Processing epoch : 247 / 588
combining the current components...
Processing epoch : 248 / 588
combining the current components...
Processing epoch : 249 / 588
combining the current components...
Processing epoch : 250 / 588
combining the current components...
Processing epoch : 251 / 588
combining the current components...
Processing epoch : 252 / 588
combining the current components...
Processing epoch : 253 / 588
combining the current components...
Processing epoch : 254 / 588
combining the current components...
Processing epoch : 255 / 588
combining the current components...
Processing epoch : 256 / 588
combining the current components...
Processing epoch : 257 / 588
combining the current components...
Processing epoch : 258 / 588
combining the current components...
Processing epoch : 259 / 588
combining the current components...
Processing epoch : 260 / 588
combining the current components...
Processing epoch : 261 / 588
combining the current components...
Processing epoch : 262 / 588
combining the current components...
Processing epoch : 263 / 588
combining the current components...
Processing epoch : 264 / 588
combining the current components...
Processing epoch : 265 / 588
combining the current components...
Processing epoch : 266 / 588
combining the current components...
Processing epoch : 267 / 588
combining the current components...
Processing epoch : 268 / 588
combining the current components...
Processing epoch : 269 / 588
combining the current components...
Processing epoch : 270 / 588
combining the current components...
Processing epoch : 271 / 588
combining the current components...
Processing epoch : 272 / 588
combining the current components...
Processing epoch : 273 / 588
combining the current components...
Processing epoch : 274 / 588
combining the current components...
Processing epoch : 275 / 588
combining the current components...
Processing epoch : 276 / 588
combining the current components...
Processing epoch : 277 / 588
combining the current components...
Processing epoch : 278 / 588
combining the current components...
Processing epoch : 279 / 588
combining the current components...
Processing epoch : 280 / 588
combining the current components...
Processing epoch : 281 / 588
combining the current components...
Processing epoch : 282 / 588
combining the current components...
Processing epoch : 283 / 588
combining the current components...
Processing epoch : 284 / 588
combining the current components...
Processing epoch : 285 / 588
combining the current components...
Processing epoch : 286 / 588
combining the current components...
Processing epoch : 287 / 588
combining the current components...
Processing epoch : 288 / 588
combining the current components...
Processing epoch : 289 / 588
combining the current components...
Processing epoch : 290 / 588
combining the current components...
Processing epoch : 291 / 588
combining the current components...
Processing epoch : 292 / 588
combining the current components...
Processing epoch : 293 / 588
combining the current components...
Processing epoch : 294 / 588
combining the current components...
Processing epoch : 295 / 588
combining the current components...
Processing epoch : 296 / 588
combining the current components...
Processing epoch : 297 / 588
combining the current components...
Processing epoch : 298 / 588
combining the current components...
Processing epoch : 299 / 588
combining the current components...
Processing epoch : 300 / 588
combining the current components...
Processing epoch : 301 / 588
combining the current components...
Processing epoch : 302 / 588
combining the current components...
Processing epoch : 303 / 588
combining the current components...
Processing epoch : 304 / 588
combining the current components...
Processing epoch : 305 / 588
combining the current components...
Processing epoch : 306 / 588
combining the current components...
Processing epoch : 307 / 588
combining the current components...
Processing epoch : 308 / 588
combining the current components...
Processing epoch : 309 / 588
combining the current components...
Processing epoch : 310 / 588
combining the current components...
Processing epoch : 311 / 588
combining the current components...
Processing epoch : 312 / 588
combining the current components...
Processing epoch : 313 / 588
combining the current components...
Processing epoch : 314 / 588
combining the current components...
Processing epoch : 315 / 588
combining the current components...
Processing epoch : 316 / 588
combining the current components...
Processing epoch : 317 / 588
combining the current components...
Processing epoch : 318 / 588
combining the current components...
Processing epoch : 319 / 588
combining the current components...
Processing epoch : 320 / 588
combining the current components...
Processing epoch : 321 / 588
combining the current components...
Processing epoch : 322 / 588
combining the current components...
Processing epoch : 323 / 588
combining the current components...
Processing epoch : 324 / 588
combining the current components...
Processing epoch : 325 / 588
combining the current components...
Processing epoch : 326 / 588
combining the current components...
Processing epoch : 327 / 588
combining the current components...
Processing epoch : 328 / 588
combining the current components...
Processing epoch : 329 / 588
combining the current components...
Processing epoch : 330 / 588
combining the current components...
Processing epoch : 331 / 588
combining the current components...
Processing epoch : 332 / 588
combining the current components...
Processing epoch : 333 / 588
combining the current components...
Processing epoch : 334 / 588
combining the current components...
Processing epoch : 335 / 588
combining the current components...
Processing epoch : 336 / 588
combining the current components...
Processing epoch : 337 / 588
combining the current components...
Processing epoch : 338 / 588
combining the current components...
Processing epoch : 339 / 588
combining the current components...
Processing epoch : 340 / 588
combining the current components...
Processing epoch : 341 / 588
combining the current components...
Processing epoch : 342 / 588
combining the current components...
Processing epoch : 343 / 588
combining the current components...
Processing epoch : 344 / 588
combining the current components...
Processing epoch : 345 / 588
combining the current components...
Processing epoch : 346 / 588
combining the current components...
Processing epoch : 347 / 588
combining the current components...
Processing epoch : 348 / 588
combining the current components...
Processing epoch : 349 / 588
combining the current components...
Processing epoch : 350 / 588
combining the current components...
Processing epoch : 351 / 588
combining the current components...
Processing epoch : 352 / 588
combining the current components...
Processing epoch : 353 / 588
combining the current components...
Processing epoch : 354 / 588
combining the current components...
Processing epoch : 355 / 588
combining the current components...
Processing epoch : 356 / 588
combining the current components...
Processing epoch : 357 / 588
combining the current components...
Processing epoch : 358 / 588
combining the current components...
Processing epoch : 359 / 588
combining the current components...
Processing epoch : 360 / 588
combining the current components...
Processing epoch : 361 / 588
combining the current components...
Processing epoch : 362 / 588
combining the current components...
Processing epoch : 363 / 588
combining the current components...
Processing epoch : 364 / 588
combining the current components...
Processing epoch : 365 / 588
combining the current components...
Processing epoch : 366 / 588
combining the current components...
Processing epoch : 367 / 588
combining the current components...
Processing epoch : 368 / 588
combining the current components...
Processing epoch : 369 / 588
combining the current components...
Processing epoch : 370 / 588
combining the current components...
Processing epoch : 371 / 588
combining the current components...
Processing epoch : 372 / 588
combining the current components...
Processing epoch : 373 / 588
combining the current components...
Processing epoch : 374 / 588
combining the current components...
Processing epoch : 375 / 588
combining the current components...
Processing epoch : 376 / 588
combining the current components...
Processing epoch : 377 / 588
combining the current components...
Processing epoch : 378 / 588
combining the current components...
Processing epoch : 379 / 588
combining the current components...
Processing epoch : 380 / 588
combining the current components...
Processing epoch : 381 / 588
combining the current components...
Processing epoch : 382 / 588
combining the current components...
Processing epoch : 383 / 588
combining the current components...
Processing epoch : 384 / 588
combining the current components...
Processing epoch : 385 / 588
combining the current components...
Processing epoch : 386 / 588
combining the current components...
Processing epoch : 387 / 588
combining the current components...
Processing epoch : 388 / 588
combining the current components...
Processing epoch : 389 / 588
combining the current components...
Processing epoch : 390 / 588
combining the current components...
Processing epoch : 391 / 588
combining the current components...
Processing epoch : 392 / 588
combining the current components...
Processing epoch : 393 / 588
combining the current components...
Processing epoch : 394 / 588
combining the current components...
Processing epoch : 395 / 588
combining the current components...
Processing epoch : 396 / 588
combining the current components...
Processing epoch : 397 / 588
combining the current components...
Processing epoch : 398 / 588
combining the current components...
Processing epoch : 399 / 588
combining the current components...
Processing epoch : 400 / 588
combining the current components...
Processing epoch : 401 / 588
combining the current components...
Processing epoch : 402 / 588
combining the current components...
Processing epoch : 403 / 588
combining the current components...
Processing epoch : 404 / 588
combining the current components...
Processing epoch : 405 / 588
combining the current components...
Processing epoch : 406 / 588
combining the current components...
Processing epoch : 407 / 588
combining the current components...
Processing epoch : 408 / 588
combining the current components...
Processing epoch : 409 / 588
combining the current components...
Processing epoch : 410 / 588
combining the current components...
Processing epoch : 411 / 588
combining the current components...
Processing epoch : 412 / 588
combining the current components...
Processing epoch : 413 / 588
combining the current components...
Processing epoch : 414 / 588
combining the current components...
Processing epoch : 415 / 588
combining the current components...
Processing epoch : 416 / 588
combining the current components...
Processing epoch : 417 / 588
combining the current components...
Processing epoch : 418 / 588
combining the current components...
Processing epoch : 419 / 588
combining the current components...
Processing epoch : 420 / 588
combining the current components...
Processing epoch : 421 / 588
combining the current components...
Processing epoch : 422 / 588
combining the current components...
Processing epoch : 423 / 588
combining the current components...
Processing epoch : 424 / 588
combining the current components...
Processing epoch : 425 / 588
combining the current components...
Processing epoch : 426 / 588
combining the current components...
Processing epoch : 427 / 588
combining the current components...
Processing epoch : 428 / 588
combining the current components...
Processing epoch : 429 / 588
combining the current components...
Processing epoch : 430 / 588
combining the current components...
Processing epoch : 431 / 588
combining the current components...
Processing epoch : 432 / 588
combining the current components...
Processing epoch : 433 / 588
combining the current components...
Processing epoch : 434 / 588
combining the current components...
Processing epoch : 435 / 588
combining the current components...
Processing epoch : 436 / 588
combining the current components...
Processing epoch : 437 / 588
combining the current components...
Processing epoch : 438 / 588
combining the current components...
Processing epoch : 439 / 588
combining the current components...
Processing epoch : 440 / 588
combining the current components...
Processing epoch : 441 / 588
combining the current components...
Processing epoch : 442 / 588
combining the current components...
Processing epoch : 443 / 588
combining the current components...
Processing epoch : 444 / 588
combining the current components...
Processing epoch : 445 / 588
combining the current components...
Processing epoch : 446 / 588
combining the current components...
Processing epoch : 447 / 588
combining the current components...
Processing epoch : 448 / 588
combining the current components...
Processing epoch : 449 / 588
combining the current components...
Processing epoch : 450 / 588
combining the current components...
Processing epoch : 451 / 588
combining the current components...
Processing epoch : 452 / 588
combining the current components...
Processing epoch : 453 / 588
combining the current components...
Processing epoch : 454 / 588
combining the current components...
Processing epoch : 455 / 588
combining the current components...
Processing epoch : 456 / 588
combining the current components...
Processing epoch : 457 / 588
combining the current components...
Processing epoch : 458 / 588
combining the current components...
Processing epoch : 459 / 588
combining the current components...
Processing epoch : 460 / 588
combining the current components...
Processing epoch : 461 / 588
combining the current components...
Processing epoch : 462 / 588
combining the current components...
Processing epoch : 463 / 588
combining the current components...
Processing epoch : 464 / 588
combining the current components...
Processing epoch : 465 / 588
combining the current components...
Processing epoch : 466 / 588
combining the current components...
Processing epoch : 467 / 588
combining the current components...
Processing epoch : 468 / 588
combining the current components...
Processing epoch : 469 / 588
combining the current components...
Processing epoch : 470 / 588
combining the current components...
Processing epoch : 471 / 588
combining the current components...
Processing epoch : 472 / 588
combining the current components...
Processing epoch : 473 / 588
combining the current components...
Processing epoch : 474 / 588
combining the current components...
Processing epoch : 475 / 588
combining the current components...
Processing epoch : 476 / 588
combining the current components...
Processing epoch : 477 / 588
combining the current components...
Processing epoch : 478 / 588
combining the current components...
Processing epoch : 479 / 588
combining the current components...
Processing epoch : 480 / 588
combining the current components...
Processing epoch : 481 / 588
combining the current components...
Processing epoch : 482 / 588
combining the current components...
Processing epoch : 483 / 588
combining the current components...
Processing epoch : 484 / 588
combining the current components...
Processing epoch : 485 / 588
combining the current components...
Processing epoch : 486 / 588
combining the current components...
Processing epoch : 487 / 588
combining the current components...
Processing epoch : 488 / 588
combining the current components...
Processing epoch : 489 / 588
combining the current components...
Processing epoch : 490 / 588
combining the current components...
Processing epoch : 491 / 588
combining the current components...
Processing epoch : 492 / 588
combining the current components...
Processing epoch : 493 / 588
combining the current components...
Processing epoch : 494 / 588
combining the current components...
Processing epoch : 495 / 588
combining the current components...
Processing epoch : 496 / 588
combining the current components...
Processing epoch : 497 / 588
combining the current components...
Processing epoch : 498 / 588
combining the current components...
Processing epoch : 499 / 588
combining the current components...
Processing epoch : 500 / 588
combining the current components...
Processing epoch : 501 / 588
combining the current components...
Processing epoch : 502 / 588
combining the current components...
Processing epoch : 503 / 588
combining the current components...
Processing epoch : 504 / 588
combining the current components...
Processing epoch : 505 / 588
combining the current components...
Processing epoch : 506 / 588
combining the current components...
Processing epoch : 507 / 588
combining the current components...
Processing epoch : 508 / 588
combining the current components...
Processing epoch : 509 / 588
combining the current components...
Processing epoch : 510 / 588
combining the current components...
Processing epoch : 511 / 588
combining the current components...
Processing epoch : 512 / 588
combining the current components...
Processing epoch : 513 / 588
combining the current components...
Processing epoch : 514 / 588
combining the current components...
Processing epoch : 515 / 588
combining the current components...
Processing epoch : 516 / 588
combining the current components...
Processing epoch : 517 / 588
combining the current components...
Processing epoch : 518 / 588
combining the current components...
Processing epoch : 519 / 588
combining the current components...
Processing epoch : 520 / 588
combining the current components...
Processing epoch : 521 / 588
combining the current components...
Processing epoch : 522 / 588
combining the current components...
Processing epoch : 523 / 588
combining the current components...
Processing epoch : 524 / 588
combining the current components...
Processing epoch : 525 / 588
combining the current components...
Processing epoch : 526 / 588
combining the current components...
Processing epoch : 527 / 588
combining the current components...
Processing epoch : 528 / 588
combining the current components...
Processing epoch : 529 / 588
combining the current components...
Processing epoch : 530 / 588
combining the current components...
Processing epoch : 531 / 588
combining the current components...
Processing epoch : 532 / 588
combining the current components...
Processing epoch : 533 / 588
combining the current components...
Processing epoch : 534 / 588
combining the current components...
Processing epoch : 535 / 588
combining the current components...
Processing epoch : 536 / 588
combining the current components...
Processing epoch : 537 / 588
combining the current components...
Processing epoch : 538 / 588
combining the current components...
Processing epoch : 539 / 588
combining the current components...
Processing epoch : 540 / 588
combining the current components...
Processing epoch : 541 / 588
combining the current components...
Processing epoch : 542 / 588
combining the current components...
Processing epoch : 543 / 588
combining the current components...
Processing epoch : 544 / 588
combining the current components...
Processing epoch : 545 / 588
combining the current components...
Processing epoch : 546 / 588
combining the current components...
Processing epoch : 547 / 588
combining the current components...
Processing epoch : 548 / 588
combining the current components...
Processing epoch : 549 / 588
combining the current components...
Processing epoch : 550 / 588
combining the current components...
Processing epoch : 551 / 588
combining the current components...
Processing epoch : 552 / 588
combining the current components...
Processing epoch : 553 / 588
combining the current components...
Processing epoch : 554 / 588
combining the current components...
Processing epoch : 555 / 588
combining the current components...
Processing epoch : 556 / 588
combining the current components...
Processing epoch : 557 / 588
combining the current components...
Processing epoch : 558 / 588
combining the current components...
Processing epoch : 559 / 588
combining the current components...
Processing epoch : 560 / 588
combining the current components...
Processing epoch : 561 / 588
combining the current components...
Processing epoch : 562 / 588
combining the current components...
Processing epoch : 563 / 588
combining the current components...
Processing epoch : 564 / 588
combining the current components...
Processing epoch : 565 / 588
combining the current components...
Processing epoch : 566 / 588
combining the current components...
Processing epoch : 567 / 588
combining the current components...
Processing epoch : 568 / 588
combining the current components...
Processing epoch : 569 / 588
combining the current components...
Processing epoch : 570 / 588
combining the current components...
Processing epoch : 571 / 588
combining the current components...
Processing epoch : 572 / 588
combining the current components...
Processing epoch : 573 / 588
combining the current components...
Processing epoch : 574 / 588
combining the current components...
Processing epoch : 575 / 588
combining the current components...
Processing epoch : 576 / 588
combining the current components...
Processing epoch : 577 / 588
combining the current components...
Processing epoch : 578 / 588
combining the current components...
Processing epoch : 579 / 588
combining the current components...
Processing epoch : 580 / 588
combining the current components...
Processing epoch : 581 / 588
combining the current components...
Processing epoch : 582 / 588
combining the current components...
Processing epoch : 583 / 588
combining the current components...
Processing epoch : 584 / 588
combining the current components...
Processing epoch : 585 / 588
combining the current components...
Processing epoch : 586 / 588
combining the current components...
Processing epoch : 587 / 588
combining the current components...
Processing epoch : 588 / 588
combining the current components...
[done]
Reading labels from parcellation...
read 35 labels from /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/freesurfer-7.1.1/sub-01/label/lh.lausanne2018.scale1.annot
read 35 labels from /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/freesurfer-7.1.1/sub-01/label/rh.lausanne2018.scale1.annot
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
Extracting time courses for 70 labels (mode: pca_flip)
220709-17:16:19,251 nipype.workflow INFO:
[Node] Finished "mne_invsol", elapsed time 166.864983s.
220709-17:16:20,461 nipype.workflow INFO:
[Job 6] Completed (eeg_pipeline.eeg_source_imaging_stage.mne_invsol).
220709-17:16:20,473 nipype.workflow INFO:
[MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 14.40/14.40, Free processors: 1/1.
220709-17:16:20,889 nipype.workflow INFO:
[Node] Setting-up "eeg_pipeline.eeg_connectome_stage.eeg_compute_matrice" in "/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_connectome_stage/eeg_compute_matrice".
220709-17:16:20,901 nipype.workflow INFO:
[Node] Executing "eeg_compute_matrice" <cmtklib.interfaces.mne.MNESpectralConnectivity>
Reading /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_preprocessing_stage/eeglab2fif/epo.fif ...
Read a total of 1 projection items:
Average EEG reference (1 x 128) idle
Found the data of interest:
t = -200.00 ... 500.00 ms
0 CTF compensation matrices available
Not setting metadata
Not setting metadata
588 matching events found
No baseline correction applied
Created an SSP operator (subspace dimension = 1)
1 projection items activated
220709-17:16:22,464 nipype.workflow INFO:
[MultiProc] Running 1 tasks, and 0 jobs ready. Free memory (GB): 14.20/14.40, Free processors: 0/1.
Currently running:
* eeg_pipeline.eeg_connectome_stage.eeg_compute_matrice
Save /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_connectome_stage/eeg_compute_matrice/conndata-network_connectivity.tsv...
Save /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_connectome_stage/eeg_compute_matrice/conndata-network_connectivity.gpickle...
Save /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_connectome_stage/eeg_compute_matrice/conndata-network_connectivity.mat...
Save /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_connectome_stage/eeg_compute_matrice/conndata-network_connectivity.graphml...
220709-17:17:14,972 nipype.workflow INFO:
[Node] Finished "eeg_compute_matrice", elapsed time 54.067281s.
220709-17:17:16,563 nipype.workflow INFO:
[Job 7] Completed (eeg_pipeline.eeg_connectome_stage.eeg_compute_matrice).
220709-17:17:16,570 nipype.workflow INFO:
[MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 14.40/14.40, Free processors: 1/1.
220709-17:17:16,685 nipype.workflow INFO:
[Node] Setting-up "eeg_pipeline.eeg_datasinker" in "/Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/nipype-1.7.0/sub-01/eeg_pipeline/eeg_datasinker".
220709-17:17:16,707 nipype.workflow INFO:
[Node] Executing "eeg_datasinker" <nipype.interfaces.io.DataSink>
220709-17:17:16,711 nipype.interface INFO:
sub: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/epo.fif -> /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/sub-01_task-faces_epo.fif
220709-17:17:16,716 nipype.interface INFO:
sub: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/bem.fif -> /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/sub-01_task-faces_bem.fif
220709-17:17:16,720 nipype.interface INFO:
sub: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/noisecov.fif -> /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/sub-01_task-faces_noisecov.fif
220709-17:17:16,724 nipype.interface INFO:
sub: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/src.fif -> /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/sub-01_task-faces_src.fif
220709-17:17:16,727 nipype.interface INFO:
sub: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/fwd.fif -> /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/sub-01_task-faces_fwd.fif
220709-17:17:16,731 nipype.interface INFO:
sub: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/inv.fif -> /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/sub-01_task-faces_inv.fif
220709-17:17:16,734 nipype.interface INFO:
sub: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/timeseries.pickle -> /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/sub-01_task-faces_atlas-L2018_res-scale1_timeseries.pickle
220709-17:17:16,736 nipype.interface INFO:
sub: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/conndata-network_connectivity.tsv -> /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/sub-01_task-faces_atlas-L2018_res-scale1_conndata-network_connectivity.tsv
220709-17:17:16,739 nipype.interface INFO:
sub: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/conndata-network_connectivity.gpickle -> /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/sub-01_task-faces_atlas-L2018_res-scale1_conndata-network_connectivity.gpickle
220709-17:17:16,742 nipype.interface INFO:
sub: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/conndata-network_connectivity.mat -> /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/sub-01_task-faces_atlas-L2018_res-scale1_conndata-network_connectivity.mat
220709-17:17:16,745 nipype.interface INFO:
sub: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/conndata-network_connectivity.graphml -> /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/sub-01_task-faces_atlas-L2018_res-scale1_conndata-network_connectivity.graphml
220709-17:17:16,749 nipype.workflow INFO:
[Node] Finished "eeg_datasinker", elapsed time 0.037833s.
220709-17:17:18,568 nipype.workflow INFO:
[Job 8] Completed (eeg_pipeline.eeg_datasinker).
220709-17:17:18,576 nipype.workflow INFO:
[MultiProc] Running 0 tasks, and 0 jobs ready. Free memory (GB): 14.40/14.40, Free processors: 1/1.
220709-17:17:21,115 nipype.interface INFO:
**** Processing finished ****
CPU times: user 16.5 s, sys: 1.98 s, total: 18.4 s
Wall time: 15min 58s
/Applications/miniconda3/envs/py37cmp-eeg/lib/python3.7/site-packages/joblib/externals/loky/backend/resource_tracker.py:320: UserWarning: resource_tracker: There appear to be 6 leaked folder objects to clean up at shutdown
(len(rtype_registry), rtype))
/Applications/miniconda3/envs/py37cmp-eeg/lib/python3.7/site-packages/joblib/externals/loky/backend/resource_tracker.py:333: UserWarning: resource_tracker: /var/folders/vy/0bw_1jvj54n8lvcgvdrtqb0c0000gn/T/joblib_memmapping_folder_47551_379a43977f814190bfe6f03e92cfdae6_3fedd64ce92b49b9a6481229dccca45d: FileNotFoundError(2, 'No such file or directory')
warnings.warn('resource_tracker: %s: %r' % (name, e))
/Applications/miniconda3/envs/py37cmp-eeg/lib/python3.7/site-packages/joblib/externals/loky/backend/resource_tracker.py:333: UserWarning: resource_tracker: /var/folders/vy/0bw_1jvj54n8lvcgvdrtqb0c0000gn/T/joblib_memmapping_folder_47551_379a43977f814190bfe6f03e92cfdae6_ae6b9e5318df4c718513b5ce780ef199: FileNotFoundError(2, 'No such file or directory')
warnings.warn('resource_tracker: %s: %r' % (name, e))
/Applications/miniconda3/envs/py37cmp-eeg/lib/python3.7/site-packages/joblib/externals/loky/backend/resource_tracker.py:333: UserWarning: resource_tracker: /var/folders/vy/0bw_1jvj54n8lvcgvdrtqb0c0000gn/T/joblib_memmapping_folder_47551_3d28f25931e34ead98c3102ee1bbe4be_e207a49f2faf4ad38c389a170ccc9af2: FileNotFoundError(2, 'No such file or directory')
warnings.warn('resource_tracker: %s: %r' % (name, e))
/Applications/miniconda3/envs/py37cmp-eeg/lib/python3.7/site-packages/joblib/externals/loky/backend/resource_tracker.py:333: UserWarning: resource_tracker: /var/folders/vy/0bw_1jvj54n8lvcgvdrtqb0c0000gn/T/joblib_memmapping_folder_47551_379a43977f814190bfe6f03e92cfdae6_5d99e23deff54a888a0efa2ed85d7b6f: FileNotFoundError(2, 'No such file or directory')
warnings.warn('resource_tracker: %s: %r' % (name, e))
/Applications/miniconda3/envs/py37cmp-eeg/lib/python3.7/site-packages/joblib/externals/loky/backend/resource_tracker.py:333: UserWarning: resource_tracker: /var/folders/vy/0bw_1jvj54n8lvcgvdrtqb0c0000gn/T/joblib_memmapping_folder_47551_ad22804ddb624e55b2ee83b946e96936_428a96c1454840a28c73e60ad46a69c8: FileNotFoundError(2, 'No such file or directory')
warnings.warn('resource_tracker: %s: %r' % (name, e))
/Applications/miniconda3/envs/py37cmp-eeg/lib/python3.7/site-packages/joblib/externals/loky/backend/resource_tracker.py:333: UserWarning: resource_tracker: /var/folders/vy/0bw_1jvj54n8lvcgvdrtqb0c0000gn/T/joblib_memmapping_folder_47551_379a43977f814190bfe6f03e92cfdae6_d7a66cd336f341f8909b02f329faff21: FileNotFoundError(2, 'No such file or directory')
warnings.warn('resource_tracker: %s: %r' % (name, e))
A closer look at the EEG pipeline outputs
Let’s have a closer look at the outputs that the EEG pipeline produces in the derivatives/cmp-v3.1.0
derivatives directory.
First of all, connectomemapper works in such a way that the pipeline is first assembled and only afterwards, it is executed. During the assembly stage, input and output variables are connected and CMP3 produces a graph that visualizes this.
[15]:
%matplotlib inline
path_to_svg = os.path.join(
output_dir, __nipype_directory__, participant_label, 'eeg_pipeline','graph.svg'
)
display(SVG(filename=path_to_svg))
You can see three blue boxes that represent the different stages of the pipeline flow:
* EEG preprocessing stage
* EEG source imaging stage
* EEG connectome stage
Each of the stages, again, has an input and and output node, as well as several nodes representing processing steps. Each processing step has its own “interface” which you can find in cmtklib/interfaces
(“mne” in parentheses indicates that they are defined in the file mne.py).
eeg_datasource
is the input BIDSDataGrabber node and eeg_datasinker
is the output DataSinker node. datasource
takes care of querying and injecting the input files in the different stages of the EEG pipeline. eeg_sinker
is taking care of collecting, moving, and renaming all the files produced by the different stages to the derivatives/cmp-v3.1.0
directory.
In the following, we will go over the interfaces and show what output they produce.
EEG preprocessing stage
The preprocessing stage consists of converting EEGLab .set
EEG files to MNE Epochs in .fif
format, the format used in the rest of the pipeline by calling, if necessary the following interface:
EEGLAB2fif
: Read EEGLab data and converts them to MNE format (.fif file extension).
The information given by the config file regarding this stage is as follows:
[...]
"eeg_preprocessing_stage": {
"task_label": "faces",
"eeg_ts_file.extension": "set",
"eeg_ts_file.toolbox_derivatives_dir": "eeglab-v14.1.1",
"eeg_ts_file.datatype": "eeg",
"eeg_ts_file.suffix": "eeg",
"eeg_ts_file.desc": "preproc",
"eeg_ts_file.task": "faces",
"events_file.datatype": "eeg",
"events_file.suffix": "events",
"events_file.extension": "tsv",
"events_file.task": "faces",
"electrodes_file_fmt": "Cartool",
"cartool_electrodes_file.toolbox_derivatives_dir": "cartool-v3.80",
"cartool_electrodes_file.datatype": "eeg",
"cartool_electrodes_file.suffix": "eeg",
"cartool_electrodes_file.extension": "xyz",
"t_min": -0.2,
"t_max": 0.5
},
[...]
EEGLAB2fif
If your data are not already in MNE format (.fif
file extension), they have to be read and re-saved. The eeglab2fif interface does this for EEGLAB-format data (.set
file extension).
The interface produces a file named sub-01_epo.fif
in the derivatives/cmp-v3.0.3
folder.
Critically, the saved epochs contain a montage, i.e. the sensor locations which have to be supplied in a file names sub-01.xyz
inside the subject’s EEGLAB derivatives folder (derivatives/eeglab-v14.1.1/sub-01/eeg/sub-01.xyz
). Not sure it still applied :)
[16]:
# Let's have a look at the EEG data
with warnings.catch_warnings(): # suppress some irrelevant warnings coming from mne.read_epochs_eeglab()
warnings.simplefilter("ignore")
epochs_eeglab = mne.read_epochs_eeglab(
os.path.join(output_dir, __eeglab_directory__,
participant_label, 'eeg',
participant_label + f'_task-{task_label}_desc-preproc_eeg.set')
) # sub-01_FACES_250HZ_prepd.set
# eeglab2fif removes a baseline and crops the epochs according to parameters start_t and end_t in config file
start_t = -0.2
end_t = 0.6
epochs_eeglab.apply_baseline((start_t, 0))
epochs_eeglab.crop(tmin=start_t, tmax=end_t)
evoked_eeglab = epochs_eeglab.average().pick('eeg')
# compare to what eeglab2fif saved
epochs_mne = mne.read_epochs(
os.path.join(output_dir, __cmp_directory__,
participant_label, 'eeg',
participant_label + f'_task-{task_label}_epo.fif'))
evoked_mne = epochs_mne.average().pick('eeg')
Extracting parameters from /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/eeglab-v14.1.1/sub-01/eeg/sub-01_task-faces_desc-preproc_eeg.set...
Not setting metadata
Not setting metadata
588 matching events found
No baseline correction applied
0 projection items activated
Ready.
Applying baseline correction (mode: mean)
Reading /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/sub-01_task-faces_epo.fif ...
Read a total of 1 projection items:
Average EEG reference (1 x 128) idle
Found the data of interest:
t = -200.00 ... 500.00 ms
0 CTF compensation matrices available
Not setting metadata
Not setting metadata
588 matching events found
No baseline correction applied
Created an SSP operator (subspace dimension = 1)
1 projection items activated
[17]:
# plot and convince yourself it's the same
%matplotlib inline
fig = plt.figure()
plt.rcParams['figure.figsize'] = (15, 10)
_ = evoked_mne.plot(time_unit='s')
fig = plt.figure()
plt.rcParams['figure.figsize'] = (15, 10)
_ = evoked_eeglab.plot(time_unit='s')
<Figure size 432x288 with 0 Axes>
<Figure size 1080x720 with 0 Axes>
EEG source imaging stage
This stage takes your data in fif format from the “Preprocessing Stage”, the parcellation, and the previously generated electrode transform file as inputs. With the aim to compute inverse solutions and extract ROI time courses with MNE, its workflow consists of five processing interfaces, :
CreateBEM
: Create the boundary element method.CreateSrc
: Create the dipole locations along the surface of the brain.CreateFwd
: Create the forward solution (leadfield) from the BEM and the source space.CreateCov
: Create the noise covariance matrix from the data.MNEInverseSolutionROI
: Create the actual inverse operator and applies it, resulting in ROI-time courses.
The following possible EEG source imaging algorithms can be used for computing the inverse solutions: “sLORETA”, “eLORETA”, “MNE”, and “dSPM”. The configuration file of this tutorial is set to use “sLORETA”.
The information given by the config file regarding this stage is as follows:
[...]
"eeg_source_imaging_stage": {
"esi_tool": "MNE",
"mne_apply_electrode_transform": true,
"mne_electrode_transform_file.toolbox_derivatives_dir": "cmp-v3.1.0",
"mne_electrode_transform_file.datatype": "eeg",
"mne_electrode_transform_file.suffix": "trans",
"mne_electrode_transform_file.extension": "fif",
"parcellation_scheme": "Lausanne2018",
"lausanne2018_parcellation_res": "scale1",
"mne_esi_method": "sLORETA",
"mne_esi_method_snr": 3.0
},
[...]
CreateBEM
The BEM (boundary element model) is the head model we use, in our case, it is based on the individual’s structural MRI and, again, related freesurfer derivatives. Its creation consists of two steps:
The necessary surfaces (brain, inner skull, outer skull, and outer skin) are extracted using
mne.bem.make_watershed_bem()
. The surfaces are saved in the subject’s freesurfer-directory in a new folderbem/
watershed.The model itself is created using
mne.make_bem_model()
andmne.make_bem_solution()
. In this step, the surfaces and the tissue conductivities between the surfaces are used.
[18]:
# Let's visualize the BEM surfaces and source space
src = mne.read_source_spaces(
os.path.join(
output_dir,__cmp_directory__,
participant_label, 'eeg', participant_label + f'_task-{task_label}_src.fif'))
# plot will appear in separate window
%matplotlib qt
# lines are the surfaces, pink dots are the sources (dipoles)
_=mne.viz.plot_bem(
subject=participant_label,
subjects_dir=project.freesurfer_subjects_dir,
brain_surfaces='white',
src=src,
orientation='sagittal'
)
Reading a source space...
Computing patch statistics...
Patch information added...
Distance information added...
[done]
Reading a source space...
Computing patch statistics...
Patch information added...
Distance information added...
[done]
2 source spaces read
Using surface: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/freesurfer-7.1.1/sub-01/bem/inner_skull.surf
Using surface: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/freesurfer-7.1.1/sub-01/bem/outer_skull.surf
Using surface: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/freesurfer-7.1.1/sub-01/bem/outer_skin.surf
CreateSrc
MNE is able to create volume- and surface-based source spaces, but in our pipeline, we use surface-based only.
In order to do this, MNE takes advantage of the Freesurfer-created outputs in the derivatives/freesurfer-7.1.1
derivatives directory.
CreateFwd
MNE first computes a forward solution that describes how electrical currents propagate from the sources created earlier (via createsrc) through the tissues of the head modelled by the BEM (created via createbem) to the electrodes. Thus, the electrode positions have to be known and be aligned to the head model.
[19]:
# Let's check the alignment between MRI and electrode positions.
trans = mne.read_trans(
os.path.join(
output_dir, __cmp_directory__,
participant_label, 'eeg', participant_label + '_trans.fif'
)
)
mne.viz.plot_alignment(
epochs_mne.info,
trans=trans,
subject=participant_label,
subjects_dir=project.freesurfer_subjects_dir,
dig=False,
surfaces=dict(head=0.95),
coord_frame='mri')
Using pyvistaqt 3d backend.
Using outer_skin.surf for head surface.
Channel types:: eeg: 128
[19]:
<mne.viz.backends._pyvista._Figure at 0x7fc713dd9710>
CreateCov
MNE uses an estimate of signal to noise ratio in its creation of the inverse solution. For that, it considers the pre-stimulus period of the EEG recordings.
[20]:
# Let's have a look at the noise covariance.
%matplotlib inline
noise_cov = mne.read_cov(
os.path.join(
output_dir, __cmp_directory__,
participant_label, 'eeg', participant_label + f'_task-{task_label}_noisecov.fif'
)
)
fig_cov, fig_spectra = mne.viz.plot_cov(noise_cov, epochs_mne.info)
128 x 128 full covariance (kind = 1) found.
Read a total of 1 projection items:
Average EEG reference (1 x 128) active
Computing rank from covariance with rank=None
Using tolerance 1.2e-14 (2.2e-16 eps * 128 dim * 0.43 max singular value)
Estimated rank (eeg): 127
EEG: rank 127 computed from 128 data channels with 0 projectors
MNEInverseSolutionROI
Now, everything comes together to create the inverse operator, which is then applied to the EEG data to create source time courses. In the last step, the source time courses are converted to ROI-time courses according to the selected parcellation.
The outputs that are necessary for this step to work were created in the previous processing steps, namely:
the EEG epochs in
.fif
formatthe electrode montage
the head model
the source point locations
the forward operator
the noise covariance
First, the inverse operator is created using mne.minimum_norm.make_inverse_operator()
. We use the options loose=1
, depth=None
, and fixed=False
to obtain full 3-dimensional dipoles whose orientation is not fixed or constrained to be (somewhat) orthogonal to surface; and we are not applying any depth weighting. The solution is finally written to a file sub-01_task-faces_inv.fif
in the same directory as the other outputs (derivatives/cmp-v3.1.0/sub-01/eeg
).
In a subsequent step in the same interface, this inverse operator is then applied to the epochs (not the evoked time course averaged over trials) using mne.minimum_norm.apply_inverse_epochs.
The final step performed by this interface and by the EEG pipeline is to use mne.extract_label_time_course to create ROI-time courses according to mne.read_labels_from_annot()
. As given in the config file, we use “lausanne2008” scale 1, which is the Desikan-atlas. The time courses and the ROI-names are stored in sub-01_task-faces_atlas-L2018_res-scale1_timeseries.pickle
in pickle format.
Let’s have a look at the time courses.
[21]:
# Load the generated ROI time series file
roi_ts_fname = participant_label + f'_task-{task_label}_atlas-L2018_res-scale1_timeseries.pickle'
roi_ts_file = os.path.join(
output_dir, __cmp_directory__,
participant_label, 'eeg', roi_ts_fname
)
with open(roi_ts_file, 'rb') as f:
rtc_epo = pickle.load(f)
# For some reason, MNE writes label time courses as lists. convert to numpy array
rtc_epo['data'] = np.array(rtc_epo['data'])
[22]:
# Sort labels to make the time courses look nicer
N = len(rtc_epo['labels']) - 2 # two "unknown" regions - do not plot
sorting = list(np.arange(0, N, 2)) + list(np.arange(1, N, 2)) # left and right always alternating
# List of ROI names
labels_list_left = [i.name for i in rtc_epo['labels'][0::2] if i.name != 'unknown -lh']
labels_list_right = [i.name for i in rtc_epo['labels'][1::2] if i.name != 'unknown -rh']
labels_list = labels_list_left + labels_list_right
[23]:
# Plot
%matplotlib inline
to_plot = np.mean(rtc_epo['data'][:, :-2, :], axis=0)
vminmax = np.max(abs(to_plot))
plt.rcParams['figure.figsize'] = (15, 10)
plt.imshow(
to_plot[sorting, :],
aspect='auto',
extent=[-200, 600, 0, 67],
interpolation='None',
vmin=-vminmax,
vmax=vminmax,
cmap='PiYG'
);
plt.xlabel('ms')
plt.ylabel('ROIs')
cbar = plt.colorbar()
cbar.set_label('source activity (a.u.)')
locs = np.arange(0, N)
_ = plt.yticks(locs, labels_list[-1::-1] )
We can see that some of the time courses are “flipped” (have the opposite sign of the others). We will not address this problem here, but this is because of the step where dipole time courses are summarized for each brain region, using PCA. The direction of the resulting vector is not uniquely defined.
This leads us to the last stage of the pipeline, the “Connectome Stage”.
EEG connectome stage
This stage aims to map the connectome from the extracted ROI time series and consists of one processing step:
MNESpectralConnectivity
: Compute frequency- and time-frequency-domain connectivity measures and save the connectom files in different format.
The information given by the config file regarding this stage is as follows:
[...]
"eeg_connectome_stage": {
"connectivity_metrics": [
"coh",
"cohy",
"imcoh",
"plv",
"ciplv",
"ppc",
"pli",
"wpli",
"wpli2_debiased"
],
"output_types": [
"tsv"
"gPickle",
"mat",
"graphml"
]
},
[...]
MNESpectralConnectivity
CMP3 uses MNE-Connectivity to compute the functional connectivity matrices. Results can be saved in the same formats (['tsv', 'gPickle', 'mat', 'graphml']
) as the diffusion MRI and resting-state fMRI pipelines.
Keep in mind that we only plot a single subject’s connectivity here, so it is not surprising if you do not see exactly what you would expect.
We can load the matrices in network format, by reading the gpickle files using Networkx:
[24]:
# Index the new CMP3 derivatives including the connectome files
# in the BIDSLayout representation
bids_layout.add_derivatives(os.path.join(project.base_directory, "derivatives", "cmp-v3.1.0"))
# Query the generated connectome gpickle file
bids_query = {
"subject": participant_label.split('-')[-1], # Keep the label only, e.g. "01"
"datatype": 'eeg',
"atlas": 'L2018',
"res": 'scale1',
"suffix": 'connectivity',
"extension": 'gpickle',
"return_type": 'filename'
}
cmat_file = bids_layout.get(**bids_query)[0] # BIDSLayout always return a list
# Load wpli2_debiased connectivity matrix from the connectome gpickle file
weight = "wpli2_debiased"
print(f'Load {weight} connectivity matrix from {cmat_file}')
G = nx.read_gpickle(cmat_file)
A_wpli2_debiased = nx.to_numpy_array(G, weight=weight)
A_wpli2_debiased
Load dataset_description for: /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0
Load wpli2_debiased connectivity matrix from /Users/sebastientourbier/Documents/GitHub/connectomemapper3/docs/notebooks/ds003505_demo/derivatives/cmp-v3.1.0/sub-01/eeg/sub-01_task-faces_atlas-L2018_res-scale1_conndata-network_connectivity.gpickle
[24]:
array([[ 0. , 0.00300068, -0.00054407, ..., 0.00141492,
-0.00075917, -0.00026943],
[ 0.00300068, 0. , 0.00172582, ..., 0.00125406,
-0.00034805, -0.00099333],
[-0.00054407, 0.00172582, 0. , ..., -0.0008333 ,
0.00116659, 0.00129021],
...,
[ 0.00141492, 0.00125406, -0.0008333 , ..., 0. ,
-0.00041457, 0.00171886],
[-0.00075917, -0.00034805, 0.00116659, ..., -0.00041457,
0. , 0.00133674],
[-0.00026943, -0.00099333, 0.00129021, ..., 0.00171886,
0.00133674, 0. ]])
Then, we can load and order the name of the labels from the dictionary storing the ROI timeseries results, and visualize the connectivity matrix in a pretty circular layout with MNE-Connectivity viz.plot_connectivity_circle()
as follows:
[25]:
%%time
label_names = [label.name for label in rtc_epo['labels']]
lh_labels = [name for name in label_names if name.endswith('lh')]
# Get the y-location of the label
label_ypos = list()
for name in lh_labels:
idx = label_names.index(name)
ypos = np.mean(rtc_epo['labels'][idx].pos[:, 1])
label_ypos.append(ypos)
# Reorder the labels based on their location
lh_labels = [label for (yp, label) in sorted(zip(label_ypos, lh_labels))]
# For the right hemi
rh_labels = [label[:-2] + 'rh' for label in lh_labels]
# Save the plot order and create a circular layout
node_order = list()
node_order.extend(lh_labels[::-1]) # reverse the order
node_order.extend(rh_labels)
node_angles = mnec.viz.circular_layout(label_names, node_order, start_pos=90,
group_boundaries=[0, len(label_names) / 2])
# Plot the graph using node colors from the FreeSurfer parcellation. We only
# show the 300 strongest connections.
# plot will appear in separate window
%matplotlib inline
mnec.viz.plot_connectivity_circle(A_wpli2_debiased, label_names, n_lines=300,
node_angles=node_angles, node_colors='r',
title='')
CPU times: user 8.77 s, sys: 47.8 ms, total: 8.82 s
Wall time: 8.41 s
[25]:
(<Figure size 576x576 with 2 Axes>, <PolarAxesSubplot:>)
This concludes the tutorial 🧠!
We hope you enjoy it and any feedback or suggestions to improve it are very welcome! Just please open a new issue on GitHub and share your thoughts with us.
[ ]: