epraya.Sfilter#
- Sfilter(field, count, lt=51, pol=3, startl=0, endli=-1, epsilon=5 * 10**-6, plot=True)#
Applys a Savitzky-Golay filter to the count data, finds the resonant fields and peak to peak width, and generates the plots of the filtered data, its first and second integrals.
- Parameters:
field (np.array) – Array of the magnetic field values.
count (np.array) – Array of the counts values.
lt (int) – Window length for the Savitzky-Golay filter.
pol (int) – Polynomial order for the Savitzky-Golay filter.
start (int) – Index of the first point to draw the base line.
endli (int) – Index of the last point to draw the base line.
epsilon (float) – Prominence value to mark the peaks in the plot.
plot (Bool) – If true, plots the graphs of the spectrum, filtred data and first and second integrals.
- Returns:
Hpp (list) – List of the peak to peak width finded.
tempa (list) – Resonant fields list.
spc (np.array) – Filtred spectrum.
integ (np.array) – First integral of the spectrum.