mne.channels.DigMontage

class mne.channels.DigMontage(hsp=<object object>, hpi=<object object>, elp=<object object>, point_names=<object object>, nasion=<object object>, lpa=<object object>, rpa=<object object>, dev_head_t=None, dig_ch_pos=<object object>, dig=None, ch_names=None)[source]

Montage for digitized electrode and headshape position data.

Warning

Montages are typically created using one of the helper functions in the See Also section below instead of instantiating this class directly.

Parameters
hsparray, shape (n_points, 3)

The positions of the headshape points in 3d. These points are in the native digitizer space. Deprecated, will be removed in 0.20.

hpiarray, shape (n_hpi, 3)

The positions of the head-position indicator coils in 3d. These points are in the MEG device space. Deprecated, will be removed in 0.20.

elparray, shape (n_hpi, 3)

The positions of the head-position indicator coils in 3d. This is typically in the native digitizer space. Deprecated, will be removed in 0.20.

point_nameslist, shape (n_elp)

The names of the digitized points for hpi and elp. Deprecated, will be removed in 0.20.

nasionarray, shape (1, 3)

The position of the nasion fiducial point. Deprecated, will be removed in 0.20.

lpaarray, shape (1, 3)

The position of the left periauricular fiducial point. Deprecated, will be removed in 0.20.

rpaarray, shape (1, 3)

The position of the right periauricular fiducial point. Deprecated, will be removed in 0.20.

dev_head_tarray, shape (4, 4)

A Device-to-Head transformation matrix.

dig_ch_posdict

Dictionary of channel positions given in meters. Deprecated, will be removed in 0.20.

New in version 0.12.

diglist of dict

The object containing all the dig points.

ch_nameslist of str

The names of the EEG channels.

Notes

New in version 0.9.0.

Attributes
coord_frame
dig_ch_pos
elp
hpi
hsp
lpa
nasion
point_names
rpa

Methods

__add__(self, other)

Add two DigMontages.

__hash__(self, /)

Return hash(self).

compute_dev_head_t(\*args, \*\*kwargs)

Warning

DEPRECATED: compute_dev_head_t is deprecated and will be removed in 0.20.

copy(self)

Copy the DigMontage object.

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.

__add__(self, other)[source]

Add two DigMontages.

__hash__(self, /)

Return hash(self).

compute_dev_head_t(*args, **kwargs)[source]

Warning

DEPRECATED: compute_dev_head_t is deprecated and will be removed in 0.20.

Compute the Neuromag dev_head_t from matched points.

copy(self)[source]

Copy the DigMontage object.

Returns
diginstance of DigMontage

The copied DigMontage instance.

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.

Examples using plot:

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.