fitting.lpsvd2

fitting.lpsvd2(x, Y, eta=0.75, M=None, removeBias=False, refine=False)

Variation of LPSVD fitting function based on Barkhujisen et al, Journal of Magnetic Resonance 61, 465 (1985), which seems to be more robust for noisy data.

Use this function to extract the parameters of arbitrarily many exponentially decaying sinusoids from (noisy) time domain data (x,y) without prior knowledge of these parameters nor the exact number of oscillation frequencies.

Parameters:
  • x (array) – x-values / time axis.
  • Y (array) – Input data (same shape as x).
  • eta (float) – Ratio of number of points in sample to number of points used for LP (< 1).
  • M (int) – Model order = number of relevant singular values. If None, estimate automatically (default).
  • removeBias (bool) – If True, subtract the mean value of noise-related singular values before stripping.
  • refine (bool) – If True, run a standard least squares fitting after LPSVD to further refine the the LPSVD parameters.
Returns:

A set of coefficients for each sinusoid. The number of sinusoids is len(res) / 4. For each sinusoid the function returns

  • a amplitude,
  • b exponential decay rate,
  • f frequency (rad),
  • phi phase (rad).

Note

The resulting array can be directly used as input to sinusoids() and sinusoidsFT().

See also

lpsvd().