fitting.sinusoids

fitting.sinusoids(x, *p)

A sum over a variable number of decaying sinusoids.

Parameters:
  • x (array) – x-values.
  • p (variable) –

    Coefficients of sinusoids. For each term provide

    • a amplitude,
    • b exponential decay rate ( = 1 / decay time),
    • f0 oscillation frequency (rad),
    • phi phase (rad).
Returns:

f(x) = \sum_i a_i e^{-x b_i} \cos( 2 \pi f_0 x + \phi ).

See also

This function is intended for use with lpsvd().