-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly pass parameters through all of Hyperion's UDC parameters #746
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #746 +/- ##
==========================================
+ Coverage 86.97% 86.99% +0.01%
==========================================
Files 101 101
Lines 6931 6941 +10
==========================================
+ Hits 6028 6038 +10
Misses 903 903
|
Also see #747 which ideally should be fixed before next release |
|
||
|
||
class HyperionRobotLoadThenCentre(RobotLoadThenCentre, WithHyperionUDCFeatures): | ||
thawing_time: float = Field(default=HardwareConstants.THAWING_TIME) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thawing_time
is also in RobotLoadThenCentre
tip_offset_um
is also in GridCommon
): ... | ||
|
||
|
||
class HyperionGridScanWithEdgeDetect( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be used anywhere?
thawing_time: float = Field(default=HardwareConstants.THAWING_TIME) | ||
tip_offset_um: float = Field(default=HardwareConstants.TIP_OFFSET_UM) | ||
|
||
def robot_load_params(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can these methods have annotations? That way tooling can help more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should these be properties?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes to annotations!
I'll make them properties as that's probably more consistent with the other params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with above changes
I will address these first thing tomorrow Also, in
This uses the |
@@ -101,7 +106,7 @@ def activity_gated_start(self, doc: RunStart): | |||
) | |||
mx_bluesky_parameters = doc.get("mx_bluesky_parameters") | |||
assert isinstance(mx_bluesky_parameters, str) | |||
self.params = GridCommon.model_validate_json(mx_bluesky_parameters) | |||
self.params = self.param_type.model_validate_json(mx_bluesky_parameters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because GridCommon
is now abstract, we need to use an implemented version of this model here. Since the type is bound to GridCommon
, I don't think this will affect generalisability.
Similar change done in nexus_callback.py
) | ||
|
||
|
||
class RobotLoadThenCentre(GridCommon): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed with @rtuck99 - we're so far off any non-hyperion beamlines doing anything other than a grid scan, it's probably good to get rid of some of the common parameters like this one
@@ -45,7 +45,7 @@ dependencies = [ | |||
"daq-config-server >= 0.1.1", | |||
"ophyd == 1.9.0", | |||
"ophyd-async >= 0.8a5", | |||
"bluesky >= 1.13.0a4", | |||
"bluesky >= 1.13", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alpha releases were causing linting issues with set_mock_value
Fixes GPU processing not working with gda.mx.hyperion.xrc.compare_cpu_and_gpu=true #738 by giving our Hyperion parameters the
WithHyperionUDCFeatures
component and making sure Hyperion's different parameter models implement the correct version ofdetector_parameters
Removes the definition of
detector_parameters
from the model components incommon
. This:detector_parameters
, since the common components are abstract without their own definitions. This part was discussed with @rtuck99grid_detect
to contain their own definition ofdetector_params
, rather than using the one which was defined inGridCommon
Clearer distinction between Hyperion's plans which run before and after
grid_detect
(and so can haveSpecifiedGrid
in their parameters)