Vindaar / TimepixAnalysis

Contains code related to calibration and analysis of Timepix based detector + CAST related code
MIT License
19 stars 6 forks source link

Fix calculation minimum of FADC pulse #41

Closed Vindaar closed 9 months ago

Vindaar commented 4 years ago

We currently use the index of the absolute minimum value of the FADC pulse. This is obviously bad. Need to take some mean of of all values close to the 95 percentile or something.

See here: https://github.com/Vindaar/TimepixAnalysis/blob/refactorRawManipulation/Analysis/ingrid/fadc_analysis.nim#L203

Vindaar commented 4 years ago

Note, that the actual calculation of the minimum in terms of the minimum voltage value is actually already done using a percentile!

Ref: https://github.com/Vindaar/TimepixAnalysis/blob/master/Analysis/ingrid/fadc_helpers.nim#L272-L283

This was previously called in raw_data_manipulation, but will (once PR #40 is finished) be called in reconstruction.nim.

Vindaar commented 4 years ago

The calculation of the minimum pulse value however, is also flawed, since it makes the same assumption as outlined in the OP.

See here: https://github.com/Vindaar/TimepixAnalysis/blob/master/Analysis/ingrid/fadc_helpers.nim#L276

This is a problem, because we take the mean value of all [-N/2, N/2] elements around that point. This will bias us into one direction or the other. We should start from the real minimum location obtained by looking at some smoothed spectrum.

Vindaar commented 9 months ago

The FADC calculations have improved significantly over the years, including computing the pedestals from the data and using smarter ways to determine minima, baseline etc. Closing this.