From 11105399eeb479e0c9bcc48924ea6c26fcc25e23 Mon Sep 17 00:00:00 2001 From: David Northover Date: Tue, 16 Dec 2025 13:57:32 -0500 Subject: [PATCH] Round Backprojected Values for Discrete Calculation - Float imprecision meant mulit-part segmentations weren't converting properly. - Now it rounds floats to 2 decimal places to address this float imprecision while avoiding inaccurate categorization. --- python/ouroboros/helpers/files.py | 1 + 1 file changed, 1 insertion(+) diff --git a/python/ouroboros/helpers/files.py b/python/ouroboros/helpers/files.py index 896a082..03ff151 100644 --- a/python/ouroboros/helpers/files.py +++ b/python/ouroboros/helpers/files.py @@ -218,6 +218,7 @@ def volume_from_intermediates(path: Path, shape: DataShape, discrete: bool = Fal nz = np.flatnonzero(vol[0]) vol[0, nz] /= vol[1, nz] if discrete: + vol[0] = np.round(vol[0], 2) vol[0, vol[0] % 1 != 0] = 0 return vol[0]