Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added new bits to the cmx sciencemask and stdmask #213

Merged
merged 2 commits into from Sep 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions py/fiberassign/qa.py
Expand Up @@ -46,6 +46,7 @@ def qa_parse_table(header, tgdata):
elgmask = int(desi_mask["ELG"].mask)
qsomask = int(desi_mask["QSO"].mask)
badmask = int(desi_mask["BAD_SKY"].mask)

for row in range(len(tgdata)):
tgid = tgdata["TARGETID"][row]
tg = tgs.get(tgid)
Expand Down Expand Up @@ -83,6 +84,7 @@ def qa_tile(hw, tile_id, tgs, tgprops, tile_assign, tile_avail):
nsafe = 0
unassigned = list()
objtypes = dict()

for lid in locs:
if lid not in tile_assign:
unassigned.append(int(lid))
Expand Down
13 changes: 13 additions & 0 deletions py/fiberassign/targets.py
Expand Up @@ -164,6 +164,16 @@ def default_cmx_sciencemask():
sciencemask |= cmx_mask["SV0_STD_BRIGHT"].mask
sciencemask |= cmx_mask["STD_TEST"].mask
sciencemask |= cmx_mask["STD_CALSPEC"].mask

# SE: ADDED NEW CMX SCIENCE BITS From /desitarget/blob/0.32.0/py/desitarget/cmx/data/cmx_targetmask.yaml
sciencemask |= cmx_mask["STD_FAINT"].mask
sciencemask |= cmx_mask["SV0_BGS"].mask
sciencemask |= cmx_mask["SV0_MWS"].mask
sciencemask |= cmx_mask["SV0_LRG"].mask
sciencemask |= cmx_mask["SV0_ELG"].mask
sciencemask |= cmx_mask["SV0_QSO"].mask
sciencemask |= cmx_mask["SV0_WD"].mask

return sciencemask


Expand All @@ -173,6 +183,9 @@ def default_cmx_stdmask():
# Nothing in a CMX file is currently treated as a "standard". The
# objects are all things which should be assigned as science targets.
stdmask = 0
stdmask |= cmx_mask["STD_FAINT"].mask
stdmask |= cmx_mask["STD_BRIGHT"].mask

return stdmask


Expand Down