cmp.cli.visualize_eeg_pipeline_outputs module
This module defines the visualize_eeg_pipeline_outputs
script that loads and displays the different MNE outputs of the EEG pipeline.
Examples
Here are a few usage examples:
Show all electrode epochs
$ python cmp/cli/visualize_eeg_pipeline_outputs.py --epo_file /path/to/sub-01/eeg/sub-01_task-faces_epo.fifCarpet plot of ROI time series when using Cartool for ESI
$ python cmp/cli/visualize_eeg_pipeline_outputs.py --epo_file /path/to/sub-01/eeg/sub-01_task-faces_epo.fif --rtc_file /path/to/sub-01_task-faces_atlas-L2018_res-scale1_timeseries.npy --atlas_annot lausanne2018.scale1 --fs_subject sub-01 --fs_subjects_dir /path/to/derivatives/freesurfer-7.1.1 --roi_tsv_file /path/to/sub-01_atlas-L2018_res-scale1_dseg.tsvCarpet plot of ROI time series when using MNE for ESI
$ python cmp/cli/visualize_eeg_pipeline_outputs.py --epo_file /path/to/sub-01/eeg/sub-01_task-faces_epo.fif --rtc_file /path/to/sub-01_task-faces_atlas-L2018_res-scale1_timeseries.npy --atlas_annot lausanne2018.scale1 --fs_subject sub-01 --fs_subjects_dir /path/to/derivatives/freesurfer-7.1.1 --roi_tsv_file /path/to/sub-01_atlas-L2018_res-scale1_dseg.tsvDisplay BEM surfaces only on T1w
$ python cmp/cli/visualize_eeg_pipeline_outputs.py --bem_file /path/to/sub-01_task-faces_bem.fif --fs_subject sub-01 --fs_subjects_dir /path/to/derivatives/freesurfer-7.1.1Display BEM surfaces and source position on T1w
$ python cmp/cli/visualize_eeg_pipeline_outputs.py --bem_file /path/to/sub-01_task-faces_bem.fif --fs_subject sub-01 --fs_subjects_dir /path/to/derivatives/freesurfer-7.1.1 --src_file /path/to/sub-01_task-faces_src.fif
Plot the noise covariance
$ python cmp/cli/visualize_eeg_pipeline_outputs.py --epo_file /path/to/sub-01_task-faces_epo.fif --fs_subject sub-01 --fs_subjects_dir /path/to/derivatives/freesurfer-7.1.1 --noisecov_file /path/to/sub-01_task-faces_noisecov.fif
- cmp.cli.visualize_eeg_pipeline_outputs.create_parser()[source]
Create the argument parser of
visualize_eeg_pipeline_outputs
python script.- Returns
p – Argument parser
- Return type
- cmp.cli.visualize_eeg_pipeline_outputs.create_roi_labels(mean_rtc, fs_subject, fs_subjects_dir, atlas_annot, roi_tsv_file=None)[source]
Create list of labels depending on the employed EEG pipeline (Cartool vs. MNE).
- Parameters
mean_rtc (numpy.Array) – Numpy array containing the ROI time-series
fs_subject (str) – Freesurfer subject directory
fs_subjects_dir (str) – Freesurfer subjects directory
atlas_annot (str) – Basename of parcellation annotation file
roi_tsv_file (str) – Path to parcellation index/label mapping TSV file
- Returns
mean_rtc (numpy.Array) – Numpy array containing the ROI time-series
roi_labels (list) – List of ROI labels in the order of the rows of
mean_rtc
- cmp.cli.visualize_eeg_pipeline_outputs.main()[source]
Main function that load and display different outputs of the EEG pipeline using MNE visualization features.
- Returns
exit_code –
An exit code given to
sys.exit()
that can be:’0’ in case of successful completion
’1’ in case of an error
- Return type
{0, 1}