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
Use warning also in abs_time_to_prev_next_interval
#738
Conversation
If my understanding is correct, the |
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.
Looks good to me. How often do you expect this warning be triggered? I won't delete log files for this round of reprocessing so we can trace back anywise
For this function, I think you will not see warnings in straxen's plugins(because it is only used on the event level in straxen). But in some customized plugins outside strax(en), it is better to print out the warnings rather than errors just like |
Sorry I am confused, why I won't see these warning? For reprocessing we goes up to events |
Events in straxen are not overlapping so that they will not trigger warnings. |
So this PR is almost only for the users applying the function to their own data where the things might be overlapping. |
Wait then I think I need to reevaluate this PR: if this |
|
It is true that |
If we want to test that the events are not overlapping in straxen, we should do it in straxen's |
Hej guys thanks. The only place we are using this function at the moment is the deadtime calculation in cutax. And here I think nothing can overlap (I hope at least). |
Hi @WenzDaniel are you sure? I didn't find anything in |
What is the problem / what does the code in this PR do
Sometimes
things
inabs_time_to_prev_next_interval
might be overlapping, or theendtime
might be not sorted. So throw warning instead of error, following the logic oftouching_windows
.Can you briefly describe how it works?
Just change the warning logic, the algorithm is not changed.
Can you give a minimal working example (or illustrate with a figure)?
Please include the following if applicable:
Please make sure that all automated tests have passed before asking for a review (you can save the PR as a draft otherwise).