Calculate the Inter-Subject Correlation (ISC)

neurora.isc_cal module

a module for calculating the inter-subject correlation based on neural data

neurora.isc_cal.isc(data, time_win=5, time_step=5)

Calculate the inter subject correlation (ISC) for EEG-like data

Parameters
  • data (array) – The neural data. The shape of data must be [n_subs, n_chls, n_ts]. n_subs, n_chls, n_ts represent the number of subjects, the number of channels and the number of time-points.

  • time_win (int. Default is 5.) – Set a time-window for calculating the STPS for different time-points. If time_win=5, that means each calculation process based on 5 time-points.

  • time_step (int. Default is 5.) – The time step size for each time of calculating.

Returns

isc – The ISC. The shape of isc is [n_subs!/(2!*(n_subs-2)!), n_chls, int((n_ts-time_win)/time_step)+1, 2]. n_subs, n_chls, n_ts represent the number of subjects, the number of channels and the number of time-points. 2 represents a r-value and a p-value.

Return type

array

Notes

In ISC, correlation computing process will be done for each pair of subjects.

neurora.isc_cal.isc_fmri(fmri_data, ksize=[3, 3, 3], strides=[1, 1, 1])

Calculate the inter subject correlation (ISC) for fMRI (searchlight)

Parameters
  • fmri_data (array) – The fmri data. The shape of fmri_data must be [n_ts, n_subs, nx, ny, nz]. n_ts, nx, ny, nz represent the number of time-points, the number of subs & the size of fMRI-img, respectively.

  • ksize (array or list [kx, ky, kz]. Default is [3, 3, 3].) – The size of the calculation unit for searchlight. kx, ky, kz represent the number of voxels along the x, y, z axis. kx, ky, kz should be odd.

  • strides (array or list [sx, sy, sz]. Default is [1, 1, 1].) – The strides for calculating along the x, y, z axis.

Returns

isc – The ISC. The shape of isc is [n_ts, n_subs!/(2!*(n_subs-2)!), n_x, n_y, n_z, 2]. n_ts, n_subs, n_x, n_y, n_z represent the number of time-points, the number of subjects, the number of calculation units for searchlight along the x, y, z axis. 2 represent a r-value and a p-value.

Return type

array

Notes

The size of the calculation units should at least be [3, 3, 3]. In ISC, correlation computing process will be done for each pair of subjects.

neurora.isc_cal.isc_fmri_roi(fmri_data, mask_data)

Calculate the inter subject correlation (ISC) for fMRI (for ROI)

Parameters
  • fmri_data (array) – The fmri data. The shape of fmri_data must be [n_ts, n_subs, nx, ny, nz]. n_ts, nx, ny, nz represent the number of time-points, the number of subs & the size of fMRI-img, respectively.

  • mask_data (array [nx, ny, nz].) – The mask data for region of interest (ROI). The size of the fMRI-img. nx, ny, nz represent the number of voxels along the x, y, z axis.

Returns

isc – The ISC. The shape of corrs is [n_ts, n_subs!/(2!*(n_subs-2)!), 2]. n_ts, n_subs represent the number of time-points, the number of subjects. 2 represent a r-value and a p-value.

Return type

array

Notes

The size of the calculation units should at least be [3, 3, 3].

Notes

In ISC, correlation computing process will be done for each pair of subjects.