From 68e84a82dae5ed625791618d5ac6af3aca8f2a68 Mon Sep 17 00:00:00 2001 From: Artur Glavic Date: Thu, 15 Oct 2026 15:12:23 +0200 Subject: [PATCH] Filter normalization with 0 counts also in no footprint mode --- eos/projection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eos/projection.py b/eos/projection.py index 8b93464..84f98f6 100644 --- a/eos/projection.py +++ b/eos/projection.py @@ -237,7 +237,7 @@ class LZProjection(ProjectionInterface): def normalize_no_footprint(self, norm: LZNormalisation): norm_lz = norm.norm - ref_lz = (self.data.I/norm_lz) + ref_lz = (self.data.I/np.where(norm_lz>0, norm_lz, np.nan)) ref_lz *= norm.monitor/self.monitor ref_lz[np.logical_not(self.data.mask)] = np.nan self.data.norm = norm_lz