run

Import in python using from mcutils.scripts.MDE.fit_dispersion import run

mcutils.scripts.MDE.fit_dispersion.run(data, sidecar: mcutils.utils.sidecar.AcquisitionParams, indices=None, dti_vectors=None, include_S0=False, ncoils=False, noise_var=None, return_fitter=False, init_params=None)[source]

Fits the dispersing zeppelin model to the observed signal attenuation

Parameters
  • data – (N, M) array for N voxels and M gradient orientations

  • sidecar – describes the acquired data

  • indices – index of which shell each observation will be grouped into (default: all in the same shell)

  • dti_vectors – tuple with (V1, V2, and V3), i.e., 3 (N, 3) arrays

  • include_S0 – include a parameter representing S0 rather than letting it be submerged in MDprime

  • ncoils – Assumes a non-central chi model with 2 * ncoils dof for the noise rather than Gaussian

  • noise_var – noise variance (treated as variable if not set; not recommended)

  • return_fitter – debugging option to return the fitter

  • init_params – initial values for the parameters log(k1), log(k2), d2-d1, MD - log(S_0) / b (or MD if include_S0 is true), S0 if include_S0)

Returns

Tuple with:

  • Acquisition parameters per shell

  • best-fit parameters per shell in a pandas dataframe