-
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
Use dodal devices more widely for I24 #116
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
b366efb
Use devices in moveto_preset
noemifrisina 51b326e
Use pv abstracts in nexus writer
noemifrisina 2dd2d32
Clean up some pvs
noemifrisina 29315c1
Read wavelength from dcm device and various tidy ups
noemifrisina 494e718
Fix nexgen call
noemifrisina 7f49439
Merge branch 'main' into 115_use-more-dodal-devices
noemifrisina ea3dbbf
Merge branch 'main' into 115_use-more-dodal-devices
noemifrisina 798702a
Merge branch 'main' into 115_use-more-dodal-devices
noemifrisina c51fdbd
Address comments
noemifrisina 308aff0
Merge branch 'main' into 115_use-more-dodal-devices
noemifrisina cca6ff6
Merge branch 'main' into 115_use-more-dodal-devices
noemifrisina 952beb1
Pin to dodal main
noemifrisina 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 |
---|---|---|
|
@@ -19,6 +19,8 @@ | |
from blueapi.core import MsgGenerator | ||
from dodal.beamlines import i24 | ||
from dodal.common import inject | ||
from dodal.devices.i24.beamstop import Beamstop, BeamstopPositions | ||
from dodal.devices.i24.dual_backlight import BacklightPositions, DualBacklight | ||
from dodal.devices.i24.I24_detector_motion import DetectorMotion | ||
from dodal.devices.i24.pmac import PMAC, EncReset, LaserSettings | ||
|
||
|
@@ -626,7 +628,13 @@ def moveto(place: str = "origin", pmac: PMAC = inject("pmac")) -> MsgGenerator: | |
|
||
|
||
@log.log_on_entry | ||
def moveto_preset(place: str, pmac: PMAC = inject("pmac")) -> MsgGenerator: | ||
def moveto_preset( | ||
place: str, | ||
pmac: PMAC = inject("pmac"), | ||
beamstop: Beamstop = inject("beamstop"), | ||
backlight: DualBacklight = inject("backlight"), | ||
det_stage: DetectorMotion = inject("detector_motion"), | ||
) -> MsgGenerator: | ||
setup_logging() | ||
|
||
# Non Chip Specific Move | ||
|
@@ -636,16 +644,22 @@ def moveto_preset(place: str, pmac: PMAC = inject("pmac")) -> MsgGenerator: | |
|
||
elif place == "load_position": | ||
logger.info("load position") | ||
caput(pv.bs_mp_select, "Robot") | ||
caput(pv.bl_mp_select, "Out") | ||
caput(pv.det_z, 1300) | ||
yield from bps.abs_set( | ||
beamstop.pos_select, BeamstopPositions.ROBOT, group=place | ||
) | ||
yield from bps.abs_set(backlight, BacklightPositions.OUT, group=place) | ||
yield from bps.abs_set(det_stage.z, 1300, group=place) | ||
yield from bps.wait(group=place) | ||
|
||
elif place == "collect_position": | ||
logger.info("collect position") | ||
caput(pv.me14e_filter, 20) | ||
yield from bps.mv(pmac.x, 0.0, pmac.y, 0.0, pmac.z, 0.0) | ||
caput(pv.bs_mp_select, "Data Collection") | ||
caput(pv.bl_mp_select, "In") | ||
yield from bps.abs_set( | ||
beamstop.pos_select, BeamstopPositions.DATA_COLLECTION, group=place | ||
) | ||
yield from bps.abs_set(backlight, BacklightPositions.IN, group=place) | ||
yield from bps.wait(group=place) | ||
Comment on lines
+658
to
+662
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. Nit: As above, a |
||
|
||
elif place == "microdrop_position": | ||
logger.info("microdrop align position") | ||
|
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.
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: It would be nice to have a test that covered that
call_nexgen
has been called with the expected params