devctrl.data.spectrum.transforms.get_savgol_window_length#
- get_savgol_window_length(E_data=None, wl_data=None, window_length_nm=30, window_length_eV=0.03, threshold=1.0)[source]#
Determine the window length of the Savitzky-Golay filter. The window length of the Savitzky-Golay filter is given in nm or eV and determined from the data.
Constant spacing is checked dividing the standard deviation of the gradient by the mean squared, if this value is <= threshold it is considered constant.
- Returns:
window_length and either “wl” or “E”, depending on which is the constant interval unit