Skip to content

Commit 2f732e3

Browse files
committed
Convert pixel size from string to float
1 parent 10a8a08 commit 2f732e3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/murfey/client/contexts/spa_metadata.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,11 @@ def post_transfer(
138138
logger.info(f"Atlas XML path {str(atlas_xml_path)} found")
139139
with open(atlas_xml_path, "rb") as atlas_xml:
140140
atlas_xml_data = xmltodict.parse(atlas_xml)
141-
atlas_original_pixel_size = atlas_xml_data["MicroscopeImage"][
142-
"SpatialScale"
143-
]["pixelSize"]["x"]["numericValue"]
141+
atlas_original_pixel_size = float(
142+
atlas_xml_data["MicroscopeImage"]["SpatialScale"]["pixelSize"]["x"][
143+
"numericValue"
144+
]
145+
)
144146

145147
# need to calculate the pixel size of the downscaled image
146148
atlas_pixel_size = atlas_original_pixel_size * 7.8

0 commit comments

Comments
 (0)