Skip to content

Commit

Permalink
Merge pull request #88 from prvjapan/nanmax_bug
Browse files Browse the repository at this point in the history
Nanmax bug
  • Loading branch information
YuiKasagi committed Jun 25, 2024
2 parents b34c042 + e98fb52 commit 8deb77e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pyird/spec/wavcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def wavcal_thar(dat, W, Ni=5, Nx=4, maxiter=10, stdlim=0.005):
ind_low, ind_upp = max(ind - waround, 0), min(ind+waround+1, npix)
if np.nanmax(med[ind_low:ind_upp]) > np.nanpercentile(med[med>0], 80): #CHECK!!
pix_med = np.where(med == np.nanmax(med[ind_low:ind_upp]))[0]
pix_dat = np.where(dat[i, :] == max(dat[i, pix_med]))[0][0]
pix_dat = np.where(dat[i, :] == np.nanmax(dat[i, pix_med]))[0][0]
pix_tmp = pix_dat
wav = ref
data = [i+1-offset, pix_tmp, wav]
Expand Down

0 comments on commit 8deb77e

Please sign in to comment.