BrainObj.add_activation(data=None, vertices=None, smoothing_steps=5, 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 vertex indices of shape (n_vtx). Must be an array of integers. If hemisphere is ‘left’ or ‘right’ indexation is done with respect to the specified hemisphere.

smoothing_steps : int | 20

Number of smoothing steps (smoothing is used if n_data < n_vtx). If None or 0, no smoothing is performed.

file : string | None

Full path to the overlay file. Can either be a nii.gz or gii file.

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

The hemisphere to use to add the overlay. If None, the method tries to infer 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.