diff --git a/pyproject.toml b/pyproject.toml index 169939d5..4d4c3799 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ dependencies = [ "graypy", "healpy", "icebreaker-em", - "ispyb>=11.0.3", + "ispyb>=11.0.5", "mrcfile", "numpy<2", "pillow", diff --git a/recipes/em-tomo-align.json b/recipes/em-tomo-align.json index 3886bf31..d413ef34 100644 --- a/recipes/em-tomo-align.json +++ b/recipes/em-tomo-align.json @@ -5,7 +5,10 @@ "dcid": "{dcid}", "ispyb_command": "insert_tomogram", "program_id": "{appid}", - "store_result": "ispyb_tomogram_id" + "store_result": "ispyb_tomogram_id", + "pixel_location_x": "{x_location}", + "pixel_location_y": "{y_location}", + "grid_square_id": "{search_map_id}" }, "queue": "ispyb_connector", "service": "EMISPyB" diff --git a/src/cryoemservices/util/ispyb_commands.py b/src/cryoemservices/util/ispyb_commands.py index fd9a43ab..f2335ab9 100644 --- a/src/cryoemservices/util/ispyb_commands.py +++ b/src/cryoemservices/util/ispyb_commands.py @@ -616,6 +616,9 @@ def full_parameters(param): projXY=full_parameters("proj_xy"), projXZ=full_parameters("proj_xz"), globalAlignmentQuality=full_parameters("alignment_quality"), + gridSquareId=full_parameters("grid_square_id"), + pixelLocationX=full_parameters("pixel_location_x"), + pixelLocationY=full_parameters("pixel_location_y"), ) tomogram_row = ( session.query(models.Tomogram) diff --git a/tests/recipes/test_recipes.py b/tests/recipes/test_recipes.py index 13f04427..0ffe4351 100644 --- a/tests/recipes/test_recipes.py +++ b/tests/recipes/test_recipes.py @@ -46,6 +46,9 @@ class ISPyBParameters(BaseModel): status: str store_result: str tomogram_id: int + grid_square_id: int + pixel_location_x: float + pixel_location_y: float class MurfeyParameters(BaseModel): diff --git a/tests/util/test_ispyb_commands.py b/tests/util/test_ispyb_commands.py index 6a8a5820..50789a64 100644 --- a/tests/util/test_ispyb_commands.py +++ b/tests/util/test_ispyb_commands.py @@ -744,6 +744,9 @@ def mock_tomogram_parameters(p): "proj_xy": "/path/to/xy", "proj_xz": "/path/to/xz", "alignment_quality": 0.2, + "grid_square_id": 12345, + "pixel_location_x": 200, + "pixel_location_y": 400, } return tomogram_parameters[p] @@ -783,6 +786,9 @@ def mock_tomogram_parameters(p): projXY="/path/to/xy", projXZ="/path/to/xz", globalAlignmentQuality=0.2, + gridSquareId=12345, + pixelLocationX=200, + pixelLocationY=400, ) mock_session.add.assert_called() mock_session.commit.assert_called() @@ -812,6 +818,9 @@ def mock_tomogram_parameters(p): "proj_xy": "/path/to/xy", "proj_xz": "/path/to/xz", "alignment_quality": 0.2, + "grid_square_id": 12345, + "pixel_location_x": 200, + "pixel_location_y": 400, } return tomogram_parameters[p] @@ -852,6 +861,9 @@ def mock_tomogram_parameters(p): "projXY": "/path/to/xy", "projXZ": "/path/to/xz", "globalAlignmentQuality": 0.2, + "gridSquareId": 12345, + "pixelLocationX": 200, + "pixelLocationY": 400, } ) mock_session.add.assert_not_called()