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

Use dodal devices more widely for I24 #116

Merged
merged 12 commits into from
Jul 19, 2024
Merged

Conversation

noemifrisina
Copy link
Contributor

@noemifrisina noemifrisina commented Jun 26, 2024

... plus various tidy ups

Closes #115

(Edit: forgot to add, needs Dodal652)

@noemifrisina noemifrisina added the I24 serial Issues relating to ssx on I24 label Jun 26, 2024
Copy link

codecov bot commented Jun 27, 2024

Codecov Report

Attention: Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.

Project coverage is 54.10%. Comparing base (d2e2d9a) to head (2dd2d32).
Report is 66 commits behind head on main.

Current head 2dd2d32 differs from pull request most recent head 798702a

Please upload reports for the commit 798702a to get more accurate results.

Files Patch % Lines
src/mx_bluesky/I24/serial/write_nexus.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
+ Coverage   52.82%   54.10%   +1.28%     
==========================================
  Files          23       26       +3     
  Lines        3311     3188     -123     
==========================================
- Hits         1749     1725      -24     
+ Misses       1562     1463      -99     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@noemifrisina noemifrisina marked this pull request as ready for review July 1, 2024 16:36
Copy link
Contributor

@DominicOram DominicOram left a comment

Choose a reason for hiding this comment

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

Thanks, couple of minor comments but take them or leave them

Comment on lines 631 to 636
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.mv(det_stage.z, 1300)
yield from bps.wait(group=place)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: mixing abs_set with group and mv like this seems a bit odd it would be a bit better to do one of:

        yield from bps.mv(
            beamstop.pos_select, BeamstopPositions.ROBOT,
            backlight, BacklightPositions.OUT,
            det_stage.z, 1300
        )

or

        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)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd go with the second one because for the backlight I've overloaded set as it needs to turn it on and off depending on position. Not sure move would achieve that in this case...

Comment on lines +642 to +646
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)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: As above, a mv might be nicer?

@@ -665,12 +668,14 @@ def run_fixed_target_plan(
tot_num_imgs = datasetsizei24(
parameters.num_exposures, parameters.chip_type, parameters.map_type
)
wavelength = yield from bps.rd(dcm.wavelength_in_a)
if parameters.detector_name == "eiger":
logger.debug("Start nexus writing service.")
call_nexgen(
Copy link
Contributor

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

@noemifrisina noemifrisina merged commit 658bddc into main Jul 19, 2024
13 checks passed
@noemifrisina noemifrisina deleted the 115_use-more-dodal-devices branch July 19, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I24 serial Issues relating to ssx on I24
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I24 ssx: use new dodal devices in plans
2 participants