eigenstrapping.geometry.calc_surface_eigenmodes

eigenstrapping.geometry.calc_surface_eigenmodes(surface_input_filename, mask_input, save_cut=False, num_modes=200, use_cholmod=False, remove_zero=True)[source]

Main function to calculate the eigenmodes of a cortical surface with application of a mask (e.g., to remove the medial wall).

Parameters:
  • surface_input_filename (str) – Filename of input surface with n_vertices

  • mask_input (str or 1D ndarray) – Filename of mask to be applied on the surface (e.g., cortex without medial wall, values = 1 for mask and 0 elsewhere)

  • save_cut (boolean) – Boolean to decide if the new surface with mask applied will be saved to a new surface file

  • num_modes (int) – Number of eigenmodes to be calculated

  • use_cholmod (bool, optional) – Spec to use cholesky libraries of scikit-sparse. Requires installation of scikit-sparse and libsuitesparse-dev.

Returns:

  • np.ndarray of shape=(num_modes,) – Eigenvalues computed on masked surface.

  • np.ndarray of shape=(n_vertices, num_modes) – Eigenmodes corresponding to eigenvalues computed on masked surface padded with zeros to match size of original surface (n_vertices)