mne.channels.read_custom_montage#
- mne.channels.read_custom_montage(fname, head_size=0.095, coord_frame=None, *, verbose=None)[source]#
Read a montage from a file.
- Parameters:
- fnamepath-like
File extension is expected to be:
'.loc'
or'.locs'
or'.eloc'
(for EEGLAB files),'.sfp'
(BESA/EGI files),'.csd'
,'.elc'
,'.txt'
,'.csd'
,'.elp'
(BESA spherical),'.bvef'
(BrainVision files),'.csv'
,'.tsv'
,'.xyz'
(XYZ coordinates).- head_size
float
|None
The size of the head (radius, in [m]). If
None
, returns the values read from the montage file with no modification. Defaults to 0.095m.- coord_frame
str
|None
The coordinate frame of the points. Usually this is
"unknown"
for native digitizer space. Defaults to None, which is"unknown"
for most readers but"head"
for EEGLAB.New in v0.20.
- verbosebool |
str
|int
|None
Control verbosity of the logging output. If
None
, use the default verbosity level. See the logging documentation andmne.verbose()
for details. Should only be passed as a keyword argument.
- Returns:
- montageinstance of
DigMontage
The montage.
- montageinstance of
Notes
The function is a helper to read electrode positions you may have in various formats. Most of these format are weakly specified in terms of units, coordinate systems. It implies that setting a montage using a DigMontage produced by this function may be problematic. If you use a standard/template (eg. 10/20, 10/10 or 10/05) we recommend you use
make_standard_montage()
. If you can have positions in memory you can also usemake_dig_montage()
that takes arrays as input.
Examples using mne.channels.read_custom_montage
#
EEG source localization given electrode locations on an MRI