Skip to content
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

Re-implement PulsePattern interface on top of labelled pulse IDs rather than mask #40

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

philsmt
Copy link
Collaborator

@philsmt philsmt commented Aug 4, 2023

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 with pd.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.

Copy link
Member

@JamesWrigley JamesWrigley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IANAE, but LGTM!

@JamesWrigley
Copy link
Member

Oh BTW you could also make a note in the changelog of the new API options.

@philsmt philsmt force-pushed the feat/pulsepattern-v2 branch 2 times, most recently from 05a4085 to aec937d Compare August 8, 2023 13:41
@philsmt
Copy link
Collaborator Author

philsmt commented Aug 8, 2023

Thanks for review!

@philsmt philsmt merged commit 79ca4aa into master Aug 8, 2023
4 checks passed
@philsmt philsmt deleted the feat/pulsepattern-v2 branch August 8, 2023 13:55
JamesWrigley added a commit that referenced this pull request Aug 8, 2023
This makes it easier to see exactly what changes occurred in between
releases. Also added a link to #40 in its changelog entry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants