Reference API
eigenstrapping - Null models
|
Compute the eigenmodes and eigenvalues of the surface in surface and resample the hypersphere bounded by the eigengroups contained within emodes, to reconstruct the data using coefficients conditioned on the original data Based on the degenerate solutions of solving the Laplace-Beltrami operator on the cortex. |
Compute the eigenmodes and eigenvalues of the volume in volume and resample the hypersphere bounded by the eigengroups contained within emodes, to reconstruct the data using coefficients conditioned on the original data Based on the degenerate solutions of solving the Laplace-Beltrami operator on the cortex. |
eigenstrapping.dataio - Data helpers
Data I/O for core classes. |
|
|
Load data contained in a CIFTI2-/GIFTI-format neuroimaging file. |
|
Load data stored in a GIFTI (.gii) neuroimaging file. |
eigenstrapping.datasets - Dataset fetchers
Downloads all surface files for fsaverage5 space |
|
Download and return the Allen Human Brain Atlas gene PC1 in fsaverage5 space. |
|
Downloads geodesic distance matrices. |
|
Loads all the files for the subcortical structures used in the paper - cortical-subcortical gradients and the subcortical ROIs from the 25% probability Harvard-Oxford atlas. |
|
|
Downloads files for brain surfaces and eigenmodes matching requested variables |
|
Export distance matrix to memory-mapped array. |
|
Load a memory-mapped array. |
eigenstrapping.fit - Variogram fits
Eigenmode resampling on the cortex. Use fit.surface_fit() to determine how many modes to use to capture the empirical variogram.
|
Evaluate variogram fits for :class: eigenstrapping.SurfaceEigenstrapping to determine how many modes to decompose surface map with. Returns two plots: left - variogram fit middle - surrogate pairwise correlation with original map x right - histogram of surrogate residuals with original map x. |
|
Evaluate variogram fits for :class: eigenstrapping.VolumetricEigenstrapping to determine how many modes to decompose volumetric map with. |
eigenstrapping.geometry - Mesh and eigenmode functions
Generate transformation matrix to switch between tetrahedral and volume space. |
|
Generate triangular mesh of the ROI in the nifti file. |
|
Write surface to a new vtk file. |
|
|
Calculate the eigenvalues and eigenmodes of a surface. |
Main function to calculate the eigenmodes of a cortical surface with application of a mask (e.g., to remove the medial wall). |
|
Mesh loader function. |
|
Compute the normal for each vertex in the mesh. |
|
|
Inflate the mesh using Connectome Workbench surface-inflation |
Find the one-nearest neighbors of vertices in points P on another surface X using Delaunay triangulation and KDTree query. |
|
Calculate the physical volume of the ROI in the nifti file. |
|
|
Normalize tetrahedral surface. |
Compute geodesic distance using the heat diffusion method built into LaPy |
|
Calculates Euclidean distance matrix of the mesh in mesh |
eigenstrapping.plotting - Plotting functions
Plotting subroutines
|
|
|
Automated plotting of cortical surfaces. |
|
Automated plotting of cortical surfaces. |
|
Automated plotting of surface in mesh. |
eigenstrapping.rotations - Random rotation functions
Generate random rotation matrices of arbitrary size and rotate matrices
|
|
|
Rotate an (n/m)-by-n matrix of arbitrary length n by the two methods as outlined in [1]. |
eigenstrapping.stats - Statistical functions
|
Compares images src and trg. |
|
Report the tail-estimated p-value for faster inference using a Generalized Pareto distribution. |
|
Compute the Mean Squared Logarithmic Error. |
Compute the joint differential entropy of x and y |
|
Calculates conditional entropy of an empirical array given a set of surrogates |
|
|
Computes KL divergence of surrs to empirical array |
Distance correlation between empirical and nulls. |
|
|
Measures difference in underlying distribution (or non-Gaussianity) of a surrogate dataset using the Kolmogorov-Smirnov test |
Multi-dimensional Spearman rank correlation between rows of X and Y. |
|
|
Multi-dimensional Pearson correlation between rows of X and Y. |
|
Compute pairwise Pearson correlations between rows of X. |
|
Compute two-sided non-parametric p-value. |
Normalize a vector to [0, 1] range. |
eigenstrapping.utils - Utility functions
Check whether obj behaves like a string. |
|
|
Returns an array of parcel labels for every vertex in the surface of annotation |
|
Returns CSchaefer 2018 atlases as dictionary |
|
Calculate parcellated data given (N,) parcellation for every vertex of shape (N,) |
Parcellate a dense distance matrix |
|
Reconstruct a dataset of n_vertices given a set of eigenmodes and coeffs conditioned on data using ordinary least squares (OLS) |
|
Decompose data using eigenmodes and calculate the coefficient of contribution of each vector |
|
Calculate surface-based connectivity matrix. |
|
Compute the axes of an ellipsoid given the eigenmodes. |
|
Transform the eigenmodes to a spheroid space |
|
Transform the eigenmodes in spheroid space back to ellipsoid by stretching |