Re-implement PulsePattern interface on top of labelled pulse IDs rather than mask #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Turned out the original design on top of a pulse mask (boolean array whether there's a pulse in any bunch table position) was a somewhat poor choice, likely biased by initially only using data from the timeserver device. It became increasingly messy and complex trying to address the open points in #24.
Instead I doubled down on basing everything on top of
pandas
series withpd.MultIndex
instead. This way, the entire interface can be implemented through._get_train_ids()
and._get_pulse_ids()
, which fits much better with some future components I have lined up around non-timeserver pulse data. Pretty much all methods are faster now (in particular.is_constant_pattern()
!) across small and large runs with the exception of.get_pulse_mask()
, which seems unlikely to be used much.Also found some missing test cases and homogenized interface options. As a bonus, the entire public API still remains unchanged apart from additional options 🎉
This PR only changes what's already merged, I will update #24 afterwards.