Skip to content

Commit

Permalink
Merge pull request #699 from desihub/rongpu-patch-lrg
Browse files Browse the repository at this point in the history
Implement z-band fiber-total-magnitude bright cut for LRGs
  • Loading branch information
geordie666 committed Mar 30, 2021
2 parents 0dfc818 + 11f54f0 commit 59a426e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
5 changes: 4 additions & 1 deletion doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ desitarget Change Log
0.55.1 (unreleased)
-------------------

* No changes yet.
* Update the LRG selection for SV3 (The 1% Survey) [`PR #699`_]:
* Replace the zfiber>16 cut with a zfibertot>16 cut to reject shredded bright stars.

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

0.55.0 (2021-03-29)
-------------------
Expand Down
11 changes: 6 additions & 5 deletions py/desitarget/sv3/sv3_cuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def isBACKUP(ra=None, dec=None, gaiagmag=None, primary=None):
def isLRG(gflux=None, rflux=None, zflux=None, w1flux=None, w2flux=None,
zfiberflux=None, rfluxivar=None, zfluxivar=None, w1fluxivar=None,
gaiagmag=None, gnobs=None, rnobs=None, znobs=None, maskbits=None,
primary=None, south=True):
zfibertotflux=None, primary=None, south=True):
"""
Parameters
----------
Expand Down Expand Up @@ -307,7 +307,7 @@ def isLRG(gflux=None, rflux=None, zflux=None, w1flux=None, w2flux=None,
primary=primary, rflux=rflux, zflux=zflux, w1flux=w1flux,
zfiberflux=zfiberflux, gnobs=gnobs, rnobs=rnobs, znobs=znobs,
rfluxivar=rfluxivar, zfluxivar=zfluxivar, w1fluxivar=w1fluxivar,
gaiagmag=gaiagmag, maskbits=maskbits
gaiagmag=gaiagmag, maskbits=maskbits, zfibertotflux=zfibertotflux
)

# ADM color-based selection of LRGs.
Expand All @@ -322,7 +322,7 @@ def isLRG(gflux=None, rflux=None, zflux=None, w1flux=None, w2flux=None,
def notinLRG_mask(primary=None, rflux=None, zflux=None, w1flux=None,
zfiberflux=None, gnobs=None, rnobs=None, znobs=None,
rfluxivar=None, zfluxivar=None, w1fluxivar=None,
gaiagmag=None, maskbits=None):
gaiagmag=None, maskbits=None, zfibertotflux=None):
"""See :func:`~desitarget.cuts.isLRG` for details.
Returns
Expand All @@ -346,7 +346,7 @@ def notinLRG_mask(primary=None, rflux=None, zflux=None, w1flux=None,
lrg &= (gaiagmag == 0) | (gaiagmag > 18) # remove bright GAIA sources

# remove bright stars with zfiber<16 that are missing from GAIA
lrg &= zfiberflux < 10**(-0.4*(16-22.5))
lrg &= zfibertotflux < 10**(-0.4*(16-22.5))

# ADM observed in every band.
lrg &= (gnobs > 0) & (rnobs > 0) & (znobs > 0)
Expand Down Expand Up @@ -1992,7 +1992,8 @@ def set_target_bits(photsys_north, photsys_south, obs_rflux,
gflux=gflux, rflux=rflux, zflux=zflux, w1flux=w1flux,
zfiberflux=zfiberflux, gnobs=gnobs, rnobs=rnobs, znobs=znobs,
rfluxivar=rfluxivar, zfluxivar=zfluxivar, w1fluxivar=w1fluxivar,
gaiagmag=gaiagmag, maskbits=maskbits, south=south
gaiagmag=gaiagmag, zfibertotflux=zfibertotflux,
maskbits=maskbits, south=south
)
lrg_north, lrg_south = lrg_classes

Expand Down

0 comments on commit 59a426e

Please sign in to comment.