skultrafast.fit_spectrum
¶
Module to fit the whole spektrum by peak functions.
Module Contents¶
Functions¶
|
|
|
|
|
|
|
|
|
Fits multiple peaks to mulitple spektra, the position and width of |
|
Attributes¶
- skultrafast.fit_spectrum.fit_spectrum(x, y, start_peaks_list, yerr=None, peak_func=lorentz_peaks, amp_penalty=0.01, amp_bounds=(-0.6, 0.4), wmin=2, wmax=10, add_const=False)[source]¶
Fits multiple peaks to mulitple spektra, the position and width of each peak is the same for all spectra, only the amplitude is allowed to differ.
- Parameters:
x ((n)-ndarray) – The x-values to fit, e.g. wavelengths or wavenumbers.
y ((n, m)-ndarray) – The y-values to fit.
start_peak_list (list) – A list containing (x0, amp, w) tuples. Used as starting values.
yerr ((n, m)-ndarray) – The errors of the data. Default None.
peaks_func (function, optional) – Function which calculates the peaks. Has the following signature: func(x, A_arr, x0_arr, w_arr), defaults to lorentz_peaks.
amp_penalty (float, optional) – Regulazition parameter for the amplitudes. Defaults to 0.001.
amp_bounds ((float, float)-tuple, optional) – Min and max bounds for the amplitude.
wmax (float, optional) – Upper bound for the width parameter.
wmin (float, optional) – Lower bound for the width parameter.
add_const (bool) – Weather to add an const background.