-
Notifications
You must be signed in to change notification settings - Fork 38
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
fixed delta peak timestamp problem #702
fixed delta peak timestamp problem #702
Conversation
Great catch, must have been introduced in #506! Thanks a lot Lanqing! One day we may try again to not merge lone hits in te first place, especially if they are after pulses. |
Thanks for catching Lanqing. Rearding
One has to be a bit careful to not introduce in that case a z- and area dependent bias. This was one of the issues in the 1T Ar37 analysis as far as I remember. |
Can you update the test such that we do not run into this issue ever again strax/tests/test_peak_merging.py Line 56 in d6b3575
|
peak['length'] = peak_length | ||
peak['dt'] = 1 | ||
hits['area'] = 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WenzDaniel if we had realized this - the test would have worked. Now it always added zeros.
What is the problem / what does the code in this PR do
The (lone hits) delta peaks added to
merged_s2s
waveforms have wrong time stamp. For example, in the examplemerged_s2s
waveforms below, the red shadow marks peaklets while the blue shadow marks where we expect the lone hits, given the time stamps directly fromlone_hits
datatype. You can see the lone hits show up in the wrong time.This PR did a minimal fix to this issue.
Can you briefly describe how it works?
is the problem. Apparently, lone hits' time should show up only after
merged_s2s
start. This implementation means thatindex
is always negative, leading to a reversed ordering thus mirrored relative timestamp.Can you give a minimal working example (or illustrate with a figure)?
I think this fix is simple enough to skip this part...