phys2cvr package

phys2cvr.workflows - Primary workflows

phys2cvr(fname_func[, fname_co2, ...])

Run main workflow of phys2cvr.

phys2cvr.regressors - Create regressors

create_legendre(degree, length)

Produce the Legendre polynomials of order degree.

compute_bulk_shift(func_upsampled, ...[, ...])

Compute (initial) bulk shift of regressor.

create_fine_shift_regressors(petco2hrf, ...)

Compute fine shifts to further optimize shifts.

create_physio_regressor(func_avg, petco2hrf, ...)

Create regressor(s) of interest for nifti GLM.

phys2cvr.stats - Statistics

R2MODEL

Built-in mutable sequence.

x_corr(func, co2[, n_shifts, offset, abs_xcorr])

Compute cross correlation between func and co2.

ols(Ymat, Xmat[, r2model, residuals, demean])

Perform Ordinary Least Squares (OLS) regression.

regression(data, regr[, denoise_mat, ...])

Estimate regression parameters.

phys2cvr.io - I/O functions: load

load_nifti_get_mask(fname[, is_mask, dim])

Load a nifti-like file and returns its data, its image, and a 3d mask.

load_txt(fname[, shape])

Read files in textual format.

load_mat(fname[, shape])

Read files in MATLAB format.

load_xls(fname[, shape])

Read files in xls format.

load_array(fname[, shape])

Read files in text-like format.

load_physio(fname)

Read peakdet and physiopy objects.

phys2cvr.io - I/O functions: export

export_regressor(regressors_matrix, ntp, ...)

Export generated regressors for fMRI analysis.

export_nifti(data, img, fname)

Export a nifti file.

phys2cvr.io - I/O functions: supported extensions

EXT_1D

Built-in mutable sequence.

EXT_MAT

Built-in mutable sequence.

EXT_ARRAY

Built-in mutable sequence.

EXT_PHYS

Built-in mutable sequence.

EXT_NIFTI

Built-in mutable sequence.

EXT_GIFTI

Built-in mutable sequence.

EXT_NIMG

Built-in mutable sequence.

EXT_ALL

Built-in mutable sequence.

phys2cvr.viz - Visualisations

plot_two_timeseries(ts1, ts2, outname[, ...])

Plot two timeseries.

plot_xcorr(xcorr, outprefix[, freq])

Plot Cross Correlation max and abs max values.

phys2cvr.utils - Utility functions

if_declared_force_type(var, dtype[, ...])

Make sure var is of type dtype.

check_ext(all_ext, fname[, scan, remove])

Check which extension a file has, and possibly remove it.

check_nifti_dim(fname, data[, dim])

Remove extra dimensions.

check_array_dim(fname, data[, shape])

Check dimensions of a matrix.

save_bash_call(fname, outdir)

Save the bash call into file p2d_call.sh.