neuromodes.eigen.EigenSolver

class neuromodes.eigen.EigenSolver(surf: str | Path | Trimesh | TriaMesh | dict, mask: ArrayLike | None = None, normalize: bool = False, hetero: ArrayLike | None = None, alpha: float | None = None, scaling: str | None = None)

EigenSolver class for spectral analysis and simulation on surface meshes.

This class computes the Laplace-Beltrami operator (LBO) [1] on a triangular mesh via the Finite Element Method [2][3], which discretizes the eigenvalue problem according to mass and stiffness matrices. It also provides an option to incorporate spatial heterogeneity via the generalised LBO [4].

Parameters

surfstr, pathlib.Path, trimesh.Trimesh, lapy.TriaMesh, or dict

The surface mesh to be used. Can be a file path to a supported format (see io.read_surf), a supported mesh object, or a dictionary with ‘vertices’ and ‘faces’ keys.

maskarray-like, optional

A boolean mask to exclude certain points (e.g., medial wall) from the surface mesh. Vertices labelled as False in the mask will be excluded. Default is None.

normalizebool, optional

Whether to normalize the surface mesh to have unit surface area and centroid at the origin (modifies the vertices). Default is False.

heteroarray-like, optional

A heterogeneity map to scale the Laplace-Beltrami operator. Default is None.

alphafloat, optional

Scaling parameter for the heterogeneity map. If a heterogenity map is specified, the default is 1.0. Otherwise, this value is ignored (and is set to None).

scalingstr, optional

Scaling function to apply to the heterogeneity map. Must be ‘sigmoid’ or ‘exponential’. If a heterogenity map is specified, the default is ‘sigmoid’. Otherwise, this value is ignored (and is set to None).

Raises

ValueError

If hetero length does not match the number of vertices (masked or unmasked).

ValueError

If scaling is not ‘sigmoid’ or ‘exponential’ (raised by scale_hetero).

ValueError

If hetero is constant (raised by scale_hetero).

References