Skip to content

Commit

Permalink
Merge 3af9d56 into 28ae2a2
Browse files Browse the repository at this point in the history
  • Loading branch information
geordie666 committed Dec 8, 2018
2 parents 28ae2a2 + 3af9d56 commit 8ba09fa
Show file tree
Hide file tree
Showing 12 changed files with 781 additions and 547 deletions.
8 changes: 8 additions & 0 deletions doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ desitarget Change Log
0.26.0 (unreleased)
-------------------

* Refactor of MTL and MTL-related enhancements [`PR #429`_]. Includes:
* Use targets file `NUMOBS_INIT` not :func:`targets.calc_numobs`.
* Use targets file `PRIORITY_INIT` not :func:`targets.calc_priority`.
* Remove table copies from :mod:`desitarget.mtl` to use less memory.
* New function :func:`targets.calc_priority_no_table` to use less memory.
* Set informational (`NORTH/SOUTH`) bits to 0 `PRIORITY` and `NUMOBS`.
* Set priorities using `LRG_1PASS/2PASS` bits rather than on `LRG`.
* Minor updates to `select_mock_targets` [`PR #425`_].
* Use pre-computed template photometry (requires `v3.1` basis templates).
* Include MW dust extinction in the spectra.
Expand All @@ -25,6 +32,7 @@ desitarget Change Log
.. _`PR #423`: https://github.com/desihub/desitarget/pull/423
.. _`PR #424`: https://github.com/desihub/desitarget/pull/424
.. _`PR #425`: https://github.com/desihub/desitarget/pull/425
.. _`PR #429`: https://github.com/desihub/desitarget/pull/429

0.25.0 (2018-11-07)
-------------------
Expand Down
2 changes: 1 addition & 1 deletion py/desitarget/cmx/cmx_cuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ def _finalize_targets(objects, cmx_target, priority_shift):
targets = finalize(objects, cmx_target, cmx_target, cmx_target,
survey='cmx')
# ADM shift the priorities of targets with functional priorities.
targets["PRIORITY"] += priority_shift
targets["PRIORITY_INIT"] += priority_shift

return targets

Expand Down
161 changes: 84 additions & 77 deletions py/desitarget/data/targetmask.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ desi_mask:
- [QSO, 2, "QSO", {obsconditions: DARK}]

#- ADM allow the primary targets to be split by number of passes
- [LRG_1PASS, 3, "LRG observed in 1st pass", {obsconditions: DARK}]
- [LRG_2PASS, 4, "LRG observed in 2nd pass", {obsconditions: DARK}]
- [LRG_1PASS, 3, "LRG to be observed once", {obsconditions: DARK}]
- [LRG_2PASS, 4, "LRG to be observed twice", {obsconditions: DARK}]

#- North vs. South selections
- [LRG_NORTH, 8, "LRG from Bok/Mosaic data", {obsconditions: DARK}]
- [ELG_NORTH, 9, "ELG from Bok/Mosaic data", {obsconditions: DARK|GRAY}]
- [QSO_NORTH, 10, "QSO from Bok/Mosaic data", {obsconditions: DARK}]
- [LRG_NORTH, 8, "LRG cuts tuned for Bok/Mosaic data", {obsconditions: DARK}]
- [ELG_NORTH, 9, "ELG cuts tuned for Bok/Mosaic data", {obsconditions: DARK|GRAY}]
- [QSO_NORTH, 10, "QSO cuts tuned for Bok/Mosaic data", {obsconditions: DARK}]

- [LRG_SOUTH, 16, "LRG from DECam data", {obsconditions: DARK}]
- [ELG_SOUTH, 17, "ELG from DECam data", {obsconditions: DARK|GRAY}]
- [QSO_SOUTH, 18, "QSO from DECam data", {obsconditions: DARK}]
- [LRG_SOUTH, 16, "LRG cuts tuned for DECam data", {obsconditions: DARK}]
- [ELG_SOUTH, 17, "ELG cuts tuned for DECam data", {obsconditions: DARK|GRAY}]
- [QSO_SOUTH, 18, "QSO cuts tuned for DECam data", {obsconditions: DARK}]

#- North vs. South selections for different passes
- [LRG_1PASS_NORTH, 24, "LRG observed in 1st pass from Bok/Mosaic", {obsconditions: DARK}]
- [LRG_2PASS_NORTH, 25, "LRG observed in 2nd pass from Bok/Mosaic", {obsconditions: DARK}]
- [LRG_1PASS_NORTH, 24, "LRG to be observed once tuned for Bok/Mosaic", {obsconditions: DARK}]
- [LRG_2PASS_NORTH, 25, "LRG to be observed twice tuned for Bok/Mosaic", {obsconditions: DARK}]

- [LRG_1PASS_SOUTH, 28, "LRG observed in 1st pass from DECam", {obsconditions: DARK}]
- [LRG_2PASS_SOUTH, 29, "LRG observed in 2nd pass from DECam", {obsconditions: DARK}]
- [LRG_1PASS_SOUTH, 28, "LRG to be observed once tuned for DECam", {obsconditions: DARK}]
- [LRG_2PASS_SOUTH, 29, "LRG to be observed twice tuned for DECam", {obsconditions: DARK}]

#- Calibration targets
- [SKY, 32, "Blank sky locations",
Expand All @@ -39,7 +39,7 @@ desi_mask:
{obsconditions: DARK|GRAY|BRIGHT|POOR|TWILIGHT12|TWILIGHT18}]

#- Reserving some bits that we may not use
# - [STD_FAINT_BEST, 37, "High quality faint standard stars", {obsconditions: DARK|GRAY}]
# - [STD_FAINT_BEST, 37, "High quality faint standard stars", {obsconditions: DARK|GRAY}]
# - [STD_BRIGHT_BEST, 38, "High quality bright standard stars", {obsconditions: BRIGHT}]

#- Reserved convenience bits that can, e.g., be set downstream of desitarget
Expand All @@ -60,22 +60,22 @@ desi_mask:

#- Bright Galaxy Survey
bgs_mask:
- [BGS_FAINT, 0, "BGS faint targets", {obsconditions: BRIGHT|GRAY|DARK}]
- [BGS_FAINT, 0, "BGS faint targets", {obsconditions: BRIGHT|GRAY|DARK}]
- [BGS_BRIGHT, 1, "BGS bright targets", {obsconditions: BRIGHT}]
- [BGS_WISE, 2, "BGS wise targets", {obsconditions: BRIGHT}] #GRAY and DARK?
- [BGS_WISE, 2, "BGS wise targets", {obsconditions: BRIGHT}] #GRAY and DARK?

#- BGS North vs. South selections
- [BGS_FAINT_NORTH, 8, "BGS faint targets from Bok/Mosaic", {obsconditions: BRIGHT|GRAY|DARK}]
- [BGS_BRIGHT_NORTH, 9, "BGS bright targets from Bok/Mosaic", {obsconditions: BRIGHT}]
- [BGS_WISE_NORTH, 10, "BGS wise targets from Bok/Mosaic", {obsconditions: BRIGHT}] #GRAY and DARK?
- [BGS_FAINT_SOUTH, 16, "BGS faint targets from DECam", {obsconditions: BRIGHT|GRAY|DARK}]
- [BGS_BRIGHT_SOUTH, 17, "BGS bright targets from DECam", {obsconditions: BRIGHT}]
- [BGS_WISE_SOUTH, 18, "BGS wise targets from DECam", {obsconditions: BRIGHT}] #GRAY and DARK?
- [BGS_FAINT_NORTH, 8, "BGS faint cuts tuned for Bok/Mosaic", {obsconditions: BRIGHT|GRAY|DARK}]
- [BGS_BRIGHT_NORTH, 9, "BGS bright cuts tuned for Bok/Mosaic", {obsconditions: BRIGHT}]
- [BGS_WISE_NORTH, 10, "BGS WISE cuts tuned for Bok/Mosaic", {obsconditions: BRIGHT}] #GRAY and DARK?
- [BGS_FAINT_SOUTH, 16, "BGS faint cuts tuned for DECam", {obsconditions: BRIGHT|GRAY|DARK}]
- [BGS_BRIGHT_SOUTH, 17, "BGS bright cuts tuned for DECam", {obsconditions: BRIGHT}]
- [BGS_WISE_SOUTH, 18, "BGS wise cuts tuned for DECam", {obsconditions: BRIGHT}] #GRAY and DARK?

- [BGS_KNOWN_ANY, 40, "Known target from another survey", {obsconditions: BRIGHT}]
- [BGS_KNOWN_ANY, 40, "Known target from another survey", {obsconditions: BRIGHT}]
- [BGS_KNOWN_COLLIDED, 41, "BGS known SDSS/BOSS fiber collided", {obsconditions: BRIGHT}]
- [BGS_KNOWN_SDSS, 42, "BGS known SDSS targets", {obsconditions: BRIGHT}]
- [BGS_KNOWN_BOSS, 43, "BGS known BOSS targets", {obsconditions: BRIGHT}]
- [BGS_KNOWN_SDSS, 42, "BGS known SDSS targets", {obsconditions: BRIGHT}]
- [BGS_KNOWN_BOSS, 43, "BGS known BOSS targets", {obsconditions: BRIGHT}]

#- Milky Way Survey
mws_mask:
Expand All @@ -100,16 +100,16 @@ mws_mask:
# targeted for reobservation if possible.

#- 4: MWS_BROAD north/south splits
- [MWS_BROAD_NORTH, 4, "Milky Way Survey targets from Bok/Mosaic", {obsconditions: BRIGHT|GRAY|DARK}]
- [MWS_BROAD_SOUTH, 5, "Milky Way Survey targets from DECam", {obsconditions: BRIGHT|GRAY|DARK}]
- [MWS_BROAD_NORTH, 4, "Milky Way Survey cuts tuned for Bok/Mosaic", {obsconditions: BRIGHT|GRAY|DARK}]
- [MWS_BROAD_SOUTH, 5, "Milky Way Survey cuts tuned for DECam", {obsconditions: BRIGHT|GRAY|DARK}]

#- 8: Sub-classes of MWS_MAIN
- [MWS_MAIN_BLUE, 8, "Milky Way Survey magnitude limited blue sample", {obsconditions: BRIGHT|GRAY|DARK}]
- [MWS_MAIN_BLUE_NORTH, 9, "MWS magnitude limited blue sample from Bok/Mosaic", {obsconditions: BRIGHT|GRAY|DARK}]
- [MWS_MAIN_BLUE_SOUTH, 10, "MWS magnitude limited blue sample from DECam", {obsconditions: BRIGHT|GRAY|DARK}]
- [MWS_MAIN_RED, 11, "Milky Way Survey magnitude limited red sample", {obsconditions: BRIGHT|GRAY|DARK}]
- [MWS_MAIN_RED_NORTH, 12, "MWS magnitude limited red sample from Bok/Mosaic", {obsconditions: BRIGHT|GRAY|DARK}]
- [MWS_MAIN_RED_SOUTH, 13, "MWS magnitude limited red sample from DECam", {obsconditions: BRIGHT|GRAY|DARK}]
- [MWS_MAIN_BLUE, 8, "Milky Way Survey magnitude limited blue sample", {obsconditions: BRIGHT|GRAY|DARK}]
- [MWS_MAIN_BLUE_NORTH, 9, "MWS magnitude limited blue sample tuned for Bok/Mosaic", {obsconditions: BRIGHT|GRAY|DARK}]
- [MWS_MAIN_BLUE_SOUTH, 10, "MWS magnitude limited blue sample tuned for DECam", {obsconditions: BRIGHT|GRAY|DARK}]
- [MWS_MAIN_RED, 11, "Milky Way Survey magnitude limited red sample", {obsconditions: BRIGHT|GRAY|DARK}]
- [MWS_MAIN_RED_NORTH, 12, "MWS magnitude limited red sample tuned for Bok/Mosaic", {obsconditions: BRIGHT|GRAY|DARK}]
- [MWS_MAIN_RED_SOUTH, 13, "MWS magnitude limited red sample tuned for DECam", {obsconditions: BRIGHT|GRAY|DARK}]

#- Observing conditions
#- These are a bitmask to allow target bits to specify multiple conditions
Expand Down Expand Up @@ -166,16 +166,17 @@ priorities:
QSO: {UNOBS: 3400, MORE_ZGOOD: 3500, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
LRG_1PASS: SAME_AS_LRG
LRG_2PASS: SAME_AS_LRG
LRG_NORTH: SAME_AS_LRG
ELG_NORTH: SAME_AS_ELG
QSO_NORTH: SAME_AS_QSO
LRG_SOUTH: SAME_AS_LRG
ELG_SOUTH: SAME_AS_ELG
QSO_SOUTH: SAME_AS_QSO
LRG_1PASS_NORTH: SAME_AS_LRG
LRG_2PASS_NORTH: SAME_AS_LRG
LRG_1PASS_SOUTH: SAME_AS_LRG
LRG_2PASS_SOUTH: SAME_AS_LRG
# ADM don't prioritize a N/S target if it doesn't have other bits set
LRG_NORTH: {UNOBS: 0, DONE: 0, OBS: 0, DONOTOBSERVE: 0}
ELG_NORTH: SAME_AS_LRG_NORTH
QSO_NORTH: SAME_AS_LRG_NORTH
LRG_SOUTH: SAME_AS_LRG_NORTH
ELG_SOUTH: SAME_AS_LRG_NORTH
QSO_SOUTH: SAME_AS_LRG_NORTH
LRG_1PASS_NORTH: SAME_AS_LRG_NORTH
LRG_2PASS_NORTH: SAME_AS_LRG_NORTH
LRG_1PASS_SOUTH: SAME_AS_LRG_NORTH
LRG_2PASS_SOUTH: SAME_AS_LRG_NORTH
BAD_SKY: {UNOBS: 0, OBS: 0, DONE: 0, MORE_ZWARN: 0, MORE_ZGOOD: 0}
#- Standards and sky are treated specially; priorities don't apply
STD_FAINT: -1
Expand All @@ -202,12 +203,13 @@ priorities:
BGS_FAINT: {UNOBS: 2000, MORE_ZWARN: 2000, MORE_ZGOOD: 1000, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
BGS_BRIGHT: {UNOBS: 2100, MORE_ZWARN: 2100, MORE_ZGOOD: 1000, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
BGS_WISE: {UNOBS: 2000, MORE_ZWARN: 2000, MORE_ZGOOD: 1000, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
BGS_FAINT_SOUTH: SAME_AS_BGS_FAINT
BGS_FAINT_NORTH: SAME_AS_BGS_FAINT
BGS_BRIGHT_SOUTH: SAME_AS_BGS_BRIGHT
BGS_BRIGHT_NORTH: SAME_AS_BGS_BRIGHT
BGS_WISE_SOUTH: SAME_AS_BGS_WISE
BGS_WISE_NORTH: SAME_AS_BGS_WISE
# ADM don't prioritize a N/S target if it doesn't have other bits set
BGS_FAINT_SOUTH: {UNOBS: 0, MORE_ZWARN: 0, MORE_ZGOOD: 0, DONE: 0, OBS: 0, DONOTOBSERVE: 0}
BGS_FAINT_NORTH: SAME_AS_BGS_FAINT_SOUTH
BGS_BRIGHT_SOUTH: SAME_AS_BGS_FAINT_SOUTH
BGS_BRIGHT_NORTH: SAME_AS_BGS_FAINT_SOUTH
BGS_WISE_SOUTH: SAME_AS_BGS_FAINT_SOUTH
BGS_WISE_NORTH: SAME_AS_BGS_FAINT_SOUTH
BGS_KNOWN_ANY: {UNOBS: 100, MORE_ZWARN: 200, MORE_ZGOOD: 300, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
BGS_KNOWN_COLLIDED: {UNOBS: 100, MORE_ZWARN: 200, MORE_ZGOOD: 300, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
BGS_KNOWN_SDSS: {UNOBS: 100, MORE_ZWARN: 200, MORE_ZGOOD: 300, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
Expand All @@ -219,14 +221,15 @@ priorities:
MWS_BROAD: {UNOBS: 1400, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
MWS_WD: {UNOBS: 2998, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
MWS_NEARBY: {UNOBS: 1600, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
MWS_BROAD_NORTH: SAME_AS_MWS_BROAD
MWS_BROAD_SOUTH: SAME_AS_MWS_BROAD
# ADM don't prioritize a N/S target if it doesn't have other bits set
MWS_BROAD_NORTH: {UNOBS: 0, DONE: 0, OBS: 0, DONOTOBSERVE: 0}
MWS_BROAD_SOUTH: SAME_AS_MWS_BROAD_NORTH
MWS_MAIN_BLUE: {UNOBS: 1500, DONE: 2, OBS: 1, DONOTOBSERVE: 0}
MWS_MAIN_BLUE_NORTH: SAME_AS_MWS_MAIN_BLUE
MWS_MAIN_BLUE_SOUTH: SAME_AS_MWS_MAIN_BLUE
MWS_MAIN_BLUE_NORTH: SAME_AS_MWS_BROAD_NORTH
MWS_MAIN_BLUE_SOUTH: SAME_AS_MWS_BROAD_NORTH
MWS_MAIN_RED: SAME_AS_MWS_MAIN_BLUE
MWS_MAIN_RED_NORTH: SAME_AS_MWS_MAIN_BLUE
MWS_MAIN_RED_SOUTH: SAME_AS_MWS_MAIN_BLUE
MWS_MAIN_RED_NORTH: SAME_AS_MWS_BROAD_NORTH
MWS_MAIN_RED_SOUTH: SAME_AS_MWS_BROAD_NORTH

# ADM INITIAL number of observations (NUMOBS) for each target bit
# ADM SAME_AS_XXX means to use the NUMOBS for bitname XXX
Expand All @@ -235,20 +238,22 @@ numobs:
# ADM initial number of observations for targets in the main (dark time) survey
desi_mask:
ELG: 1
LRG: 2
# ADM the LRG numobs should always be superseded by LRG_1PASS/2PASS
LRG: 0
QSO: 4
LRG_1PASS: 1
LRG_2PASS: 2
LRG_NORTH: SAME_AS_LRG
ELG_NORTH: SAME_AS_ELG
QSO_NORTH: SAME_AS_QSO
LRG_SOUTH: SAME_AS_LRG
ELG_SOUTH: SAME_AS_ELG
QSO_SOUTH: SAME_AS_QSO
LRG_1PASS_NORTH: SAME_AS_LRG_1PASS
LRG_2PASS_NORTH: SAME_AS_LRG_2PASS
LRG_1PASS_SOUTH: SAME_AS_LRG_1PASS
LRG_2PASS_SOUTH: SAME_AS_LRG_2PASS
# ADM don't observe a N/S target if it doesn't have other bits set
LRG_NORTH: 0
ELG_NORTH: 0
QSO_NORTH: 0
LRG_SOUTH: 0
ELG_SOUTH: 0
QSO_SOUTH: 0
LRG_1PASS_NORTH: 0
LRG_2PASS_NORTH: 0
LRG_1PASS_SOUTH: 0
LRG_2PASS_SOUTH: 0
BAD_SKY: 0
#- Standards and sky are treated specially; NUMOBS doesn't apply
STD_FAINT: -1
Expand All @@ -273,12 +278,13 @@ numobs:
BGS_FAINT: 1
BGS_BRIGHT: 1
BGS_WISE: 1
BGS_FAINT_SOUTH: SAME_AS_BGS_FAINT
BGS_FAINT_NORTH: SAME_AS_BGS_FAINT
BGS_BRIGHT_SOUTH: SAME_AS_BGS_BRIGHT
BGS_BRIGHT_NORTH: SAME_AS_BGS_BRIGHT
BGS_WISE_SOUTH: SAME_AS_BGS_WISE
BGS_WISE_NORTH: SAME_AS_BGS_WISE
# ADM don't observe a N/S target if it doesn't have other bits set
BGS_FAINT_SOUTH: 0
BGS_FAINT_NORTH: 0
BGS_BRIGHT_SOUTH: 0
BGS_BRIGHT_NORTH: 0
BGS_WISE_SOUTH: 0
BGS_WISE_NORTH: 0
BGS_KNOWN_ANY: 1
BGS_KNOWN_COLLIDED: 1
BGS_KNOWN_SDSS: 1
Expand All @@ -289,12 +295,13 @@ numobs:
MWS_BROAD: 1
MWS_WD: 1
MWS_NEARBY: 1
MWS_BROAD_NORTH: SAME_AS_MWS_BROAD
MWS_BROAD_SOUTH: SAME_AS_MWS_BROAD
# ADM don't observe a N/S target if it doesn't have other bits set
MWS_BROAD_NORTH: 0
MWS_BROAD_SOUTH: 0
MWS_MAIN_BLUE: 1
MWS_MAIN_BLUE_NORTH: SAME_AS_MWS_MAIN_BLUE
MWS_MAIN_BLUE_SOUTH: SAME_AS_MWS_MAIN_BLUE
MWS_MAIN_BLUE_NORTH: 0
MWS_MAIN_BLUE_SOUTH: 0
MWS_MAIN_RED: SAME_AS_MWS_MAIN_BLUE
MWS_MAIN_RED_NORTH: SAME_AS_MWS_MAIN_BLUE
MWS_MAIN_RED_SOUTH: SAME_AS_MWS_MAIN_BLUE
MWS_MAIN_RED_NORTH: 0
MWS_MAIN_RED_SOUTH: 0

0 comments on commit 8ba09fa

Please sign in to comment.