BrainObj.add_activation(data=None, vertices=None, smoothing_steps=20, file=None, hemisphere=None, hide_under=None, n_contours=None, cmap='viridis', clim=None, vmin=None, vmax=None, under='gray', over='red')[source][source]

Add activation to the brain template.

This method can be used for :

  • Add activations to specific vertices (data and vertices)
  • Add an overlay (file input)
data : array_like | None

Vector array of data of shape (n_data,).

vertices : array_like | None

Vector array of vertices of shape (n_vtx). Must be an array of integers.

smoothing_steps : int | 20

Number of smoothing steps (smoothing is used if n_data < n_vtx)

file : string | None

Full path to the overlay file.

hemisphrere : {None, ‘both’, ‘left’, ‘right’}

The hemisphere to use to add the overlay. If None, the method try to inferred the hemisphere from the file name.

hide_under : float | None

Hide activations under a certain threshold.

n_contours : int | None

Display activations as contour.

cmap : string | ‘viridis’

The colormap to use.

clim : tuple | None

The colorbar limits. If None, (data.min(), data.max()) will be used instead.

vmin : float | None

Minimum threshold.

vmax : float | None

Maximum threshold.

under : string/tuple/array_like | ‘gray’

The color to use for values under vmin.

over : string/tuple/array_like | ‘red’

The color to use for values over vmax.