Skip to content

Commit

Permalink
Update test of calc_priorities
Browse files Browse the repository at this point in the history
Accounts for SV0_BGS and SV0_MWS having different obsconditions.
  • Loading branch information
apcooper committed Apr 8, 2020
1 parent 1a24471 commit 910fa30
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions py/desitarget/test/test_priorities.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,18 @@ def test_cmx_priorities(self):
colnames, masks, _ = main_cmx_or_sv(t)
cmx_mask = masks[0]

# ADM test handling of unobserved SV0_BGS and SV0_MWS.
for name in ["SV0_BGS", "SV0_MWS"]:
# ADM test handling of unobserved SV0_BGS.
for name in ["SV0_BGS"]:
t['CMX_TARGET'] = cmx_mask[name]
self.assertTrue(np.all(calc_priority(
t, z, "GRAY|DARK") == cmx_mask[name].priorities['UNOBS']))

# APC test handling of unobserved SV0_MWS.
for name in ["SV0_MWS"]:
t['CMX_TARGET'] = cmx_mask[name]
self.assertTrue(np.all(calc_priority(
t, z, "POOR") == cmx_mask[name].priorities['UNOBS']))

# ADM done is Done, regardless of ZWARN.
for name in ["SV0_BGS", "SV0_MWS"]:
t['CMX_TARGET'] = cmx_mask[name]
Expand Down

0 comments on commit 910fa30

Please sign in to comment.