1765 Refactor grid scan params#1787
Open
rtuck99 wants to merge 4 commits into
Open
Conversation
1 task
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1787 +/- ##
==========================================
+ Coverage 93.08% 93.10% +0.02%
==========================================
Files 164 164
Lines 8989 9046 +57
==========================================
+ Hits 8367 8422 +55
- Misses 622 624 +2
🚀 New features to boost your workflow:
|
4 tasks
1 task
Minor fix to grid_position_to_motor_position Remove assertions in grid_position_to_motor_position More clearly define semantics of omega_starts_deg
rtuck99
force-pushed
the
1765_refactor_grid_scan_params
branch
from
July 14, 2026 12:49
83a3db6 to
b15560d
Compare
rtuck99
marked this pull request as ready for review
July 16, 2026 14:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 1 of a fix for
Link to dodal PR (if required): #N/A
This PR introduces a refactoring of the grid scan parameters.
Currently,
GenericGridinherits fromDiffractionExperimentWithSample, thus all plans use it regardless of whether they are executing grid detection or grid scans.This is confusing for the following reasons:
specified_grids_paramsSpecifiedGridsalso inherit fromGenericGriddespite XRC potentially being called without doing grid detection by directly specifying the gridDiffractionExperimentWithSamplewhich also contains information irrelevant to grid detection, such as exposure times, apertures and other informationThe purpose of this refactoring is to separate these concerns by introducing the following parameter classes:
GridDetectionParams- defines the grid parameters necessary for performing grid detectionGridScanParams- defines the grid parameters necessary for performing a gridscan (note that this is plan-agnostic and doesn't contain e.g. panda or zebra settings, or anything not related to the gridBaseModeland are intended to be used either as mixins or standalone parameter objects.A subsequent refactoring will simplify the concrete parameter gridscan parameter classes that derive from SpecifiedGrids by decoupling them from
DiffractionExperiment, so that they can be used as mixins into the main parameter model.Instructions to reviewer on how to test:
Checks for reviewer