-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add peak arrival times? #1021
Comments
I am refactoring the How is peak arrival time often defined? Is it calculated as part of the charge extraction routine (a byproduct like |
The fact that peakpos is an integer is just an artefact of the simple charge integration method used so far (which is just an integer sum of waveform samples). If you want a float value (also for the integral), then we need a fancier charge integration method with interpolation, proper integration and peak detection. Alternately, we could apply some waveform filtering to up-sample and filter the waveforms, and your "integer" peakpos becomes a fraction (which is easy, but maybe not the fastest method). |
So we dont really two separate values but replace peakpos with an actual float value? From my limited understanding (and from what @maxnoe told me a while ago) you could define an arrival time as weighted mean over the all samples where the weights would be the values for each sample. |
So instead of doing |
more here maybe (#907) |
AFAIK, MAGIC uses a weighted average, so FACT-Tools fits the rising edge of the pulse using a third order polynomial, and defines arrival time as its point of inflection. (Don't ask me how we ended here. I guess it's rather robust against noise). |
To my knowledge the weighted average is also used in EventDisplay. |
Great. So my intention is to replace the The inheritance approach of the The peak time returned will be a float calculated from a method such as weighted average. Some |
This would also remove the waveform cleaners module, as the waveform cleaning will be part of the charge/time extraction in the |
This was previously discussed in #907 |
When calculating the pulse time using the weighted average, should it be done for the samples inside the integration window defined by the peak finding, or should it be done using all samples in the waveform? |
Probably depends on the peak-finding algorithm: for some methods a window that is larger than the integration window may be needed (especially if the integration only covers a sub-set of the full pulse). |
And would one expect the pulse time from the NeighborPeakIntegrator to be calculated from the average waveform of the neighbours to the pixel? Or would it be calculated from the waveform of the pixel? |
Addressed in #1033 |
I was wondering how one could go ahead adding actual arrival times to the DL1 Container.
From my understanding ctapipe only offers
peakpos
as integer for the position of the extracted peak(?).As this work is done in
image/charge_extractors.py
I should probably add a method to at least one of the classes there.Now the Question becomes: Where would i put such a function? Put an abstract method in
ChargeExtractor
, implementation in the most specialized classes (-> Neighbourpeak, AverageWF) or do I follow the same scheme aspeakpos
(defining tons of intermediate functions for the classes between) or could I just add it to a more abstract class as it would be the same for each Integrator (although it probably wouldn't, I dont know)?Thanks for all kind of input :)
The text was updated successfully, but these errors were encountered: