From a807d07fe6c47d21fd7420f6748732948e55ae1d Mon Sep 17 00:00:00 2001 From: David Manthey Date: Fri, 11 Nov 2022 09:00:29 -0500 Subject: [PATCH] Fix nd2 source scale. --- CHANGELOG.md | 1 + sources/nd2/large_image_source_nd2/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc4860bea..a81b20732 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Bug Fixes - Use open.read rather than download to access files in Girder ([#989](../../pull/989)) +- Fix nd2 source scale ([#990](../../pull/990)) ## 1.17.3 diff --git a/sources/nd2/large_image_source_nd2/__init__.py b/sources/nd2/large_image_source_nd2/__init__.py index 88aaffa7d..f9e11cba8 100644 --- a/sources/nd2/large_image_source_nd2/__init__.py +++ b/sources/nd2/large_image_source_nd2/__init__.py @@ -184,8 +184,8 @@ def getNativeMagnification(self): microns = None try: microns = self._nd2.voxel_size() - mm_x = microns.x * 1000 - mm_y = microns.y * 1000 + mm_x = microns.x * 0.001 + mm_y = microns.y * 0.001 except Exception: pass # Estimate the magnification; we don't have a direct value