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
hsparray, shape (n_points, 3)

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

hpiarray, shape (n_hpi, 3)

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

elparray, shape (n_hpi, 3)

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

point_nameslist, shape (n_elp)

The names of the digitized points for hpi and elp.

nasionarray, shape (1, 3)

The position of the nasion fidicual point.

lpaarray, shape (1, 3)

The position of the left periauricular fidicual point.

rpaarray, shape (1, 3)

The position of the right periauricular fidicual point.

dev_head_tarray, shape (4, 4)

A Device-to-Head transformation matrix.

dig_ch_posdict

Dictionary of channel positions given in meters.

New in version 0.12.

coord_framestr

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

Notes

New in version 0.9.0.

Methods

__hash__(self, /)

Return hash(self).

compute_dev_head_t(self)

Compute the Neuromag dev_head_t from matched points.

plot(self[, scale_factor, show_names, kind, …])

Plot a montage.

save(self, fname)

Save digitization points to FIF.

transform_to_head(self)

Transform digitizer points to Neuromag head coordinates.

__hash__(self, /)

Return hash(self).

compute_dev_head_t(self)[source]

Compute the Neuromag dev_head_t from matched points.

plot(self, scale_factor=20, show_names=False, kind='3d', show=True)[source]

Plot a montage.

Parameters
scale_factorfloat

Determines the size of the points.

show_namesbool

Whether to show the channel names.

kindstr

Whether to plot the montage as ‘3d’ or ‘topomap’ (default).

showbool

Show figure if True.

Returns
figinstance of matplotlib.figure.Figure

The figure object.

save(self, fname)[source]

Save digitization points to FIF.

Parameters
fnamestr

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

transform_to_head(self)[source]

Transform digitizer points to Neuromag head coordinates.