Skip to content

1076 fast cs eiger for xrc - #1807

Draft
rtuck99 wants to merge 22 commits into
1765_box_size_umfrom
1076_fast_cs_eiger_for_xrc
Draft

1076 fast cs eiger for xrc#1807
rtuck99 wants to merge 22 commits into
1765_box_size_umfrom
1076_fast_cs_eiger_for_xrc

Conversation

@rtuck99

@rtuck99 rtuck99 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Refactoring that introduces ability to use arbitrary detector types.

Required for

Requires:

Link to dodal PR (if required):

Description of changes

This introduces a framework for detector-agnostic gridscans. Rotations are left largely unchanged and are hard-coded to still support classic ophyd v1 EigerDetector.

  • BeamlineSpecificDetectorFeatures is introduced as a customisation class akin to BeamlineSpecificFGSFeatures.
    Plans wishing to run diffraction plans will need to supply an instance which provides implementations for (pre)arming the detector, disarming the detector, cleanup, and also information about detector signals that should be read when generating events for callbacks. All detector-specific code is now invoked through this customisation class and the plans are largely detector agnostic.
  • BeamlineSpecificFGSFeatures now inherits from this class.
  • construct_beamline_specific_features_xxx functions are now largely removed, and no longer passed around. Instead the BeamlineSpecificFGSFeatures is constructed ahead of time, and is passed through the call chain.
  • To achieve this, calls to setup_trigger_plan and set_flyscan_params_plan now take GridScanParams parameters so that we can construct the BSFGSF without needing to have performed grid detection.
  • The callbacks previously needed to know the names of the detector-specific signals that were sent in the ISPyB, Nexus and Zocalo callbacks. These are now also abstracted, the callbacks expect an implementation of HWReadDuringMapper and ZocaloHWReadEventMapper to be supplied on construction, to populate a device-agnostic payload.
  • The detector-specific implementations of the BSDF / BSFGSF functions and the associated event mappers have been relocated to the beamline-specific packages in
    • mx_bluesky.common.device_setup_plans.detector (Classic Eiger, FastCS Eiger)
    • mx_bluesky.common.device_setup_plans.gridscan (Zebra 3D)
    • mx_bluesky.hyperion.device_setup_plans.gridscan (Panda 3D)
    • mx_bluesky.i02_1.device_setup_plans.gridscan (Zebra 2D)
  • The timing for the top-up delay calculation is now calculated from the request parameters instead of reading the device

Future improvments

  • BSFGSF and BSDF might be better expressed as Protocols but for now they follow the existing pattern
  • Some ancillary detector-related functionality such as detector motion, detector shutter operations, and possibly also beam size selection could also be customised in a similar way but for now they are left as-is.

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 user on a set of release notes

@rtuck99
rtuck99 changed the base branch from main to 1765_box_size_um July 30, 2026 10:01
@rtuck99 rtuck99 added hyperion Issues for Hyperion, the Bluesky UDC stack fastcs eiger Migration to the FastCS Eiger device labels Jul 30, 2026
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.88797% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.05%. Comparing base (0ef0ae4) to head (a38ad3e).

Additional details and impacted files
@@                 Coverage Diff                  @@
##           1765_box_size_um    #1807      +/-   ##
====================================================
- Coverage             93.07%   93.05%   -0.03%     
====================================================
  Files                   163      170       +7     
  Lines                  8958     9119     +161     
====================================================
+ Hits                   8338     8486     +148     
- Misses                  620      633      +13     
Components Coverage Δ
i24 SSX 77.16% <ø> (ø)
hyperion 98.69% <97.82%> (-0.08%) ⬇️
other 98.01% <96.30%> (-0.20%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fastcs eiger Migration to the FastCS Eiger device hyperion Issues for Hyperion, the Bluesky UDC stack

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant