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
Compute width again after saturation correction #542
Conversation
Thanks Tianyu for the PR. It looks fine once the AxFoundation/strax#465 is merged |
@@ -316,6 +319,7 @@ def peak_saturation_correction(records, peaks, to_pe, | |||
peaks[peak_i]['dt'] = dt | |||
|
|||
strax.sum_waveform(peaks, records, to_pe, peak_list) | |||
return peak_list |
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.
maybe makes sense to just do strax.compute_widths(peaklets, select_peaks_indicies=peak_list)
here together with the sum_wf, also alleviates the need to return this variable?
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.
@zhut19 , did you see my suggestion?
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.
Oh, sorry, I missed this. I couldn't do this because that strax.compute_width
is not a numba function.
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.
You could use a numba.typed.List, but then you should check the impact on the performance.
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.
@zhut19 ah okay, yeah I see, then it's fine as far as I am concerned unless you feel like checking out Daniels suggestion
@@ -316,6 +319,7 @@ def peak_saturation_correction(records, peaks, to_pe, | |||
peaks[peak_i]['dt'] = dt | |||
|
|||
strax.sum_waveform(peaks, records, to_pe, peak_list) | |||
return peak_list |
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.
@zhut19 ah okay, yeah I see, then it's fine as far as I am concerned unless you feel like checking out Daniels suggestion
@jorana Let's leave it like this now. |
What does the code in this PR do / what does it improve?
The peak width is now being re-computed after the saturation correction. Those peaks previously computed with smaller widths.
This will need AxFoundation/strax#465 merged first.