Skip to content

1765 box size um#1786

Draft
rtuck99 wants to merge 4 commits into
1765_refactor_grid_scan_paramsfrom
1765_box_size_um
Draft

1765 box size um#1786
rtuck99 wants to merge 4 commits into
1765_refactor_grid_scan_paramsfrom
1765_box_size_um

Conversation

@rtuck99

@rtuck99 rtuck99 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

DO NOT MERGE

Part 2 of a fix for #1765

Requires:

Link to dodal PR (if required): #XXX
(remember to update pyproject.toml with the dodal commit tag if you need it for tests to pass!)

Below is the parameter class Hierarchy for GenericGrid before this refactor:
image

A note on changes

The internal parameter model has changed significantly and is now simpler.

The GenericGrid and subclasses portion of the parameter hierarchy is being removed and replaced with GridScanParams and GridDetectionParams.

detect_grid_and_do_gridscan now only requires DiffractionExperimentWithSample and GridDetectionParams
the grid detection plan now return GridScanParams
DiffractionExperimentWithSample and GridScanParams is all that is needed to perform a grid scan.

The grid detection and grid scan plans are now properly genericised with type parameter TParameter denoting the concrete parameter type extending DiffractionExperimentWithSample, so that it can be passed to the BeamlineSpecific portions and also deserialized in the callbacks.

DiffractionExperimentWithSample hierarchy now concentrates mainly on general-purpose diffraction parameters such as exposure timings, transmission fraction, and sample metadata.

DetectorParams is now decoupled from the gridscan parameter model, meaning it is no longer constructed when a property on the parameter model. Instead it is explicitly constructed in the experiment plan from the parameters, and passed in explicitly into the gridscan plan and to the callbacks.

This means that many subclasses can be removed from the parameter model, and it is possible to run 2d, 3d, gridscans and grid detection in any combination without requiring modifications to the parameter model.

The rotation scan parameter model has not been changed; it still has a detector_params property.

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

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Please add a label to this PR. This helps with generating helpful release notes.

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.89474% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.05%. Comparing base (21f9fed) to head (2954544).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1786      +/-   ##
==========================================
+ Coverage   93.03%   93.05%   +0.01%     
==========================================
  Files         164      164              
  Lines        8931     8985      +54     
==========================================
+ Hits         8309     8361      +52     
- Misses        622      624       +2     
Components Coverage Δ
i24 SSX 77.16% <ø> (ø)
hyperion 98.74% <100.00%> (+<0.01%) ⬆️
other 98.14% <97.53%> (-0.03%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rtuck99 rtuck99 changed the base branch from main to 1765_refactor_grid_scan_params July 3, 2026 17:18
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.

1 participant