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

Hinted signals for the ion chambers #302

Merged
merged 12 commits into from
Nov 19, 2024
Merged

Hinted signals for the ion chambers #302

merged 12 commits into from
Nov 19, 2024

Conversation

canismarko
Copy link
Contributor

@canismarko canismarko commented Nov 11, 2024

This PR changes the signals that are read from an ion chamber during scans. To cut down on the clutter, only the signal net_current will be included in hints. The rest of the readable signals will still be read, but not hinted.

It also might fix a race condition in reading the scaler. Since the PVs update as the scaler reads, it's possible that the cached value that the IonChamber device has is stale by the time the scaler triggering is done. This showed up as an occasional low blip in the time signal (scaler channel 0). Since this time signal is used to calculate current, this meant the current is not reliable.

This PR fixes this by using the uncached signal formats introduce in ophyd-async 0.8.0. The downside is that we need to upgrade to ophyd-async 0.8.0 which isn't released yet. Most of the changes in this PR are actually for compatibility with ophyd-async 0.8.0.

Things to do before merging:

  • add tests
  • flake8, black, and isort

@canismarko canismarko marked this pull request as ready for review November 14, 2024 21:36
@canismarko canismarko requested a review from yannachen November 15, 2024 02:46
@Cathyhjj Cathyhjj self-requested a review November 19, 2024 16:49
Copy link
Collaborator

@Cathyhjj Cathyhjj left a comment

Choose a reason for hiding this comment

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

I like the hint that only includes net-count; maybe we should also reduce hints for monochromator; right now, all the energy related such as offset/vert/ID... are hinted. In practice, maybe only 'energy' or 'energy-monochromator-energy' should be hinted. But this should be done in a different branch & PR I guess

@canismarko
Copy link
Contributor Author

Thanks, @Cathyhjj

I agree we should revisit the energy positioner's hints. Ophyd-async 0.8.0 changed how those signals are determined, so we can see what actually happens once we merge this PR.

@canismarko canismarko merged commit a1efa7a into main Nov 19, 2024
1 check passed
@canismarko canismarko deleted the hints branch November 19, 2024 19:39
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.

3 participants