oscillation_exp_decay(x, y, filter_window=5, filter_dim=2, freq_guess=None)[source]#

Get exponential decay parameter from oscillating signal.

This assumes following function form.

\[y(x) = e^{\alpha x} F(x),\]

where \(F(x)\) is arbitrary oscillation function oscillating at freq_guess. This function first applies a Savitzky-Golay filter to y value, then run scipy peak search to extract peak positions. If freq_guess is provided, the search function will be robust to fake peaks due to noise. This function calls exp_decay() function for extracted x and y values at peaks.


y values should contain more than one cycle of oscillation to use this guess approach.

  • x (ndarray) – Array of x values.

  • y (ndarray) – Array of y values.

  • filter_window (int) – Window size of Savitzky-Golay filter. This should be odd number.

  • filter_dim (int) – Dimension of Savitzky-Golay filter.

  • freq_guess (float | None) – Optional. Initial frequency guess of \(F(x)\).


Decay rate of signal.

Return type: