-
Notifications
You must be signed in to change notification settings - Fork 5
Update to work with ophyd_async xspress3 #1434
Conversation
@@ -154,7 +149,8 @@ def open_and_run(): | |||
yield from bps.abs_set( | |||
composite.sample_shutter, ZebraShutterState.OPEN, wait=True | |||
) | |||
yield from bps.abs_set(composite.xspress3mini.do_arm, 1, wait=True) | |||
yield from bps.stage(composite.xspress3mini, wait=True) | |||
yield from bps.unstage(composite.xspress3mini, wait=True) |
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.
Do we want to unstage here? The original version never unstage, e.g. it never try to stop xspress3mini. Unstage here will hit the stop button and stop the data collection immediately rather than just let it run and finish by itself.
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.
I think it's OK to unstage here, as it looks like we're waiting on all the same values are before, but it would be better to create a finalise plan which includes closing the shutter and disarming the detector, then putting that in @bpp.finalize_decorator()
. Then it will disarm on an error
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.
I'm not sure if we should disarm the detector after every iteration, or just once at the end of all the iterations
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.
These changes look good, but I'm not 100% convinced on what the disarming behaviour should be. I can double check what the old GDA code used to do for this?
…#1434) * Update optimise_attenuation plan to work with ophyd_async xspress3 * merged main into branch --------- Co-authored-by: Raymond Fan <[email protected]> Co-authored-by: Relm-Arrowny <[email protected]>
Fixes DiamondLightSource/dodal#473
Link to dodal PR (if required): DiamondLightSource/dodal#524
To test: