dipy logo

Site Navigation

NIPY Community

Previous topic

dipy.io.dpy

Next topic

dipy.io.pickles

dipy.io.gradients

dipy.io.gradients.read_btable(fbtab)

Read b-table from the disk

B-table is a 2D array which contains b-values in the first column and b-vectors in the last column.

Parameters :

fbtab : str,

path of file with b-table

Returns :

bvals : array, (N,)

bvecs : array, (N, 3)

dipy.io.gradients.read_bvals_bvecs(fbvals, fbvecs)

Read b-values and b-vectors from the disk

Parameters :

fbvals : str

path of file with b-values, or None if you don’t want to read bvals

fbvecs : str

path of file with b-vectorsl, or None if you don’t want to read bvecs

Returns :

bvals : array, (N,) or None

bvecs : array, (N, 3) or None

Notes

Files can be either ‘.bvals’/’.bvecs’ or ‘.txt’ or ‘.npy’ (containing arrays stored with the appropriate values).