Skip to content

Commit

Permalink
Merge pull request #733 from desihub/mws_faint_fix
Browse files Browse the repository at this point in the history
Fix bug in MWS FAINT selection
  • Loading branch information
geordie666 committed May 16, 2021
2 parents dd0f63c + 37bb3bc commit 9f9d2a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doc/changes.rst
Expand Up @@ -12,8 +12,10 @@ desitarget Change Log

* Add $SKYBRICKS_DIR to module config; make more portable by using $DESI_ROOT
[`PR #732`_].
* Fix bug leading to zero MWS_FAINT targets [`PR #733`_].

.. _`PR #732`: https://github.com/desihub/desitarget/pull/732
.. _`PR #733`: https://github.com/desihub/desitarget/pull/733

1.0.0 (2021-05-12)
------------------
Expand Down
5 changes: 4 additions & 1 deletion py/desitarget/cuts.py
Expand Up @@ -889,6 +889,9 @@ def isMWS_main(gflux=None, rflux=None, zflux=None, w1flux=None, w2flux=None,
rflux=rflux, gaiadupsource=gaiadupsource,
primary=primary, maskbits=maskbits)

# APC Copy cuts up to this point for later use in faint selection
mws_faint = mws.copy()

# ADM pass the mws that pass cuts as primary, to restrict to the
# ADM sources that weren't in a mask/logic cut.
mws, red, blue = isMWS_main_colors(
Expand All @@ -904,7 +907,7 @@ def isMWS_main(gflux=None, rflux=None, zflux=None, w1flux=None, w2flux=None,
pmra=pmra, pmdec=pmdec, parallax=parallax, parallaxerr=parallaxerr,
obs_rflux=obs_rflux, objtype=objtype, gaiagmag=gaiagmag,
gaiabmag=gaiabmag, gaiarmag=gaiarmag, gaiaaen=gaiaaen,
paramssolved=paramssolved, primary=mws, south=south
paramssolved=paramssolved, primary=mws_faint, south=south
)

return mws, red, blue, faint_red, faint_blue
Expand Down

0 comments on commit 9f9d2a7

Please sign in to comment.