-
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
Option to give range to sum_waveform #322
Conversation
Hi @zhut19 , thanks for the PR, having the desaturation correction in strax will be most helpfull. In this PR, the style seems very convoluted. Can you explain why you need -3 and -14? I think you can more easily and clearly do this with a simple By the way, travis is failing untill we merge #321. Don't worry about that too much. |
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.
Sure, would work! But if at all possible I'd be a little more explicit, would you like 6275049? Otherwise I can revert it?
An empty list should be allowed, it just means no peak needs to apply sum waveform to.
This is even better! I remove the raise error, as an empty list is okay and does exist. |
Sure thanks, I was about to remove that raise statement for exactly the reason you mention. Just for completeness I've added this to the tests in f92086f |
What is the problem / what does the code in this PR do
The desaturation requires re-calculating the sum waveform of only a small fraction of the peaklets (that are saturated), once the (temporary copy of) records are corrected. It is best to be able to do partial re-calculation.
Can you briefly describe how it works?
func: sum_waveform
now takes a keyword argumentpeak_list
of the typenumpy.array
. When not specified, default value would be converted intonp.arange(len(peaks))