mne.channels.read_dig_montageΒΆ

mne.channels.read_dig_montage(hsp=None, hpi=None, elp=None, point_names=None, unit='mm', transform=True, dev_head_t=False)ΒΆ

Read digitization data from a file and generate a DigMontage

Parameters:

hsp : None | str | array, shape (n_points, 3)

If str, this corresponds to the filename of the headshape points. This is typically used with the Polhemus FastSCAN system. If numpy.array, this corresponds to an array of positions of the headshape points in 3d. These points are in the native digitizer space.

hpi : None | str | array, shape (n_hpi, 3)

If str, this corresponds to the filename of Head Position Indicator (HPI) points. If numpy.array, this corresponds to an array of HPI points. These points are in device space.

elp : None | str | array, shape (n_fids + n_hpi, 3)

If str, this corresponds to the filename of electrode position points. This is typically used with the Polhemus FastSCAN system. Fiducials should be listed first: nasion, left periauricular point, right periauricular point, then the points corresponding to the HPI. These points are in the native digitizer space. If numpy.array, this corresponds to an array of fids + HPI points.

point_names : None | list

If list, this corresponds to a list of point names. This must be specified if elp is defined.

unit : ‘m’ | ‘cm’ | ‘mm’

Unit of the input file. If not ‘m’, coordinates will be rescaled to ‘m’. Default is ‘mm’. This is applied only for hsp and elp files.

transform : bool

If True, points will be transformed to Neuromag space. The fidicuals, ‘nasion’, ‘lpa’, ‘rpa’ must be specified in the montage file. Useful for points captured using Polhemus FastSCAN. Default is True.

dev_head_t : bool

If True, a Dev-to-Head transformation matrix will be added to the montage. To get a proper dev_head_t, the hpi and the elp points must be in the same order. If False, an identity matrix will be added to the montage. Default is False.

Returns:

montage : instance of DigMontage

The digitizer montage.

Notes

All digitized points will be transformed to head-based coordinate system if transform is True and fiducials are present.

New in version 0.9.0.