Skip to content

Commit

Permalink
igor's suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodlz committed Nov 28, 2023
1 parent 9b699bf commit 5b1a17d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kowalski/alert_brokers/alert_broker_ztf.py
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,12 @@ def flux_to_mag(self, flux, fluxerr, zp):
magerr = 1.0857 * (values[1] / values[0])
limmag3sig = -2.5 * np.log10(3 * values[1]) + values[2]
limmag5sig = -2.5 * np.log10(5 * values[1]) + values[2]
if snr < 0:
if np.isnan(snr):
return {}
if snr < 0:
return {
"snr": snr,
}
mag_data = {
"mag": mag,
"magerr": magerr,
Expand Down

0 comments on commit 5b1a17d

Please sign in to comment.