Fitter

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

Documentation

class mcutils.scripts.MDE.fit_dispersion.Fitter(data_list, bmat_list, include_S0=False, ncoils=0, noise_var=None)[source]
__init__(data_list, bmat_list, include_S0=False, ncoils=0, noise_var=None)[source]

Provides a fit for a single voxel

Parameters
  • data_list – (K,) length list with (M_k, ) array for K shells of N voxels with M_k acquisitions

  • bmat_list – (K,) length list with (M_k, 3, 3) array of b-matrices

  • include_S0 – if True include a parameter representing the S0 for every shell

  • ncoils – If set to non-zero: assumes a non-central model for the noise with 2 ncoils degrees of freedom rather than Gaussian

  • noise_var – Set to fix the noise variance rather than allow it to be a free parameters (only used if ncoils is non-zero)

Returns

best-fit parameters (same length as init_params)

Methods

iterate(init_params)

Iterates between fitting the individual shells and the angles

only_angle(init_params)

Fits only the angular parameters

per_shell(init_params)

Fits the parameters for every shell separately

single(init_params[, ignore_angle])

Provides a single fit to the full dataset at once

Attributes

nparams

nparams_per_shell

nshells