Skip to content

Commit 7e960dc

Browse files
committed
fallback for pixel size
1 parent fc4a0cc commit 7e960dc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

iohub/mmstack.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,11 +332,13 @@ def _infer_image_meta(self) -> None:
332332
if metadata is not None:
333333
try:
334334
self._xy_pixel_size = float(metadata["PixelSizeUm"])
335-
return
335+
if self._xy_pixel_size > 0:
336+
return
336337
except Exception:
337-
pass
338+
logging.warning(
339+
"Micro-Manager image plane metadata cannot be loaded."
340+
)
338341
logging.warning(
339-
"Micro-Manager image plane metadata cannot be loaded. "
340342
"XY pixel size cannot be determined, defaulting to 1.0 um."
341343
)
342344
self._xy_pixel_size = 1.0

0 commit comments

Comments
 (0)