diff --git a/HISTORY.rst b/HISTORY.rst index 17232846..5de24e01 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -16,6 +16,12 @@ Breaking changes: - Remove ``pixelsPerMicronX`` and ``pixelsPerMicronY`` columns from ``GridInfo`` - Remove ``pixelsPerMicronX`` and ``pixelsPerMicronY`` columns from ``upsert_dcg_grid`` +- Remove ``pixelsPerMicronX`` and ``pixelsPerMicronY`` columns from ``retrieve_grid_info_for_dc`` +- Remove ``pixelsPerMicronX`` and ``pixelsPerMicronY`` columns from ``retrieve_grid_info_for_dc_ids`` +- Remove ``pixelsPerMicronX`` and ``pixelsPerMicronY`` columns from ``retrieve_grid_info_for_dcg`` +- Remove ``pixelsPerMicronX`` and ``pixelsPerMicronY`` columns from ``retrieve_grid_info_for_dcg_v2`` +- Remove ``pixelsPerMicronX`` and ``pixelsPerMicronY`` columns from ``upsert_dc_grid`` +- Remove ``pixelsPerMicronX`` and ``pixelsPerMicronY`` columns from ``upsert_dcg_grid`` 4.13.0 (2026-04-13) ------------------- diff --git a/schemas/ispyb/routines.sql b/schemas/ispyb/routines.sql index e969ba74..81f0788f 100644 --- a/schemas/ispyb/routines.sql +++ b/schemas/ispyb/routines.sql @@ -4310,8 +4310,8 @@ BEGIN gi.steps_x, gi.steps_y, gi.meshAngle, - gi.pixelsPerMicronX, - gi.pixelsPerMicronY, + gi.micronsPerPixelX, + gi.micronsPerPixelY, gi.snapshot_offsetXPixel, gi.snapshot_offsetYPixel, gi.orientation, @@ -4328,8 +4328,8 @@ BEGIN gi.steps_x, gi.steps_y, gi.meshAngle, - gi.pixelsPerMicronX, - gi.pixelsPerMicronY, + gi.micronsPerPixelX, + gi.micronsPerPixelY, gi.snapshot_offsetXPixel, gi.snapshot_offsetYPixel, gi.orientation, @@ -4343,8 +4343,8 @@ BEGIN gi.steps_x, gi.steps_y, gi.meshAngle, - gi.pixelsPerMicronX, - gi.pixelsPerMicronY, + gi.micronsPerPixelX, + gi.micronsPerPixelY, gi.snapshot_offsetXPixel, gi.snapshot_offsetYPixel, gi.orientation, @@ -4384,8 +4384,8 @@ BEGIN gi.steps_x, gi.steps_y, gi.meshAngle, - gi.pixelsPerMicronX, - gi.pixelsPerMicronY, + gi.micronsPerPixelX, + gi.micronsPerPixelY, gi.snapshot_offsetXPixel, gi.snapshot_offsetYPixel, gi.orientation, @@ -4425,8 +4425,8 @@ BEGIN gi.steps_x, gi.steps_y, gi.meshAngle, - gi.pixelsPerMicronX, - gi.pixelsPerMicronY, + gi.micronsPerPixelX, + gi.micronsPerPixelY, gi.snapshot_offsetXPixel, gi.snapshot_offsetYPixel, gi.orientation, @@ -4442,14 +4442,14 @@ BEGIN gi.steps_x, gi.steps_y, gi.meshAngle, - gi.pixelsPerMicronX, - gi.pixelsPerMicronY, + gi.micronsPerPixelX, + gi.micronsPerPixelY, gi.snapshot_offsetXPixel, gi.snapshot_offsetYPixel, gi.orientation, gi.snaked ORDER BY gi.gridInfoId ASC; - ELSE + ELSE SELECT gi.gridInfoId, gi.dx_mm, @@ -4457,8 +4457,8 @@ BEGIN gi.steps_x, gi.steps_y, gi.meshAngle, - gi.pixelsPerMicronX, - gi.pixelsPerMicronY, + gi.micronsPerPixelX, + gi.micronsPerPixelY, gi.snapshot_offsetXPixel, gi.snapshot_offsetYPixel, gi.orientation, @@ -4477,7 +4477,7 @@ DELIMITER ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; -/*!50003 SET sql_mode = '' */ ; +/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ; /*!50003 DROP PROCEDURE IF EXISTS `retrieve_grid_info_for_dc_ids` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; @@ -4488,7 +4488,7 @@ DELIMITER ; DELIMITER ;; CREATE PROCEDURE `retrieve_grid_info_for_dc_ids`(IN p_dcIds TEXT) READS SQL DATA - COMMENT 'Return multi-row result-set with dc ID, grid info and some addit' + COMMENT 'Return multi-row result-set with dc ID, grid info and some additional related dc values' BEGIN IF NOT (p_dcIds IS NULL) THEN SELECT @@ -4497,8 +4497,8 @@ BEGIN gi.dy_mm, gi.steps_x, gi.steps_y, - gi.pixelsPerMicronX, - gi.pixelsPerMicronY, + gi.micronsPerPixelX, + gi.micronsPerPixelY, gi.snapshot_offsetXPixel, gi.snapshot_offsetYPixel, gi.orientation, @@ -9130,8 +9130,8 @@ CREATE PROCEDURE `upsert_dcg_grid`( p_stepsX double, p_stepsY double, p_meshAngle double, - p_pixelsPerMicronX float, - p_pixelsPerMicronY float, + p_micronsPerPixelX float, + p_micronsPerPixelY float, p_snapshotOffsetXPixel float, p_snapshotOffsetYPixel float, p_orientation enum('vertical','horizontal'), @@ -9141,10 +9141,10 @@ CREATE PROCEDURE `upsert_dcg_grid`( BEGIN IF p_dcgId IS NOT NULL THEN INSERT INTO GridInfo (gridInfoId, dataCollectionGroupId, dx_mm, dy_mm, steps_x, steps_y, meshAngle, - pixelsPerMicronX, pixelsPerMicronY, micronsPerPixelX, micronsPerPixelY, + micronsPerPixelX, micronsPerPixelY, snapshot_offsetXPixel, snapshot_offsetYPixel, orientation, snaked) VALUES (p_id, p_dcgId, p_dxInMm, p_dyInMm, p_stepsX, p_stepsY, p_meshAngle, - p_pixelsPerMicronX, p_pixelsPerMicronY, p_pixelsPerMicronX, p_pixelsPerMicronY, + p_micronsPerPixelX, p_micronsPerPixelY, p_snapshotOffsetXPixel, p_snapshotOffsetYPixel, p_orientation, p_snaked) ON DUPLICATE KEY UPDATE dataCollectionGroupId = IFNULL(p_dcgId, dataCollectionGroupId), @@ -9153,10 +9153,8 @@ BEGIN steps_x = IFNULL(p_stepsX, steps_x), steps_y = IFNULL(p_stepsY, steps_y), meshAngle = IFNULL(p_meshAngle, meshAngle), - pixelsPerMicronX = IFNULL(p_pixelsPerMicronX, pixelsPerMicronX), - pixelsPerMicronY = IFNULL(p_pixelsPerMicronY, pixelsPerMicronY), - micronsPerPixelX = IFNULL(p_pixelsPerMicronX, micronsPerPixelX), - micronsPerPixelY = IFNULL(p_pixelsPerMicronY, micronsPerPixelY), + micronsPerPixelX = IFNULL(p_micronsPerPixelX, micronsPerPixelX), + micronsPerPixelY = IFNULL(p_micronsPerPixelY, micronsPerPixelY), snapshot_offsetXPixel = IFNULL(p_snapshotOffsetXPixel, snapshot_offsetXPixel), snapshot_offsetYPixel = IFNULL(p_snapshotOffsetYPixel, snapshot_offsetYPixel), orientation = IFNULL(p_orientation, orientation), @@ -9229,8 +9227,8 @@ CREATE PROCEDURE `upsert_dc_grid`( p_stepsX double, p_stepsY double, p_meshAngle double, - p_pixelsPerMicronX float, - p_pixelsPerMicronY float, + p_micronsPerPixelX float, + p_micronsPerPixelY float, p_snapshotOffsetXPixel float, p_snapshotOffsetYPixel float, p_orientation enum('vertical','horizontal'), @@ -9240,11 +9238,9 @@ CREATE PROCEDURE `upsert_dc_grid`( BEGIN IF p_dcId IS NOT NULL THEN INSERT INTO GridInfo (gridInfoId, dataCollectionId, dx_mm, dy_mm, steps_x, steps_y, meshAngle, - pixelsPerMicronX, pixelsPerMicronY, micronsPerPixelX, micronsPerPixelY, - snapshot_offsetXPixel, snapshot_offsetYPixel, orientation, snaked) + micronsPerPixelX, micronsPerPixelY, snapshot_offsetXPixel, snapshot_offsetYPixel, orientation, snaked) VALUES (p_id, p_dcId, p_dxInMm, p_dyInMm, p_stepsX, p_stepsY, p_meshAngle, - p_pixelsPerMicronX, p_pixelsPerMicronY, p_pixelsPerMicronX, p_pixelsPerMicronY, - p_snapshotOffsetXPixel, p_snapshotOffsetYPixel, p_orientation, p_snaked) + p_micronsPerPixelX, p_micronsPerPixelY, p_snapshotOffsetXPixel, p_snapshotOffsetYPixel, p_orientation, p_snaked) ON DUPLICATE KEY UPDATE dataCollectionId = IFNULL(p_dcId, dataCollectionId), dx_mm = IFNULL(p_dxInMm, dx_mm), @@ -9252,10 +9248,8 @@ BEGIN steps_x = IFNULL(p_stepsX, steps_x), steps_y = IFNULL(p_stepsY, steps_y), meshAngle = IFNULL(p_meshAngle, meshAngle), - pixelsPerMicronX = IFNULL(p_pixelsPerMicronX, pixelsPerMicronX), - pixelsPerMicronY = IFNULL(p_pixelsPerMicronY, pixelsPerMicronY), - micronsPerPixelX = IFNULL(p_pixelsPerMicronX, micronsPerPixelX), - micronsPerPixelY = IFNULL(p_pixelsPerMicronY, micronsPerPixelY), + micronsPerPixelX = IFNULL(p_micronsPerPixelX, micronsPerPixelX), + micronsPerPixelY = IFNULL(p_micronsPerPixelY, micronsPerPixelY), snapshot_offsetXPixel = IFNULL(p_snapshotOffsetXPixel, snapshot_offsetXPixel), snapshot_offsetYPixel = IFNULL(p_snapshotOffsetYPixel, snapshot_offsetYPixel), orientation = IFNULL(p_orientation, orientation), diff --git a/schemas/ispyb/stored_programs/sp_retrieve_grid_info_for_dc.sql b/schemas/ispyb/stored_programs/sp_retrieve_grid_info_for_dc.sql index 98cd72e4..ec2c5f50 100644 --- a/schemas/ispyb/stored_programs/sp_retrieve_grid_info_for_dc.sql +++ b/schemas/ispyb/stored_programs/sp_retrieve_grid_info_for_dc.sql @@ -1,5 +1,5 @@ DELIMITER ;; -CREATE PROCEDURE `retrieve_grid_info_for_dc`(IN p_dcId int unsigned, p_authLogin varchar(45)) +CREATE OR REPLACE DEFINER=`ispyb_root`@`%` PROCEDURE `retrieve_grid_info_for_dc`(IN p_dcId int unsigned, p_authLogin varchar(45)) READS SQL DATA COMMENT 'Return multi-row result-set with grid info values for the dc' BEGIN @@ -12,8 +12,8 @@ BEGIN gi.steps_x, gi.steps_y, gi.meshAngle, - gi.pixelsPerMicronX, - gi.pixelsPerMicronY, + gi.micronsPerPixelX, + gi.micronsPerPixelY, gi.snapshot_offsetXPixel, gi.snapshot_offsetYPixel, gi.orientation, @@ -30,8 +30,8 @@ BEGIN gi.steps_x, gi.steps_y, gi.meshAngle, - gi.pixelsPerMicronX, - gi.pixelsPerMicronY, + gi.micronsPerPixelX, + gi.micronsPerPixelY, gi.snapshot_offsetXPixel, gi.snapshot_offsetYPixel, gi.orientation, @@ -45,8 +45,8 @@ BEGIN gi.steps_x, gi.steps_y, gi.meshAngle, - gi.pixelsPerMicronX, - gi.pixelsPerMicronY, + gi.micronsPerPixelX, + gi.micronsPerPixelY, gi.snapshot_offsetXPixel, gi.snapshot_offsetYPixel, gi.orientation, @@ -59,4 +59,4 @@ BEGIN SIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=1644, MESSAGE_TEXT='Mandatory argument p_dcId is NULL'; END IF; END ;; -DELIMITER ; \ No newline at end of file +DELIMITER ; diff --git a/schemas/ispyb/stored_programs/sp_retrieve_grid_info_for_dc_ids.sql b/schemas/ispyb/stored_programs/sp_retrieve_grid_info_for_dc_ids.sql index 2d6962c5..27fd3316 100644 --- a/schemas/ispyb/stored_programs/sp_retrieve_grid_info_for_dc_ids.sql +++ b/schemas/ispyb/stored_programs/sp_retrieve_grid_info_for_dc_ids.sql @@ -10,8 +10,8 @@ BEGIN gi.dy_mm, gi.steps_x, gi.steps_y, - gi.pixelsPerMicronX, - gi.pixelsPerMicronY, + gi.micronsPerPixelX, + gi.micronsPerPixelY, gi.snapshot_offsetXPixel, gi.snapshot_offsetYPixel, gi.orientation, diff --git a/schemas/ispyb/stored_programs/sp_retrieve_grid_info_for_dcg.sql b/schemas/ispyb/stored_programs/sp_retrieve_grid_info_for_dcg.sql index bcadcce6..7b1020fd 100644 --- a/schemas/ispyb/stored_programs/sp_retrieve_grid_info_for_dcg.sql +++ b/schemas/ispyb/stored_programs/sp_retrieve_grid_info_for_dcg.sql @@ -11,8 +11,8 @@ BEGIN gi.steps_x, gi.steps_y, gi.meshAngle, - gi.pixelsPerMicronX, - gi.pixelsPerMicronY, + gi.micronsPerPixelX, + gi.micronsPerPixelY, gi.snapshot_offsetXPixel, gi.snapshot_offsetYPixel, gi.orientation, diff --git a/schemas/ispyb/stored_programs/sp_retrieve_grid_info_for_dcg_v2.sql b/schemas/ispyb/stored_programs/sp_retrieve_grid_info_for_dcg_v2.sql index 5d460f34..dac73d7b 100644 --- a/schemas/ispyb/stored_programs/sp_retrieve_grid_info_for_dcg_v2.sql +++ b/schemas/ispyb/stored_programs/sp_retrieve_grid_info_for_dcg_v2.sql @@ -12,8 +12,8 @@ BEGIN gi.steps_x, gi.steps_y, gi.meshAngle, - gi.pixelsPerMicronX, - gi.pixelsPerMicronY, + gi.micronsPerPixelX, + gi.micronsPerPixelY, gi.snapshot_offsetXPixel, gi.snapshot_offsetYPixel, gi.orientation, @@ -29,8 +29,8 @@ BEGIN gi.steps_x, gi.steps_y, gi.meshAngle, - gi.pixelsPerMicronX, - gi.pixelsPerMicronY, + gi.micronsPerPixelX, + gi.micronsPerPixelY, gi.snapshot_offsetXPixel, gi.snapshot_offsetYPixel, gi.orientation, @@ -44,8 +44,8 @@ BEGIN gi.steps_x, gi.steps_y, gi.meshAngle, - gi.pixelsPerMicronX, - gi.pixelsPerMicronY, + gi.micronsPerPixelX, + gi.micronsPerPixelY, gi.snapshot_offsetXPixel, gi.snapshot_offsetYPixel, gi.orientation, diff --git a/schemas/ispyb/stored_programs/sp_upsert_dc_grid.sql b/schemas/ispyb/stored_programs/sp_upsert_dc_grid.sql index 392d8a32..03e927c1 100644 --- a/schemas/ispyb/stored_programs/sp_upsert_dc_grid.sql +++ b/schemas/ispyb/stored_programs/sp_upsert_dc_grid.sql @@ -7,8 +7,8 @@ CREATE OR REPLACE DEFINER=`ispyb_root`@`%` PROCEDURE `upsert_dc_grid`( p_stepsX double, p_stepsY double, p_meshAngle double, - p_pixelsPerMicronX float, - p_pixelsPerMicronY float, + p_micronsPerPixelX float, + p_micronsPerPixelY float, p_snapshotOffsetXPixel float, p_snapshotOffsetYPixel float, p_orientation enum('vertical','horizontal'), @@ -18,11 +18,9 @@ CREATE OR REPLACE DEFINER=`ispyb_root`@`%` PROCEDURE `upsert_dc_grid`( BEGIN IF p_dcId IS NOT NULL THEN INSERT INTO GridInfo (gridInfoId, dataCollectionId, dx_mm, dy_mm, steps_x, steps_y, meshAngle, - pixelsPerMicronX, pixelsPerMicronY, micronsPerPixelX, micronsPerPixelY, - snapshot_offsetXPixel, snapshot_offsetYPixel, orientation, snaked) + micronsPerPixelX, micronsPerPixelY, snapshot_offsetXPixel, snapshot_offsetYPixel, orientation, snaked) VALUES (p_id, p_dcId, p_dxInMm, p_dyInMm, p_stepsX, p_stepsY, p_meshAngle, - p_pixelsPerMicronX, p_pixelsPerMicronY, p_pixelsPerMicronX, p_pixelsPerMicronY, - p_snapshotOffsetXPixel, p_snapshotOffsetYPixel, p_orientation, p_snaked) + p_micronsPerPixelX, p_micronsPerPixelY, p_snapshotOffsetXPixel, p_snapshotOffsetYPixel, p_orientation, p_snaked) ON DUPLICATE KEY UPDATE dataCollectionId = IFNULL(p_dcId, dataCollectionId), dx_mm = IFNULL(p_dxInMm, dx_mm), @@ -30,10 +28,8 @@ BEGIN steps_x = IFNULL(p_stepsX, steps_x), steps_y = IFNULL(p_stepsY, steps_y), meshAngle = IFNULL(p_meshAngle, meshAngle), - pixelsPerMicronX = IFNULL(p_pixelsPerMicronX, pixelsPerMicronX), - pixelsPerMicronY = IFNULL(p_pixelsPerMicronY, pixelsPerMicronY), - micronsPerPixelX = IFNULL(p_pixelsPerMicronX, micronsPerPixelX), - micronsPerPixelY = IFNULL(p_pixelsPerMicronY, micronsPerPixelY), + micronsPerPixelX = IFNULL(p_micronsPerPixelX, micronsPerPixelX), + micronsPerPixelY = IFNULL(p_micronsPerPixelY, micronsPerPixelY), snapshot_offsetXPixel = IFNULL(p_snapshotOffsetXPixel, snapshot_offsetXPixel), snapshot_offsetYPixel = IFNULL(p_snapshotOffsetYPixel, snapshot_offsetYPixel), orientation = IFNULL(p_orientation, orientation), diff --git a/schemas/ispyb/stored_programs/sp_upsert_dcg_grid.sql b/schemas/ispyb/stored_programs/sp_upsert_dcg_grid.sql index 2f187f37..0b250343 100644 --- a/schemas/ispyb/stored_programs/sp_upsert_dcg_grid.sql +++ b/schemas/ispyb/stored_programs/sp_upsert_dcg_grid.sql @@ -34,8 +34,8 @@ BEGIN steps_x = IFNULL(p_stepsX, steps_x), steps_y = IFNULL(p_stepsY, steps_y), meshAngle = IFNULL(p_meshAngle, meshAngle), - micronsPerPixelX = IFNULL(p_pixelsPerMicronX, micronsPerPixelX), - micronsPerPixelY = IFNULL(p_pixelsPerMicronY, micronsPerPixelY), + micronsPerPixelX = IFNULL(p_micronsPerPixelX, micronsPerPixelX), + micronsPerPixelY = IFNULL(p_micronsPerPixelY, micronsPerPixelY), snapshot_offsetXPixel = IFNULL(p_snapshotOffsetXPixel, snapshot_offsetXPixel), snapshot_offsetYPixel = IFNULL(p_snapshotOffsetYPixel, snapshot_offsetYPixel), orientation = IFNULL(p_orientation, orientation),