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

Fix load when PVs missing #125

Merged
merged 5 commits into from
Jan 28, 2025
Merged

Fix load when PVs missing #125

merged 5 commits into from
Jan 28, 2025

Conversation

mdoucet
Copy link
Member

@mdoucet mdoucet commented Jan 27, 2025

It happens too often that during changing the configuration of the instrument, PV related to the state of the analyzer or polarizer are missing. In this case the load fails because of the meta data is incomplete. In 95% of the cases it's a case where we are not measuring a polarized state and the device is removed and the PVs not set properly.

This PR does a number of things:

  • It falls back to another method of parsing the events which work in nearly all cases, but is just slower.
  • It also makes the way we deal with the dead time correction uniform (it was previously ignored for this second filtering type).

@mdoucet mdoucet requested a review from backmari January 27, 2025 22:26
Copy link
Collaborator

@backmari backmari left a comment

Choose a reason for hiding this comment

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

This PR changes the loading to fall back to "simple filtering" if the PV:s for the polarizer and/or analyzer state is missing. It also makes the dead time correction apply regardless of the filtering method.
(Since Codecov doesn't seem to work quite right, I can't easily see what the test coverage is like, but if needed we can add a test later.)

@mdoucet mdoucet merged commit 7524362 into next Jan 28, 2025
3 checks passed
@mdoucet mdoucet deleted the fix-loading branch January 28, 2025 13:40
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.

2 participants