Usage: mne anonymize [options]
show program’s version number and exit
show this help message and exit
Name of file to modify.
Name of anonymized output file.`anon-` prefix is added to FILE if not given
Keep the HIS tag (not advised)
Move dates in file backwards by this many days.
Overwrite input file.
To anonymize other file types call mne.io.anonymize_info()
on their
Info
objects and resave to disk.
$ mne anonymize -f sample_audvis_raw.fif
Usage: mne browse_raw raw [options]
show program’s version number and exit
show this help message and exit
Input raw FIF file (can also be specified directly as an argument without the –raw prefix)
Projector file
Disable all projectors
Events file
Time window for plotting (sec)
Initial start time for plotting
Number of channels to plot at a time
Order to use for grouping during plotting (‘type’ or ‘original’)
Preload raw data (for faster navigaton)
Show projection options dialog
Allow loading MaxShield processed data
Display high-pass filter corner frequency
Display low-pass filter corner frequency
Display filtering IIR order (or 0 to use FIR)
Enable trace clipping mode, either ‘clamp’ or ‘transparent’
Enable filtering cHPI signals.
Enable verbose mode (printing of log messages).
This uses mne.io.read_raw()
so it supports the same formats
(without keyword arguments).
$ mne browse_raw sample_audvis_raw.fif \
--proj sample_audvis_ecg-proj.fif \
--eve sample_audvis_raw-eve.fif
Usage: mne bti2fiff [options]
show program’s version number and exit
show this help message and exit
Input data file name
Input config file name
Headshape file name
Name of the resulting fiff file
Compensatory rotation about Neuromag x axis, deg
Default translation, meter
4D ECG channel name
4D EOG channel names
Currently direct inclusion of reference channel weights is not supported. Please use 'mne_create_comp_data' to include the weights or use the low level functions from this module to include them by yourself.
The informed guess for the 4D name is E31 for the ECG channel and E63, E63 for the EOG channels. Please check and adjust if those channels are present in your dataset but ‘ECG 01’ and ‘EOG 01’, ‘EOG 02’ don’t appear in the channel names of the raw object.
$ mne bti2fiff --pdf C,rfDC -o my_raw.fif
Usage: mne clean_eog_ecg [options]
show program’s version number and exit
show this help message and exit
Input raw FIF file
Output raw FIF file
Remove EOG
Remove ECG
Suppress mne_process_raw output
$ mne clean_eog_ecg -i in_raw.fif -o clean_raw.fif -e -c
Usage: mne compare_fiff <file_a> <file_b>
show program’s version number and exit
show this help message and exit
$ mne compare_fiff test_raw.fif test_raw_sss.fif
Usage: mne compute_proj_ecg [options]
show program’s version number and exit
show this help message and exit
Input raw FIF file
Time before event in seconds
Time after event in seconds
Number of SSP vectors for gradiometers
Number of SSP vectors for magnetometers
Number of SSP vectors for EEG
Filter low cut-off frequency in Hz
Filter high cut-off frequency in Hz
Filter low cut-off frequency in Hz used for ECG event detection
Filter high cut-off frequency in Hz used for ECG event detection
Temporary file used during computation (to save memory)
Compute SSP after averaging
Use SSP projections from a fif file.
Number of taps to use for filtering
Number of jobs to run in parallel
Channel to use for ECG detection (Required if no ECG found)
Gradiometers rejection parameter in fT/cm (peak to peak amplitude)
Magnetometers rejection parameter in fT (peak to peak amplitude)
EEG rejection parameter in µV (peak to peak amplitude)
EOG rejection parameter in µV (peak to peak amplitude)
Add EEG average reference proj
Exclude the SSP projectors currently in the fiff file
Text file containing bad channels list (one per line)
ID to use for events
raw file to use for event detection
Start artifact detection after tstart seconds
QRS detection threshold. Between 0 and 1. Can also be ‘auto’ for automatic selection
$ mne compute_proj_ecg -i sample_audvis_raw.fif -c "MEG 1531" -a \
--l-freq 1 --h-freq 100 \
--rej-grad 3000 --rej-mag 4000 --rej-eeg 100
Usage: mne compute_proj_eog [options]
show program’s version number and exit
show this help message and exit
Input raw FIF file
Time before event in seconds
Time after event in seconds
Number of SSP vectors for gradiometers
Number of SSP vectors for magnetometers
Number of SSP vectors for EEG
Filter low cut-off frequency in Hz
Filter high cut-off frequency in Hz
Filter low cut-off frequency in Hz used for EOG event detection
Filter high cut-off frequency in Hz used for EOG event detection
Temporary file used during computation (to save memory)
Compute SSP after averaging
Use SSP projections from a fif file.
Number of taps to use for filtering
Number of jobs to run in parallel
Gradiometers rejection parameter in fT/cm (peak to peak amplitude)
Magnetometers rejection parameter in fT (peak to peak amplitude)
EEG rejection parameter in µV (peak to peak amplitude)
EOG rejection parameter in µV (peak to peak amplitude)
Add EEG average reference proj
Exclude the SSP projectors currently in the fiff file
Text file containing bad channels list (one per line)
ID to use for events
raw file to use for event detection
Start artifact detection after tstart seconds
Custom EOG channel(s), comma separated
$ mne compute_proj_eog -i sample_audvis_raw.fif -a \
--l-freq 1 --h-freq 35 \
--rej-grad 3000 --rej-mag 4000 --rej-eeg 100
or
$ mne compute_proj_eog -i sample_audvis_raw.fif -a \
--l-freq 1 --h-freq 35 \
--rej-grad 3000 --rej-mag 4000 --rej-eeg 100 \
--proj sample_audvis_ecg-proj.fif
to exclude ECG artifacts from projection computation.
Usage: mne coreg [options]
show program’s version number and exit
show this help message and exit
Subjects directory
Subject name
FIFF file with digitizer data for coregistration
Option for small screens: Combine the data source panel and the coregistration panel into a single panel with tabs.
Prevent the GUI from automatically guessing and changing the MRI subject when a new head shape source file is selected.
The opacity of the head surface, in the range [0, 1].
Use a high-resolution head surface.
Use a low-resolution head surface.
Head<->MRI transform FIF file (“-trans.fif”)
Interaction style to use, can be “trackball” or “terrain”.
Scale factor for the scene.
Use simplified OpenGL rendering
Enable verbose mode (printing of log messages).
$ mne coreg
Usage: mne flash_bem [options]
show program’s version number and exit
show this help message and exit
Subject name
Subjects directory
The 30-degree flip angle data. If no argument do not use flash30. If arguments are given, them as file names.
Path to the multiecho flash 5 images. Can be one file or one per echo.
Set if the Flash MRI images have already been registered with the T1.mgz file.
[DEPRECATED] Assume that the Flash MRI images have already been converted to mgz files
Run grad_unwarp with -unwarp <type> option on each of the converted data sets
Write over existing .surf files in bem folder
Show BEM model in 3D for visual inspection
Use copies instead of symlinks for surfaces
[DEPRECATED] The directory containing flash5.mgz files (defaults to $SUBJECTS_DIR/$SUBJECT/mri/flash/parameter_maps
$ mne flash_bem --subject=sample
$ mne flash_bem -s sample -n --registered -5 sample/mri/mef05.mgz -3 sample/mri/mef30.mgz
$ mne flash_bem -s sample -n --registered -5 sample/mri/flash/mef05_*.mgz -3 sample/mri/flash/mef30_*.mgz
This program assumes that FreeSurfer and MNE are installed and sourced properly.
This function extracts the BEM surfaces (outer skull, inner skull, and outer skin) from multiecho FLASH MRI data with spin angles of 5 and 30 degrees. The multiecho FLASH data can be input as .mgz or .nii files. This function assumes that the Freesurfer segmentation of the subject has been completed. In particular, the T1.mgz and brain.mgz MRI volumes should be, as usual, in the subject’s mri directory.
Usage: mne freeview_bem_surfaces [options]
show program’s version number and exit
show this help message and exit
Subject name
Subjects directory
Method used to generate the BEM model. Can be flash or watershed.
$ mne freeview_bem_surfaces -s sample
Usage: mne kit2fiff [options]
show program’s version number and exit
show this help message and exit
Input data file name
MEG Marker file name
Headshape points file name
Headshape file name
Colon Separated Stimulus Trigger Channels
Slope direction
Threshold value for trigger channels
Name of the resulting fiff file
Set logging level for terminal output to debug
$ mne kit2fiff --input input.sqd --output output.fif
Use without arguments to invoke GUI:
$ mne kt2fiff
Usage: mne make_scalp_surfaces [options]
show program’s version number and exit
show this help message and exit
Overwrite previously computed surface
The name of the subject
The MRI file to process using mkheadsurf.
Force creation of the surface even if it has some topological defects.
Threshold value to use with the MRI.
Subjects directory
Disable medium and sparse decimations (dense only)
Enable verbose mode (printing of log messages).
$ mne make_scalp_surfaces --overwrite --subject sample
Usage: mne maxfilter [options]
show program’s version number and exit
show this help message and exit
Input raw FIF file
Output FIF file (if not set, suffix ‘_sss’ will be used)
Head origin in mm, or a filename to read the origin from. If not set it will be estimated from headshape points
Filename to use for computed origin
Coordinate frame for head center (‘device’ or ‘head’)
List of static bad channels
Set automated bad channel detection (‘on’, ‘off’, ‘n’)
Skips raw data sequences, time intervals pairs in sec, e.g.: 0 30 120 150
Ignore program warnings
Apply the time-domain MaxST extension
MaxSt buffer length in sec
MaxSt subspace correlation
Transforms the data into the coil definitions of in_fname, or into the default frame
Estimates and compensates head movements in continuous raw data
Estimates and stores head position parameters, but does not compensate movements
Stores head position data in an ascii file
Sets head position update interval in ms
Subtracts hpi signals: sine amplitudes, amp + baseline, or switch off
Do not check initial consistency isotrak vs hpifit
Sets the basic line interference frequency (50 or 60 Hz)
Do not overwrite output file if it already exists
Additional command line arguments to pass to MaxFilter
$ mne maxfilter -i sample_audvis_raw.fif --st
This will apply MaxFilter with the MaxSt extension. The origin used by MaxFilter is computed by mne-python by fitting a sphere to the headshape points.
Usage: mne prepare_bem_model [options]
show program’s version number and exit
show this help message and exit
The name of the file containing the triangulations of the BEM surfaces and the conductivities of the compartments. The standard ending for this file is -bem.fif.
The name of the resulting file containing BEM solution (geometry matrix). It uses the linear collocation approach. The file should end with -bem-sof.fif.
Enable verbose mode (printing of log messages).
$ mne prepare_bem_model --bem sample-5120-5120-5120-bem.fif
Usage: mne report [options]
show program’s version number and exit
show this help message and exit
Path to folder who MNE-Report must be created
File from which info dictionary is to be read
File from which noise covariance is to be read
Time at which baseline correction starts for evokeds
Time at which baseline correction stops for evokeds
The subjects directory
The subject name
Do not open MNE-Report in browser
Overwrite html report if it already exists
Number of jobs to run in parallel
Integer factor used to decimate BEM plots
Image format to use (can be ‘png’ or ‘svg’)
Enable verbose mode (printing of log messages).
Before getting started with mne report
, make sure the files you want to
render follow the filename conventions defined by MNE:
Data object |
Filename convention (ends with) |
---|---|
raw |
-raw.fif(.gz), -raw_sss.fif(.gz), -raw_tsss.fif(.gz), _meg.fif(.gz), _eeg.fif(.gz), _ieeg.fif(.gz) |
events |
-eve.fif(.gz) |
epochs |
-epo.fif(.gz) |
evoked |
-ave.fif(.gz) |
covariance |
-cov.fif(.gz) |
trans |
-trans.fif(.gz) |
forward |
-fwd.fif(.gz) |
inverse |
-inv.fif(.gz) |
To generate a barebones report from all the *.fif files in the sample dataset, invoke the following command in a system (e.g., Bash) shell:
$ mne report --path MNE-sample-data/ --verbose
On successful creation of the report, it will open the HTML in a new tab in
the browser. To disable this, use the --no-browser
option.
TO generate a report for a single subject, give the SUBJECT
name and
the SUBJECTS_DIR
and this will generate the MRI slices (with BEM
contours overlaid on top if available):
$ mne report --path MNE-sample-data/ --subject sample --subjects-dir \
MNE-sample-data/subjects --verbose
To properly render trans
and covariance
files, add the measurement
information:
$ mne report --path MNE-sample-data/ \
--info MNE-sample-data/MEG/sample/sample_audvis-ave.fif \
--subject sample --subjects-dir MNE-sample-data/subjects --verbose
To render whitened evoked
files with baseline correction, add the noise
covariance file:
$ mne report --path MNE-sample-data/ \
--info MNE-sample-data/MEG/sample/sample_audvis-ave.fif \
--cov MNE-sample-data/MEG/sample/sample_audvis-cov.fif --bmax 0 \
--subject sample --subjects-dir MNE-sample-data/subjects --verbose
To generate the report in parallel:
$ mne report --path MNE-sample-data/ \
--info MNE-sample-data/MEG/sample/sample_audvis-ave.fif \
--subject sample --subjects-dir MNE-sample-data/subjects \
--verbose --jobs 6
For help on all the available options, do:
$ mne report --help
Usage: mne setup_forward_model [options]
show program’s version number and exit
show this help message and exit
Subject name (required)
Output file name. Use a name <dir>/<name>-bem.fif
The surface ico downsampling to use, e.g. 5=20484, 4=5120, 3=1280. If None, no subsampling is applied.
Defines the brain compartment conductivity. The default value is 0.3 S/m.
Defines the skull compartment conductivity. The default value is 0.006 S/m.
Defines the scalp compartment conductivity. The default value is 0.3 S/m.
Use a single compartment model (brain only) instead a three layer one (scalp, skull, and brain). If this flag is specified, the options –skullc and –scalpc are irrelevant.
Subjects directory
Enable verbose mode (printing of log messages).
$ mne setup_forward_model -s 'sample'
Usage: mne setup_source_space [options]
show program’s version number and exit
show this help message and exit
Subject name (required)
Output file name. Use a name <dir>/<name>-src.fif
morph the source space to this subject
The surface to use. (default to white)
Specifies the approximate grid spacing of the source space in mm. (default to 7mm)
use the recursively subdivided icosahedron to create the source space.
use the recursively subdivided octahedron to create the source space.
Subjects directory
The number of jobs to run in parallel (default 1). Requires the joblib package. Will use at most 2 jobs (one for each hemisphere).
Add distances. Can be “True”, “False”, or “patch” to only compute cortical patch statistics (like the –cps option in MNE-C; requires SciPy >= 1.3)
to write over existing files
Enable verbose mode (printing of log messages).
$ mne setup_source_space --subject sample
.. note : Only one of --ico, --oct or --spacing options can be set at the same
time. Default to oct6.
Usage: mne show_fiff <file>
show program’s version number and exit
show this help message and exit
provide information about this tag
$ mne show_fiff test_raw.fif
To see only tag 102:
$ mne show_fiff test_raw.fif --tag=102
Usage: mne show_info <file>
show program’s version number and exit
show this help message and exit
$ mne show_info sample_audvis_raw.fif
Usage: mne surf2bem [options]
show program’s version number and exit
show this help message and exit
Surface in Freesurfer format
FIF file produced
Surface Id (e.g. 4 for head surface)
$ mne surf2bem --surf ${SUBJECTS_DIR}/${SUBJECT}/surf/lh.seghead \
--fif ${SUBJECTS_DIR}/${SUBJECT}/bem/${SUBJECT}-head.fif \
--id=4
Usage: mne sys_info
show program’s version number and exit
show this help message and exit
Show module paths
Show additional developer module information
$ mne sys_info
Usage: mne watershed_bem [options]
show program’s version number and exit
show this help message and exit
Subject name (required)
Subjects directory
Write over existing files
Defaults to T1
Specify the –atlas option for mri_watershed
Specify the –brain_atlas option for mri_watershed
Change the preflood height
Use copies instead of symlinks for surfaces
Whether or not to pass the -T1 flag (can be true, false, 0, or 1). By default it takes the same value as gcaatlas.
The filename for the brainmask output file relative to the $SUBJECTS_DIR/$SUBJECT/bem/watershed/ directory.
Enable verbose mode (printing of log messages).
$ mne watershed_bem -s sample
Usage: mne what fname [fname2 ...]
show program’s version number and exit
show this help message and exit
$ mne what sample_audvis_raw.fif
raw