mne.channels.DigMontage

class mne.channels.DigMontage(hsp=None, hpi=None, elp=None, point_names=None, nasion=None, lpa=None, rpa=None, dev_head_t=None, dig_ch_pos=None, coord_frame=’unknown’)[source]

Montage for digitized electrode and headshape position data.

Warning

Montages are typically loaded from a file using read_dig_montage() instead of instantiating this class.

Parameters:

hsp : array, shape (n_points, 3)

The positions of the headshape points in 3d. These points are in the native digitizer space.

hpi : array, shape (n_hpi, 3)

The positions of the head-position indicator coils in 3d. These points are in the MEG device space.

elp : array, shape (n_hpi, 3)

The positions of the head-position indicator coils in 3d. This is typically in the native digitizer space.

point_names : list, shape (n_elp)

The names of the digitized points for hpi and elp.

nasion : array, shape (1, 3)

The position of the nasion fidicual point.

lpa : array, shape (1, 3)

The position of the left periauricular fidicual point.

rpa : array, shape (1, 3)

The position of the right periauricular fidicual point.

dev_head_t : array, shape (4, 4)

A Device-to-Head transformation matrix.

dig_ch_pos : dict

Dictionary of channel positions.

New in version 0.12.

coord_frame : str

The coordinate frame of the points. Usually this is “unknown” for native digitizer space.

Notes

New in version 0.9.0.

Methods

__hash__() <==> hash(x)
compute_dev_head_t() Compute the Neuromag dev_head_t from matched points.
plot([scale_factor, show_names, show]) Plot a montage.
save(fname) Save digitization points to FIF.
transform_to_head() Transform digitizer points to Neuromag head coordinates.
__hash__() <==> hash(x)
compute_dev_head_t()[source]

Compute the Neuromag dev_head_t from matched points.

plot(scale_factor=20, show_names=False, show=True)[source]

Plot a montage.

Parameters:

scale_factor : float

Determines the size of the points. Defaults to 20.

show_names : bool

Whether to show the channel names. Defaults to False.

show : bool

Show figure if True.

Returns:

fig : Instance of matplotlib.figure.Figure

The figure object.

save(fname)[source]

Save digitization points to FIF.

Parameters:

fname : str

The filename to use. Should end in .fif or .fif.gz.

transform_to_head()[source]

Transform digitizer points to Neuromag head coordinates.