Skip to content

Commit

Permalink
Change rerun criterion on QN qsos to match new prior.
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanagreen committed Jul 17, 2024
1 parent ab22246 commit 64f5245
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions py/desispec/scripts/qsoqn.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,9 @@ def selection_targets_with_QN(redrock, fibermap, sel_to_QN, DESI_TARGET, spectra
sel_QN[sel_to_QN] = is_qso_QN

sel_QSO_RR_with_no_z_pb = (redrock['SPECTYPE'] == 'QSO')
sel_QSO_RR_with_no_z_pb[sel_QN] &= np.abs(redrock['Z'][sel_QN] - z_QN[sel_index_with_QN]) <= 0.05
log.info(f"Remove {sel_QSO_RR_with_no_z_pb[sel_QN].sum()} objects with SPECTYPE==QSO and |z_RR - z_QN| < 0.05 (since even with the prior, RR will give the same result)")
prior_width = 0.0817591488 * (z_QN[sel_index_with_QN] + 1) # Analytic prior width from QN box width
sel_QSO_RR_with_no_z_pb[sel_QN] &= np.abs(redrock['Z'][sel_QN] - z_QN[sel_index_with_QN]) <= (prior_width / 2)
log.info(f"Remove {sel_QSO_RR_with_no_z_pb[sel_QN].sum()} objects with SPECTYPE==QSO and |z_RR - z_QN| < (prior_width / 2) (since even with the prior, RR will give the same result)")

sel_QN &= ~sel_QSO_RR_with_no_z_pb
index_with_QN_with_no_pb = sel_QN[sel_to_QN][index_with_QN]
Expand Down

0 comments on commit 64f5245

Please sign in to comment.