Skip to content

Conversation

@jacob720
Copy link
Contributor

@jacob720 jacob720 commented Dec 15, 2025

Fixes DiamondLightSource/mx-bluesky#1472

Required by DiamondLightSource/mx-bluesky#1526

Adds detector ID signal to eiger.

Instructions to reviewer on how to test:

  1. Do thing x
  2. Confirm thing y happens

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
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.12%. Comparing base (f919ae5) to head (fd61be6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1786   +/-   ##
=======================================
  Coverage   99.12%   99.12%           
=======================================
  Files         282      282           
  Lines       10683    10687    +4     
=======================================
+ Hits        10589    10593    +4     
  Misses         94       94           

☔ View full report in Codecov by Sentry.
📢 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.

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 small comments, otherwise looks good

arming_status.set_finished()

def __init__(self, beamline: str = "i03", *args, **kwargs):
def __init__(self, beamline: str = "i03", detector_id: int = 78, *args, **kwargs):
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: There's not really a reason that 78 should be the default, that's just what is on i03. I don't think there is a sensible default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I remove the beamline default too?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, I think so. I'm not even 100% sure where it is used but given we're about to move eiger anyway that's a rabbit hole that we probably don't want to go down

self.beamline = beamline

self._detector_id = detector_id
self.detector_id = AttributeSignal(
Copy link
Contributor

Choose a reason for hiding this comment

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

Could: This is the id used in ispyb so should probably have ispyb in variable names so people know what it is.

@jacob720 jacob720 force-pushed the mx_bluesky_1472_add_detector_id_to_eiger branch from 09a2b5d to abce9f1 Compare December 18, 2025 10:51
@jacob720
Copy link
Contributor Author

Made some changes to the defaults and how detector ID is set because you cannot instantiate a device with parameters using .build()

@jacob720 jacob720 requested a review from DominicOram December 18, 2025 10:52
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.

Minor comment, take it or leave it

super().__init__(*args, **kwargs)
self.beamline = beamline

self.detector_id = ispyb_detector_id
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Would be good to call this ispyb_detector_id too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The AttributeSignal is already called ispyb_detector_id so it would have to have a different name

@jacob720 jacob720 enabled auto-merge (squash) December 19, 2025 10:19
@jacob720 jacob720 merged commit 63cc644 into main Dec 19, 2025
27 of 29 checks passed
@jacob720 jacob720 deleted the mx_bluesky_1472_add_detector_id_to_eiger branch December 19, 2025 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

I04 XRC: Using I03 detector id

3 participants