-
Notifications
You must be signed in to change notification settings - Fork 5
1303 read smargon position in ispyb for rotation scans from hardware not GDA #1411
Conversation
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.
I know this changed happened a while ago, but why is DataCollectionPositionInfo
distinct from DataCollectionInfo
?
@@ -202,6 +208,7 @@ def _handle_ispyb_transmission_flux_read(self, doc) -> Sequence[ScanDataInfo]: | |||
def populate_info_for_update( | |||
self, | |||
event_sourced_data_collection_info: DataCollectionInfo, | |||
event_sourced_position_info: Optional[DataCollectionPositionInfo], |
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.
Related to my earlier comment, if the position info was part of the collection info, we wouldn't need an extra parameter in this base callback. Seems weird to add it to the base callback when only rotations are using it
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.
Some questions in the comments, but the change and tests look good.
@@ -845,7 +845,7 @@ def test_ispyb_deposition_in_rotation_plan( | |||
position_id = fetch_datacollection_attribute( | |||
dcid, DATA_COLLECTION_COLUMN_MAP["positionid"] | |||
) | |||
expected_values = {"posX": 10.0, "posY": 20.0, "posZ": 30.0} | |||
expected_values = {"posX": 1.0, "posY": 2.0, "posZ": 3.0} |
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.
How come this has changed?
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.
since we are now getting the info from the hardware, the expected values now come from the smargon fixture which had those xyz values which are coincidentally a factor of 10x smaller
Also, we need to remember to do the associated GDA change when merging this |
It's a separate sproc that you have to call to do the update, there is a special Position table which is referenced by a foreign-key in DataCollection |
…not GDA (DiamondLightSource/hyperion#1411) * (DiamondLightSource/hyperion#1303) read position for rotation scans in ispyb, remove position from ispyb_params * Make pyright happy * Make ruff happy
Fixes #1303
Link to dodal PR (if required): #N/A
(remember to update
setup.cfg
with the dodal commit tag if you need it for tests to pass!)To test: