After talking to David, we need to find a way to get better windows for the savitzky-golay filter to receive maximum A/E performance.
Therefore, we had two suggestions how to do that, both based on the splitted peak files:
Take the DEP waveforms:
Write minimal DSP which calculates for given SG window A/E values.
take A/E distribution within the DEP, search for peak.
Fit truncated gaussian to the top of the peak by applying window cut.
Extract FWHM of disitribution
Optimize so that the DEP A/E distribution width is minimal. Start with very small windows (like 10ns or so and increase window only). Should be possible with gradient descent from minimal start point while only allowing positive values.
When the routine is done, then save best sg value per detector to pars.
After talking to David, we need to find a way to get better windows for the savitzky-golay filter to receive maximum A/E performance. Therefore, we had two suggestions how to do that, both based on the splitted peak files:
When the routine is done, then save best sg value per detector to pars.