-
Notifications
You must be signed in to change notification settings - Fork 2
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
Configure shutter to always use the manual/auto option #446
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0b3ee08
Setup the zebra to always use the auto/manual shutter setting
DominicOram 9bffb91
Pin dodal
DominicOram df6a93e
Fix typing issues
DominicOram a35282d
Fix changes based on newer device
DominicOram 9ae0602
Merge branch 'main' into 232_configure_shutter_better
DominicOram 1830661
Change shutter to auto when configuring the zebra
DominicOram File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ | |
from dodal.devices.undulator import Undulator | ||
from dodal.devices.xbpm_feedback import XBPMFeedback | ||
from dodal.devices.zebra import Zebra | ||
from dodal.devices.zebra_controlled_shutter import ZebraShutter, ZebraShutterControl | ||
from dodal.devices.zocalo.zocalo_results import ( | ||
ZOCALO_READING_PLAN_NAME, | ||
ZOCALO_STAGE_GROUP, | ||
|
@@ -57,9 +58,9 @@ | |
setup_panda_for_flyscan, | ||
) | ||
from mx_bluesky.hyperion.device_setup_plans.setup_zebra import ( | ||
set_zebra_shutter_to_manual, | ||
setup_zebra_for_gridscan, | ||
setup_zebra_for_panda_flyscan, | ||
tidy_up_zebra_after_gridscan, | ||
) | ||
from mx_bluesky.hyperion.device_setup_plans.xbpm_feedback import ( | ||
transmission_and_xbpm_feedback_for_collection_decorator, | ||
|
@@ -97,6 +98,7 @@ class FlyScanXRayCentreComposite: | |
panda: HDFPanda | ||
panda_fast_grid_scan: PandAFastGridScan | ||
robot: BartRobot | ||
sample_shutter: ZebraShutter | ||
|
||
@property | ||
def sample_motors(self) -> Smargon: | ||
|
@@ -273,6 +275,13 @@ def run_gridscan( | |
LOGGER.info("Waiting for gridscan validity check") | ||
yield from wait_for_gridscan_valid(feature_controlled.fgs_motors) | ||
|
||
LOGGER.info("Set shutter to auto") | ||
yield from bps.abs_set( | ||
fgs_composite.sample_shutter.control, | ||
ZebraShutterControl.AUTO, | ||
group=CONST.WAIT.GRID_READY_FOR_DC, | ||
) | ||
|
||
LOGGER.info("Waiting for arming to finish") | ||
yield from bps.wait(CONST.WAIT.GRID_READY_FOR_DC) | ||
yield from bps.stage(fgs_composite.eiger) | ||
|
@@ -438,8 +447,11 @@ def _get_feature_controlled( | |
def _generic_tidy( | ||
fgs_composite: FlyScanXRayCentreComposite, group, wait=True | ||
) -> MsgGenerator: | ||
LOGGER.info("Tidying up Zebra") | ||
yield from set_zebra_shutter_to_manual(fgs_composite.zebra, group=group, wait=wait) | ||
LOGGER.info("Tidying up Zebra and shutter") | ||
yield from tidy_up_zebra_after_gridscan(fgs_composite.zebra, group=group, wait=wait) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to my last comment, I think the tidy up plan itself should include setting the shutter to manual, otherwise the |
||
yield from bps.abs_set( | ||
fgs_composite.sample_shutter.control, ZebraShutterControl.MANUAL | ||
) | ||
LOGGER.info("Tidying up Zocalo") | ||
# make sure we don't consume any other results | ||
yield from bps.unstage(fgs_composite.zocalo, group=group, wait=wait) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: Set shutter to auto (or check that it's in auto mode) during the individual
setup_zebra
plans. It's potentially misleading for plans likesetup_zebra_for_gridscan
to callset_shutter_auto_input
while it's actually still in manual. Another option is forset_shutter_auto_input
to include this check