mne.channels.Layout#

class mne.channels.Layout(box, pos, names, ids, kind)[source]#

Sensor layouts.

Layouts are typically loaded from a file using read_layout(). Only use this class directly if you’re constructing a new layout.

Parameters:
boxtuple of length 4

The box dimension (x_min, x_max, y_min, y_max).

posarray, shape=(n_channels, 4)

The unit-normalized positions of the channels in 2d (x, y, width, height).

nameslist of str

The channel names.

idsarray_like of int

The channel ids.

kindstr

The type of Layout (e.g. ‘Vectorview-all’).

Methods

copy()

Return a copy of the layout.

pick([picks, exclude, verbose])

Pick a subset of channels.

plot([picks, show_axes, show])

Plot the sensor positions.

save(fname[, overwrite])

Save Layout to disk.

copy()[source]#

Return a copy of the layout.

Returns:
layoutinstance of Layout

A deepcopy of the layout.

Notes

New in v1.7.

pick(picks=None, exclude=(), *, verbose=None)[source]#

Pick a subset of channels.

Parameters:
picksarray_like of str or int | slice | 'all' | None

Channels to include in the layout. Slices and lists of integers will be interpreted as channel indices. Can also be the string value 'all' to pick all channels. None (default) will pick all channels.

excludestr | int | array_like of str or int

Set of channels to exclude, only used when picks is set to 'all' or None. Exclude will not drop channels explicitly provided in picks.

verbosebool | str | int | None

Control verbosity of the logging output. If None, use the default verbosity level. See the logging documentation and mne.verbose() for details. Should only be passed as a keyword argument.

Returns:
layoutinstance of Layout

The modified layout.

Notes

New in v1.7.

plot(picks=None, show_axes=False, show=True)[source]#

Plot the sensor positions.

Parameters:
pickslist | slice | None

Channels to include. Slices and lists of integers will be interpreted as channel indices. None (default) will pick all channels. Note that channels in info['bads'] will be included if their indices are explicitly provided.

show_axesbool

Show layout axes if True. Defaults to False.

showbool

Show figure if True. Defaults to True.

Returns:
figinstance of matplotlib.figure.Figure

Figure containing the sensor topography.

Notes

New in v0.12.0.

Examples using plot:

Working with sensor locations

Working with sensor locations
save(fname, overwrite=False)[source]#

Save Layout to disk.

Parameters:
fnamepath-like

The file name (e.g. 'my_layout.lout').

overwritebool

If True, overwrites the destination file if it exists.

See also

read_layout

Examples using save:

Working with sensor locations

Working with sensor locations

Examples using mne.channels.Layout#

Working with sensor locations

Working with sensor locations

Visualizing epoched data

Visualizing epoched data