Skip to content

Commit

Permalink
Small check in case of nan radius
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandergagliano committed Jun 28, 2024
1 parent 834b5bb commit 81ce629
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion astro_ghost/DLR.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ def choose_band_SNR(host_df):
SNR = []
try:
for band in bands:
SNR.append(float(1/host_df.iloc[0, "%sKronMagErr"%band]))
if host_df.iloc[0, "%sKronMagErr"%band] == host_df.iloc[0, "%sKronMagErr"%band]:
SNR.append(float(1/host_df.iloc[0, "%sKronMagErr"%band]))
else:
SNR.append(np.nan)
i = np.nanargmax(np.array(SNR))
except:
#if we have issues getting the band with the highest SNR, just use r-band
Expand Down

0 comments on commit 81ce629

Please sign in to comment.