mne.channels.read_custom_montage

mne.channels.read_custom_montage(fname, head_size=0.095, unit='m')[source]

Read a montage from a file.

Parameters
fnamestr

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).

head_sizefloat | None

The size of the head in [m]. If none, returns the values read from the file with no modification. Defaults to 95mm.

Returns
montageinstance of DigMontage

The montage.

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 use make_dig_montage() that takes arrays as input.