Skip to content

Commit

Permalink
delete velo_diff column
Browse files Browse the repository at this point in the history
  • Loading branch information
allyson authored and sbailey committed Jul 26, 2024
1 parent b216f88 commit 6474368
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions py/redrock/zfind.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ def calc_deltachi2(chi2, z, zwarn, dvlimit=constants.max_velo_diff):
what the next chi2 would have been. This can also occur for the
last N targets if all N of them are within dvlimit of each other.
'''
print(chi2,z,zwarn,dvlimit)
nz = len(chi2)
deltachi2 = np.zeros(nz)
okfit = (zwarn & badfit_mask) == 0
Expand All @@ -132,7 +131,7 @@ def calc_deltachi2(chi2, z, zwarn, dvlimit=constants.max_velo_diff):

for i in range(len(chi2)-1):
dv = get_dv(z[i+1:], z[i])
ii = (np.abs(dv)>np.max(dvlimit[i],dvlimit[i+1:])) & okfit[i+1:]
ii = (np.abs(dv)>np.maximum(dvlimit[i],dvlimit[i+1:])) & okfit[i+1:]
if np.any(ii):
dchi2 = chi2[i+1:] - chi2[i]
deltachi2[i] = np.min(dchi2[ii])
Expand Down Expand Up @@ -584,7 +583,8 @@ def zfind(targets, templates, mp_procs=1, nminima=3, archetypes=None, priors=Non
tzfit['deltachi2'] = deltachi2
tzfit['zwarn'][setzwarn] |= ZW.SMALL_DELTA_CHI2

# remove max_velo_diff_column here?
# remove max_velo_diff column
del tzfit['max_velo_diff']

# Store
# Here convert to astropy table
Expand Down

0 comments on commit 6474368

Please sign in to comment.