Skip to content

Commit

Permalink
Replace negative SNR to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
ysBach committed Feb 15, 2023
1 parent 8616cd9 commit 5304abc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ysphotutilpy/apphot.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ def _propagate_ccdmask(ccd, additional_mask=None):

phot["source_sum_err"] = np.sqrt(var_errmap + var_skyrand)
snr = np.array(phot['source_sum'])/np.array(phot["source_sum_err"])
snr[snr < 0] = 0
phot["mag"] = -2.5*np.log10(phot['source_sum']/t_exposure)
phot["merr"] = 2.5/np.log(10)*(1/snr)
phot["snr"] = snr
Expand Down

0 comments on commit 5304abc

Please sign in to comment.