mne_icalabel.features.get_topomaps#

mne_icalabel.features.get_topomaps(ica, picks=None, res=64, image_interp='cubic', border='mean', extrapolate='auto')[source]#

Generate an array of scalp topographies for the picked components.

Parameters:
icaICA

MNE ICA decomposition.

picksint | list of int | slice | None

Indices of the independent components (ICs) to select. If an integer, represents the index of the IC to pick. Multiple ICs can be selected using a list of int or a slice. The indices are 0-indexed, so picks=1 will pick the second IC: ICA001. None (default) will pick all independent components in the order fitted.

resint

The resolution of the square topographic map (in pixels).

image_interpstr

The image interpolation to be used. All matplotlib options are accepted.

borderfloat | ‘mean’

Value to extrapolate to on the topomap borders. If 'mean' (default), then each extrapolated point has the average value of its neighbours.

extrapolatestr

Options:

  • 'box'

    Extrapolate to four points placed to form a square encompassing all data points, where each side of the square is three times the range of the data in the respective dimension.

  • 'local' (default for MEG sensors)

    Extrapolate only to nearby points (approximately to points closer than median inter-electrode distance). This will also set the mask to be polygonal based on the convex hull of the sensors.

  • 'head' (default for non-MEG sensors)

    Extrapolate out to the edges of the clipping circle. This will be on the head circle when the sensors are contained within the head circle, but it can extend beyond the head when sensors are plotted outside the head circle.

Returns:
topomapsdict of array of shape (n_components, n_pixels, n_pixels)

Dictionary of ICs topographic maps for each channel type.