Skip to content

I19: move beamstop to position - #2254

Merged
DominicOram merged 6 commits into
mainfrom
i19-194_update-beamstop-for-setup
Oct 29, 2026
Merged

DominicOram merged 6 commits into
mainfrom
i19-194_update-beamstop-for-setup

Conversation

@noemifrisina

Copy link
Copy Markdown
Collaborator

Needed for i19-bluesky#194 as part of the beamline set up tasks.

Uses the config server to read the beamstop x position from the beamline.parameters file and move the motor.

Instructions to reviewer on how to test:

  1. Run tests

Checks for reviewer

  • Would the PR title make sense to a scientist on a set of release notes
  • If a new device has been added does it follow the standards
  • If changing the API for a pre-existing device, ensure that any beamlines using this device have updated their Bluesky plans accordingly
  • Have the connection tests for the relevant beamline(s) been run via dodal connect ${BEAMLINE}

@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.30%. Comparing base (31999b0) to head (917f8fa).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2254   +/-   ##
=======================================
  Coverage   99.30%   99.30%           
=======================================
  Files         376      376           
  Lines       14772    14798   +26     
=======================================
+ Hits        14669    14695   +26     
  Misses        103      103           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DominicOram DominicOram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, a couple of comments

from dodal.common.enums import InOutUpper
from dodal.devices.beamlines.i19.beamstop import BeamStop

MOCK_BEAMLINE_PARAMS = "# Beamstop\nbeamstop_inbeam_x=5.0\nbeamstop_outbeam_x=3.37\n"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should: Can we make this a multiline string so that's more readable?


DAQ_CONFIGURATION_PATH = "/dls_sw/i19-1/software/daq_configuration"

BEAMLINE_PARAMETERS_PATH = f"{DAQ_CONFIGURATION_PATH}/domain/beamline.parameters"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Must: This file contains no beamstop_inbeam_x, which presumably means that the beamstop cannot be moved in properly for i19_1 with this? I think it's fine not to implement moving for EH1 given that the work is for EH2 but we should probably change this so EH1 loads a beamstop that cannot be moved rather than one that looks like it can then errors

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ugh, good point I forgot to check. They do move the beamstop on eh1 and the ioc is the same but either the position has a different name in that file or it is in another one, I can't remember right now...

Although they're actually not using this device at all on eh1 right now, so I may just skip it for them for the moment.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Found it, they move it in y which is why the key is not the same. Will update the set method accordingly

Comment thread src/dodal/beamlines/i19_2.py Resolved

@DominicOram DominicOram left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great, thank you

@DominicOram
DominicOram merged commit 546b1fe into main Oct 29, 2026
11 checks passed
@DominicOram
DominicOram deleted the i19-194_update-beamstop-for-setup branch October 29, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants