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
Fix get_array() when introducing gaps in multi-module detector data #234
Conversation
Good job I did decide to write a test, because I immediately discovered another bug. 😅 |
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.
LGTM.
Any feel how often these gaps appear IRL? Do we need a bugfix release for that?
Co-authored-by: Thomas Michelat <32831491+tmichela@users.noreply.github.com>
Thanks! I think these gaps are reasonably common - @daviddoji noticed a couple of repeats by inspecting data from a single LPD module, and if there were a couple of fairly visible ones, chances are there were others that weren't so easy to see. So I'm planning to do a bugfix with this and Philipp's #236. |
I meant to say, though, I think people often want only trains with data for all modules ( |
David mentioned today that using |
As we've already discussed, giving to As one can decide how many of them would like to have in the analysis by using @tmichela with long runs this happens quite frequently, unfortunately. |
@daviddoji alerted me to a bug when reading LPD data, where the same data would appear in the array twice.
This turned out to be when we introduce a gap in the data for one module, where that module missed a train which other modules recorded. I.e. a contiguous chunk of data in the file has to be split into 2 or more pieces in the output array. After each split, it was going back to the start of the source chunk, instead of continuing from after the split point. This only affects the new code path for reading with a pulse selection.
Edit: I found another bug when introducing gaps and not using pulse selection. Another win for tests.
I'm not exactly sure how to have a good test for this.