epraya.Spmanipulation#
- Spmanipulation(fig, axes, field, count, lt=51, pol=3, startl=0, endli=-1, einmal=0, aufmal=-1, epsilon=5 * 10**-6)#
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, using the values of the sliders.
- Parameters:
fig (matplotlib.figure.Figure) – Defines the ploting area for the four graphs.
axes (subplots) – Defines the subplotss for the plots.
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.
einmal (int) – Index of the first point to draw the base line of the first integral.
aufmal (int) – Index of the last point to draw the base line of the first integral.
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:
dfr (pandas.Dataframe) – Table of the peak to peak widht with it’s corresponding resonant field.
field (np.array) – Array with the magnetic field values.
spc-basel (np.array) – Filtred spectrum.
Hpp (list) – List of the peak to peak width finded.
tempa (list) – Resonant fields list.
integ (np.array) – First integral of the spectrum.