@@ -98,18 +98,9 @@ def test_register_search_map_update_with_all_parameters(
9898 pixel_size = 1e-7 ,
9999 image = "path/to/image" ,
100100 binning = 1 ,
101- reference_matrix_m11 = 1.01 ,
102- reference_matrix_m12 = 0.01 ,
103- reference_matrix_m21 = 0.02 ,
104- reference_matrix_m22 = 1.02 ,
105- stage_correction_m11 = 0.99 ,
106- stage_correction_m12 = - 0.01 ,
107- stage_correction_m21 = - 0.02 ,
108- stage_correction_m22 = 0.98 ,
109- image_shift_correction_m11 = 1.03 ,
110- image_shift_correction_m12 = 0.03 ,
111- image_shift_correction_m21 = - 0.03 ,
112- image_shift_correction_m22 = 0.97 ,
101+ reference_matrix = {"m11" : 1.01 , "m12" : 0.01 , "m21" : 0.02 , "m22" : 1.02 },
102+ stage_correction = {"m11" : 0.99 , "m12" : - 0.01 , "m21" : - 0.02 , "m22" : 0.98 },
103+ image_shift_correction = {"m11" : 1.03 , "m12" : 0.03 , "m21" : - 0.03 , "m22" : 0.97 },
113104 )
114105
115106 # Run the registration
@@ -204,16 +195,6 @@ def test_register_search_map_insert_with_ispyb(
204195
205196def test_register_batch_position_update (murfey_db_session : Session ):
206197 """Test the updating of an existing tilt series with batch positions"""
207- # Create a tilt series to update
208- tilt_series = TiltSeries (
209- tag = "Position_1" ,
210- rsync_source = "session_tag" ,
211- session_id = ExampleVisit .murfey_session_id ,
212- search_map_id = 1 ,
213- )
214- murfey_db_session .add (tilt_series )
215- murfey_db_session .commit ()
216-
217198 # Make sure search map is present
218199 search_map = SearchMap (
219200 id = 1 ,
@@ -241,6 +222,16 @@ def test_register_batch_position_update(murfey_db_session: Session):
241222 murfey_db_session .add (search_map )
242223 murfey_db_session .commit ()
243224
225+ # Create a tilt series to update
226+ tilt_series = TiltSeries (
227+ tag = "Position_1" ,
228+ rsync_source = "session_tag" ,
229+ session_id = ExampleVisit .murfey_session_id ,
230+ search_map_id = 1 ,
231+ )
232+ murfey_db_session .add (tilt_series )
233+ murfey_db_session .commit ()
234+
244235 # Parameters to update with
245236 new_parameters = BatchPositionParameters (
246237 tag = "session_tag" ,
@@ -264,18 +255,6 @@ def test_register_batch_position_update(murfey_db_session: Session):
264255
265256def test_register_batch_position_update_skip (murfey_db_session : Session ):
266257 """Test the updating of an existing batch position, skipped as already done"""
267- # Create a tilt series to update
268- tilt_series = TiltSeries (
269- tag = "Position_1" ,
270- rsync_source = "session_tag" ,
271- session_id = ExampleVisit .murfey_session_id ,
272- search_map_id = 1 ,
273- x_location = 100 ,
274- y_location = 200 ,
275- )
276- murfey_db_session .add (tilt_series )
277- murfey_db_session .commit ()
278-
279258 # Make sure search map is present
280259 search_map = SearchMap (
281260 id = 1 ,
@@ -303,6 +282,18 @@ def test_register_batch_position_update_skip(murfey_db_session: Session):
303282 murfey_db_session .add (search_map )
304283 murfey_db_session .commit ()
305284
285+ # Create a tilt series to update
286+ tilt_series = TiltSeries (
287+ tag = "Position_1" ,
288+ rsync_source = "session_tag" ,
289+ session_id = ExampleVisit .murfey_session_id ,
290+ search_map_id = 1 ,
291+ x_location = 100 ,
292+ y_location = 200 ,
293+ )
294+ murfey_db_session .add (tilt_series )
295+ murfey_db_session .commit ()
296+
306297 # Parameters to update with
307298 new_parameters = BatchPositionParameters (
308299 tag = "session_tag" ,
0 commit comments