params_to_error

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

mcutils.scripts.MDE.fit_dispersion.params_to_error(params, observed, bmat_list, include_S0=False, derivative=False)[source]

Computes the error between the predicted and observed signal attenuations

Parameters
  • params – (3 + 4/5 * N, ) array for N b-shells (see params_to_signal for more details)

  • observed – (N, ) list of array with the observed signal attenuations in each b-shell

  • bmat_list – (N, ) list of lists containing the b-matrices

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

  • derivative – also return the (3 + 4/5 * N, ) array with the error derivative

Returns

float with the Euclidean error