NeuroGraph Utilities

construct_adj(corr, threshold=5)[source]

create adjacency matrix from functional connectome matrix

Args:

corr (n x n numpy matrix): functional connectome matrix

Threshold (int (1- 100)): threshold for controling graph density.

the more higher the threshold, the more denser the graph. default: 5

construct_corr(m)[source]

This function construct correlation matrix from the preprocessed fmri matrix Args.

m (numpy array): a preprocessed numpy matrix return: correlation matrix

construct_data(corr, label, threshold=5)[source]

create pyg data object from functional connectome matrix. We use correlation as node features Args:

corr (n x n numpy matrix): functional connectome matrix

Threshold (int (1- 100)): threshold for controling graph density.

the more higher the threshold, the more denser the graph. default: 5

parcellation(fmri, n_rois=1000)[source]

Prepfrom brain parcellation

Args:

fmri (numpy array): fmri image rois (int): {100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}, optional, Number of regions of interest. Default=1000.

preprocess(fmri, regs, n_rois=1000)[source]

Preprocess fMRI data using NeuroGraph preprocessing pipeline

Args:

fmri (numpy array): fmri image regs (numpy array): regressor array rois (int): {100, 200, 300, 400, 500, 600, 700, 800, 900, 1000}, optional, Number of regions of interest. Default=1000.

regress_head_motions(Y, regs)[source]

This function regress out six rigid- body head motion parameters, along with their derivatives, from the fMRI data

Args: Y (numpy array)): fmri image regs (numpy array): movement regressor

remove_drifts(Y)[source]

This function removes the scanner drifts in the fMRI signals that arise from instrumental factors. By eliminating these trends, we enhance the signal-to-noise ratio and increase the sensitivity to neural activity.