From 3a7f3cde535759642d9ef14df7fe8dec92f4ca85 Mon Sep 17 00:00:00 2001 From: Artur Glavic Date: Fri, 27 Feb 2026 08:06:16 +0100 Subject: [PATCH] fix sqrt invalid value warning in footprint correction --- eos/projection.py | 1 + 1 file changed, 1 insertion(+) diff --git a/eos/projection.py b/eos/projection.py index 7f1785c..2cdc50e 100644 --- a/eos/projection.py +++ b/eos/projection.py @@ -224,6 +224,7 @@ class LZProjection(ProjectionInterface): # do not perform gravity correction for footprint, would require norm detector distance that is unknown here fp_corr_lz = np.where(np.absolute(delta_lz+norm.angle)>5e-3, (delta_lz+self.angle)/(delta_lz+norm.angle), np.nan) + fp_corr_lz[fp_corr_lz<0] = np.nan self.data.mask &= np.logical_not(np.isnan(fp_corr_lz)) self.data.norm = norm_lz*fp_corr_lz self.norm_monitor = norm.monitor