dcmri.vfa_nonlinear#

dcmri.vfa_nonlinear(signal_intensities, flip_angles_deg, tr, bounds=None, verbose=0)[source]#

Calculates R1 and S0 from VFA data using a NON-LINEAR fit.

This function fits the data directly to the SPGR signal equation: S(a) = S0 * sin(a) * (1 - exp(-TR*R1)) / (1 - cos(a) * exp(-TR*R1))

This method can be more stable and accurate than the linear fit, especially in the presence of noise.

Parameters:
  • signal_intensities (list or np.ndarray) – A list or array of measured signal intensities.

  • flip_angles_deg (list or np.ndarray) – A list or array of corresponding flip angles in degrees.

  • tr (float) – The repetition time (TR) of the sequence.

  • bounds (tuple) – bounds on (R1, S0) as a tuple ([lower_R1, lower_S0], [upper_R1, upper_S0]). Default is ([0, 0], [np.inf, np.inf])

  • verbose (int) – if set to 1, warning messages are printed. Defaults to 0.

Returns:

A tuple containing the calculated (R1, S0).

Returns initial guesses if the non-linear fit fails to converge.

Return type:

tuple