nigsp package¶
nigsp.workflow
- Primary workflows¶
|
Main workflow for nigsp, following the methods described in [Ra554358f60f2-1]. |
nigsp.operations.graph
- Operations on graphs¶
|
Compute the amount of zero-crossing of an eigenvector matrix (for each eigenvector). |
|
Compute the node strength of a graph. |
nigsp.operations.laplacian
- Operations on/for Laplacians¶
|
Compute Laplacian (L) matrix from a square matrix. |
|
Normalise a Laplacian (L) matrix using either symmetric or random walk normalisation. |
|
Compute symmetric normalised Laplacian (SNL) matrix. |
|
Run a eigenvector decomposition on input. |
|
Recompose a matrix from its eigenvalues and eigenvectors. |
nigsp.operations.metrics
- Metrics computation¶
|
Compute the Structural Decoupling Index (SDI). |
|
Compute the generalised SDI. |
|
Compute Functional Connectivity of timeseries. |
nigsp.operations.nifti
- Operations on nifti-like data¶
|
Reshape <3D in 1D or 4D into 2D. |
|
Reshape nD data (normally 2D) using either shape or data shape). |
|
Reduce shape and size of data based on mask. |
|
Unmask 1D or 2D into an nD based on shape or asdata. |
|
Extract average timeseries from an atlas. |
|
Return a lower dimensional matrix into a 3- or 4- D matrix based on an atlas. |
nigsp.operations.surrogates
- Surrogate computations and testing¶
|
Create surrogates by randomly switching signs of eigenvectors. |
|
Create surrogates informed by the real structural connectivity. |
|
Create surrogates ignorant of the real structural connectivity. |
|
Test the significance of the empirical data against surrogates. |
nigsp.operations.timeseries
- Operations on/involving timeseries¶
|
Normalise given timeseries (i.e. mean=0, std=1). |
|
Express timeseries in signal percentage change. |
|
Demean timeseries. |
|
Rescale given timeseries between given max and min value. |
|
Rescale timeseries with some methods. |
|
Project a graph decomposition onto the timeseries. |
|
Find the frequency that splits the energy of a timeseries in two roughly equal parts. |
|
Filter a graph decomposition into two parts based on freq_idx. |
nigsp.io
- I/O functions: checks¶
|
Check which extension a file has, and possibly remove it. |
|
Check number of dimensions in nifti file. |
|
Check dimensions of a matrix. |
nigsp.io
- I/O functions: load¶
|
Load a nifti file and returns its data, its image, and a 3d mask. |
|
Read files in textual format. |
|
Read files in matlab format. |
|
Read files in xls format. |
nigsp.io
- I/O functions: export¶
|
Export a nifti file. |
|
Export data into a text-like or mat file. |
|
Export data into a text-like or mat file. |
nigsp.io
- I/O functions: supported extensions¶
nigsp.viz
- Visualisations¶
|
Create a connectivity matrix plot. |
|
Create a greyplot (a.k.a. |
|
Create a marker plot in the MNI space. |
|
Create a connectivity plot in the MNI space. |
nigsp.utils
- Utility functions¶
|
Recreate itertools.pairwise behaviour for python < 3.10 compatibility. |
|
Make sure var is of type dtype. |
|
Reshape data to have |
nigsp.objects
- Data objects¶
The main object of nigsp.
It holds all data information - graph, timeseries, decompositions, …
Contains duplications of operations, allowing a more object oriented approach to interact with nigsp.
Attributes¶
- LGR
Logger
|
Main module object, containing all data representing the graph. |
nigsp.blocks
- Workflow blocks¶
|
Read a nifti file and returns a normalised timeseries from an atlas. |
|
Export the metrics computed within the library. |
|
If possible, plot metrics as markerplot. |