Skip to content

Commit

Permalink
replace test >0 by !=0 to avoid bias in the projection
Browse files Browse the repository at this point in the history
  • Loading branch information
julienguy committed Jan 15, 2021
1 parent f242a3d commit 6a0d107
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py/specter/psf/psf.py
Expand Up @@ -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):
Expand Down

0 comments on commit 6a0d107

Please sign in to comment.