-
Notifications
You must be signed in to change notification settings - Fork 11
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 getting expected images from a gridscan #1035
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1035 +/- ##
==========================================
- Coverage 97.63% 97.63% -0.01%
==========================================
Files 159 159
Lines 6564 6560 -4
==========================================
- Hits 6409 6405 -4
Misses 155 155 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, I was just looking for something like create_hardware_backed_soft_signal
src/dodal/devices/fast_grid_scan.py
Outdated
x = await self.x_steps.get_value() | ||
y = await self.y_steps.get_value() | ||
z = await self.z_steps.get_value() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could: Can this be parallelized? If not then may be worth putting a comment explaining why to avoid tripping someone up in future.
x = await self.x_steps.get_value() | |
y = await self.y_steps.get_value() | |
z = await self.z_steps.get_value() | |
x, y, z = await asyncio.gather(self.x_steps.get_value(), self.y_steps.get_value(), self.z_steps.get_value() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it can be parallelised. I have tended not to bother with parallel reads because they're normally very short anyway but I will add it in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, my concern is mainly that someone in the future might wonder why it wasn't done and go down an archaeological rabbit hole.
There's some documentation about it here. I think I might add the words derived signal to that though as it's not that searchable. Worth noting some of the caveats with it from bluesky/ophyd-async#525. Namely it doesn't work in the case of |
Fixes DiamondLightSource/mx-bluesky#777
Instructions to reviewer on how to test:
Checks for reviewer
dodal connect ${BEAMLINE}