exa.core.util.model_functions.get_square_pulse_response#
- get_square_pulse_response(square_pulse_length, decay_guess=None, amplitude_guess=None, offset_guess=None)#
Generates 1d fitter function for exponentially decaying response to a rectangular pulse.
The data is fitted to the model \(y(x) = A * (\exp(-x / d) -\exp(-\frac{L + x}{d}) + B\), where \(A\) = amplitude, \(d\) = decay, \(L\) is the length of the pulse, and \(B\) = offset.
- Parameters:
square_pulse_length (float) – Legnth of the used pulse.
decay_guess (float | None) – Initial guess for decay, if not provided, then calculated with
get_estimated_exponent(). If there is no valid result from the function, then defaults to 1/3 of the time axis.amplitude_guess (float | None) – Initial guess for amplitude, defaults to maximum of the data.
offset_guess (float | None) – Initial guess for offset, defaults to minimum of the data.
- Returns:
Function for fitting data to a exponential model.
- Return type: