Note

This page is a reference documentation. It only explains the function signature, and not how to use it. Please refer to the user guide for the big picture.

fmralign.embeddings.whole_brain.get_laplacian_embedding

fmralign.embeddings.whole_brain.get_laplacian_embedding(mask_img, k, sigma=1e-08)[source]

Computes the Laplacian embedding of a given mask image or surface mesh.

Given a mask image (Nifti1Image) or a surface mesh (InMemoryMesh), this function computes the Laplace-Beltrami eigenmodes on the vertices defined by the mask or mesh. It solves a generalized eigenvalue problem to return the first k eigenmodes.

Note: The zero-order eigenmode is skipped.

Parameters:
mask_imgNifti1Image or InMemoryMesh

Input mask image or surface mesh.

kint

Number of eigenmodes to compute.

sigmafloat, optional

Stability parameter passed to the sparse solver, by default 1e-8.

Returns:
evecsndarray of shape (k, n_vertices)

The computed Laplacian eigenmodes.