@@ -405,13 +405,34 @@ def do_insert_search_map(
405405 search_map_parameters .pixel_size *= (
406406 search_map_parameters .height / search_map_parameters .height_on_atlas
407407 )
408+ search_map_parameters .height = (
409+ int (search_map_parameters .height / 7.8 )
410+ if search_map_parameters .height
411+ else None
412+ )
413+ search_map_parameters .width = (
414+ int (search_map_parameters .width / 7.8 )
415+ if search_map_parameters .width
416+ else None
417+ )
418+ search_map_parameters .x_location = (
419+ int (search_map_parameters .x_location / 7.8 )
420+ if search_map_parameters .x_location
421+ else None
422+ )
423+ search_map_parameters .y_location = (
424+ int (search_map_parameters .y_location / 7.8 )
425+ if search_map_parameters .y_location
426+ else None
427+ )
408428 record = GridSquare (
409429 atlasId = atlas_id ,
410430 gridSquareImage = search_map_parameters .image ,
411431 pixelLocationX = search_map_parameters .x_location ,
412432 pixelLocationY = search_map_parameters .y_location ,
413433 height = search_map_parameters .height_on_atlas ,
414434 width = search_map_parameters .width_on_atlas ,
435+ angle = 0 ,
415436 stageLocationX = search_map_parameters .x_stage_position ,
416437 stageLocationY = search_map_parameters .y_stage_position ,
417438 pixelSize = search_map_parameters .pixel_size ,
@@ -452,13 +473,19 @@ def do_update_search_map(
452473 if search_map_parameters .image :
453474 grid_square .gridSquareImage = search_map_parameters .image
454475 if search_map_parameters .x_location :
455- grid_square .pixelLocationX = search_map_parameters .x_location
476+ grid_square .pixelLocationX = int (
477+ search_map_parameters .x_location / 7.8
478+ )
456479 if search_map_parameters .y_location :
457- grid_square .pixelLocationY = search_map_parameters .y_location
480+ grid_square .pixelLocationY = int (
481+ search_map_parameters .y_location / 7.8
482+ )
458483 if search_map_parameters .height_on_atlas :
459- grid_square .height = search_map_parameters .height_on_atlas
484+ grid_square .height = int (
485+ search_map_parameters .height_on_atlas / 7.8
486+ )
460487 if search_map_parameters .width_on_atlas :
461- grid_square .width = search_map_parameters .width_on_atlas
488+ grid_square .width = int ( search_map_parameters .width_on_atlas / 7.8 )
462489 if search_map_parameters .x_stage_position :
463490 grid_square .stageLocationX = search_map_parameters .x_stage_position
464491 if search_map_parameters .y_stage_position :
0 commit comments