From 6a0d10766f4b187d3c5151c40797b6d9c8d745c5 Mon Sep 17 00:00:00 2001 From: Julien Guy Date: Thu, 14 Jan 2021 20:41:54 -0800 Subject: [PATCH] replace test >0 by !=0 to avoid bias in the projection --- py/specter/psf/psf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/specter/psf/psf.py b/py/specter/psf/psf.py index fa2a155..38b3347 100644 --- a/py/specter/psf/psf.py +++ b/py/specter/psf/psf.py @@ -590,7 +590,7 @@ def project(self, wavelength, phot, specmin=0, xyrange=None, verbose=False): #- Evaluate positive photons within wavelength range wmin, wmax = self.wavelength(ispec, y=(0, self.npix_y)) for j, w in enumerate(wspec): - if np.any(phot[:,i,j] > 0.0) and (wmin <= w <= wmax): + if np.any(phot[:,i,j] != 0.0) and (wmin <= w <= wmax): xx, yy, pix = self.xypix(ispec, w, \ xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax) if (xx.stop > xx.start) and (yy.stop > yy.start):