Skip to content

Commit

Permalink
Merge pull request #770 from desihub/typo_fixes
Browse files Browse the repository at this point in the history
fix variable name typos in cuts.py
  • Loading branch information
segasai committed Nov 8, 2021
2 parents 1bf3e0c + ed73324 commit f7aef60
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions doc/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ desitarget Change Log
* Update targetmask and cuts for backup program [`PR #766`_]:
* Matches description in backup program document.
* Also use the ops/tiles-specstatus.ecsv tile file for SV [`PR #765`_].
* Fix a few variable name typos in the target selection code [`PR #770`_].
All of those likely never were triggered in production.

.. _`PR #765`: https://github.com/desihub/desitarget/pull/765
.. _`PR #766`: https://github.com/desihub/desitarget/pull/766
.. _`PR #768`: https://github.com/desihub/desitarget/pull/768
.. _`PR #770`: https://github.com/desihub/desitarget/pull/770


1.3.0 (2021-09-20)
------------------
Expand Down
10 changes: 5 additions & 5 deletions py/desitarget/cuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ def isSTD_gaia(primary=None, gaia=None, astrometricexcessnoise=None,
- Current version (08/01/18) is version 121 on `the wiki`_.
"""
if primary is None:
primary = np.ones_like(gflux, dtype='?')
primary = np.ones_like(gaiagmag, dtype='?')
std = primary.copy()

# ADM Bp and Rp are both measured.
Expand Down Expand Up @@ -876,8 +876,8 @@ def isSTD(gflux=None, rflux=None, zflux=None, primary=None,
else:
# Use LS r-band as a Gaia G-band proxy.
gaiamag_proxy = 22.5 - 2.5 * np.log10(rflux.clip(1e-16))
std &= gaiamag_ >= gbright
std &= gaiamag_ < gfaint
std &= gaiamag_proxy >= gbright
std &= gaiamag_proxy < gfaint

return std

Expand Down Expand Up @@ -1177,7 +1177,7 @@ def isMWS_bhb(primary=None, objtype=None,
rflux, gflux, zflux = rflux.copy(), gflux.copy(), zflux.copy()
w1flux = w1flux.copy()
parallax = parallax.copy()
gaigmag = gaiagmag.copy()
gaiagmag = gaiagmag.copy()
rflux[w], gflux[w], zflux[w], w1flux[w] = 0., 0., 0., 0.
parallax[w] = 0.
gaiagmag[w] = 0.
Expand Down Expand Up @@ -2197,7 +2197,7 @@ def _prepare_gaia(objects, colnames=None):
if len(w) > 0:
# ADM we need to check the case of a single row being passed.
if _is_row(gaiaparamssolved):
gaiaparamsolved = 3
gaiaparamssolved = 3
else:
gaiaparamssolved[w] = 3

Expand Down

0 comments on commit f7aef60

Please sign in to comment.