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

Make pulse_id continuous in chunks #233

Merged
merged 1 commit into from
Jun 6, 2024
Merged

Conversation

dachengx
Copy link
Contributor

@dachengx dachengx commented Jun 5, 2024

Before you submit this PR: make sure to put all XENONnT specific information in a wiki-note as the repo is publicly accessible

What does the code in this PR do / what does it improve?

Fix #229

And a problem with sorting of photon_pulses and pulse_ids.

In previous codes

photon_pulses = strax.sort_by_time(photon_pulses)

photon_pulses is sorted before assigning photon_id to pulse_ids.

Can you briefly describe how it works?

Similar to https://github.com/XENONnT/straxen/blob/b8fe520deca55b8c5ac0cb53249b38639f0ae5de/straxen/plugins/events/events.py#L154, first make an attribute pulse_ids_seen of PulseWindow, then update it for each chunk.

Can you give a minimal working example (or illustrate with a figure)?

Please include the following if applicable:

  • Update the docstring(s)
  • Bump plugin version(s)
  • Update the documentation
  • Tests to check the (new) code is working as desired.
  • Does it solve one of the GitHub open issues?

@dachengx dachengx changed the title Continuous pulse Make pulse_id continuous in chunks Jun 5, 2024
@dachengx dachengx marked this pull request as ready for review June 5, 2024 13:46
@coveralls
Copy link

coveralls commented Jun 5, 2024

Pull Request Test Coverage Report for Build 9385188207

Details

  • 8 of 8 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.007%) to 78.287%

Totals Coverage Status
Change from base Build 9358775026: 0.007%
Covered Lines: 2322
Relevant Lines: 2966

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jun 5, 2024

Pull Request Test Coverage Report for Build 9385239168

Details

  • 8 of 8 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.007%) to 78.287%

Totals Coverage Status
Change from base Build 9358775026: 0.007%
Covered Lines: 2322
Relevant Lines: 2966

💛 - Coveralls

@dachengx dachengx requested a review from ramirezdiego June 5, 2024 14:11
@dachengx dachengx added the bug Something isn't working label Jun 5, 2024
@dachengx dachengx force-pushed the continuous_pulse_id branch from 25c469a to 14adaa4 Compare June 5, 2024 14:23
@coveralls
Copy link

coveralls commented Jun 5, 2024

Pull Request Test Coverage Report for Build 9385913462

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 78.295%

Totals Coverage Status
Change from base Build 9358775026: 0.02%
Covered Lines: 2323
Relevant Lines: 2967

💛 - Coveralls

Copy link
Collaborator

@ramirezdiego ramirezdiego left a comment

Choose a reason for hiding this comment

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

Thank you!

@ramirezdiego ramirezdiego merged commit ea48142 into main Jun 6, 2024
4 checks passed
@ramirezdiego ramirezdiego deleted the continuous_pulse_id branch June 6, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

We are per chunk simulation not per run
3 participants