-
Notifications
You must be signed in to change notification settings - Fork 5
1307 remove detector parameter from hyperion request parameters #1420
Conversation
366b85d
to
5ab57db
Compare
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.
Looks good!
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.
Thanks! One comment in code. Additionally it's not great that the grid parameters sets detector_size_constants
to I03's but the rotation parameters let's it fallback to the default value (which happens to be the same as I03's). I think can we set them both to I03?
@@ -73,7 +73,7 @@ def detector_params(self): | |||
), "Detector distance must be filled before generating DetectorParams" | |||
os.makedirs(self.storage_directory, exist_ok=True) | |||
return DetectorParams( | |||
detector_size_constants=self.detector, # type: ignore # Will be cleaned up in #1307 | |||
detector_size_constants=I03Constants.DETECTOR, |
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.
Must: Can we make CONST.I03.DETECTOR
an actual EIGER2_X_16M_SIZE
object rather the string? This will fix the type issue here.
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.
It needs an additional dodal change as pydantic validator expects it to be a string despite being of type DetectorSizeConstants
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.
Raised DiamondLightSource/dodal#588 - decided to allow the existing string usage in case other users are still specifying them as strings
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.
Great, thanks!
a362231
to
a83d7f9
Compare
…ondLightSource/hyperion#1420) * (DiamondLightSource/hyperion#1307) Remove detector string from params * (DiamondLightSource/hyperion#1307) change detector_size_constants to be the DetectorSizeParams not the string
Fixes #1307
This change removes the
detector
attribute from the Hyperion request parametersLink to dodal PR (if required): DiamondLightSource/dodal#588
(remember to update
setup.cfg
with the dodal commit tag if you need it for tests to pass!)To test: