Skip to content

Commit

Permalink
rename isFSTD -> isFSTD_colors
Browse files Browse the repository at this point in the history
  • Loading branch information
sbailey committed Feb 14, 2016
1 parent 3252d41 commit aa1bd90
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 7 additions & 4 deletions py/desitarget/cuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def isELG(gflux, rflux, zflux, primary=None):

return elg

def isFSTD(gflux, rflux, zflux, primary=None):
def isFSTD_colors(gflux, rflux, zflux, primary=None):
"""Select FSTD targets just based on color cuts. Returns a boolean array.
Args:
Expand All @@ -85,8 +85,11 @@ def isFSTD(gflux, rflux, zflux, primary=None):
If given, the BRICK_PRIMARY column of the catalogue.
Returns:
mask : array_like. True if and only the object is an FSTD
target.
mask : boolean array, True if the object has colors like an FSTD
Notes:
The full FSTD target selection also includes PSF-like and fracflux
cuts; this function is only cuts on the colors.
"""
#----- F-type standard stars
Expand Down Expand Up @@ -287,7 +290,7 @@ def apply_cuts(objects):
wflux=wflux)

#----- Standard stars
fstd = isFSTD(primary=primary, zflux=zflux, rflux=rflux, gflux=gflux)
fstd = isFSTD_colors(primary=primary, zflux=zflux, rflux=rflux, gflux=gflux)

fstd &= psflike(objects['TYPE'])
fracflux = objects['DECAM_FRACFLUX'].T
Expand Down
4 changes: 4 additions & 0 deletions py/desitarget/test/test_cuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ def test_single_cuts(self):
qso2 = cuts.isQSO(gflux, rflux, zflux, wflux, type=None, primary=None)
self.assertTrue(np.all(qso1==qso2))

fstd1 = cuts.isFSTD_colors(gflux, rflux, zflux, primary=None)
fstd2 = cuts.isFSTD_colors(gflux, rflux, zflux, primary=primary)
self.assertTrue(np.all(fstd1==fstd2))

#- cuts should work with tables from several I/O libraries
def _test_table_row(self, targets):
self.assertFalse(cuts._is_row(targets))
Expand Down

0 comments on commit aa1bd90

Please sign in to comment.