BrainObj.add_activation(self, 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)

dataarray_like | None

Vector array of data of shape (n_data,).

verticesarray_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_stepsint | 20

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

filestring | 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_underfloat | None

Hide activations under a certain threshold.

n_contoursint | None

Display activations as contour.

cmapstring | ‘viridis’

The colormap to use.

climtuple | None

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

vminfloat | None

Minimum threshold.

vmaxfloat | None

Maximum threshold.

understring/tuple/array_like | ‘gray’

The color to use for values under vmin.

overstring/tuple/array_like | ‘red’

The color to use for values over vmax.