LSSTApplications  16.0-10-g9d3e444,16.0-11-g09ed895+3,16.0-11-g12e47bd+4,16.0-11-g9bb73b2+10,16.0-12-g5c924a4+10,16.0-15-g7af1f30,16.0-15-gdd5ca33+2,16.0-16-gf0259e2+1,16.0-17-g31abd91+11,16.0-17-g5cf0468+3,16.0-18-g51a54b3+3,16.0-18-ga4d4bcb+5,16.0-18-gcf94535+2,16.0-19-g9d290d5+2,16.0-2-g0febb12+22,16.0-2-g9d5294e+73,16.0-2-ga8830df+7,16.0-21-g3d035912+2,16.0-26-g8e79609,16.0-28-gfc9ea6c+9,16.0-29-ge8801f9+4,16.0-3-ge00e371+38,16.0-4-g18f3627+17,16.0-4-g5f3a788+21,16.0-4-ga3eb747+11,16.0-4-gabf74b7+33,16.0-4-gb13d127+7,16.0-5-g27fb78a+11,16.0-5-g6a53317+38,16.0-5-gb3f8a4b+91,16.0-51-gbbe9c988+3,16.0-6-g9321be7+5,16.0-6-gcbc7b31+47,16.0-6-gf49912c+33,16.0-75-gbf7a9a820,16.0-8-g21fd5fe+34,16.0-8-g3a9f023+24,16.0-8-gc11f1cf,16.0-9-gf3bc169+2,16.0-9-gf5c1f43+12,master-gc237143d49,w.2019.02
LSSTDataManagementBasePackage
Public Member Functions | Static Public Attributes | List of all members
lsst.meas.astrom.catalogStarSelector.CatalogStarSelectorTask Class Reference

Public Member Functions

def selectSources (self, sourceCat, matches=None, exposure=None)
 

Static Public Attributes

 ConfigClass = CatalogStarSelectorConfig
 
bool usesMatches = True
 

Detailed Description

Select stars based on a reference catalog.

Attributes
----------
usesMatches : `bool`
    A boolean variable specify if the inherited source selector uses
    matches to an external catalog, and thus requires the ``matches``
    argument to ``run()``. Set to True for this selector.

Definition at line 85 of file catalogStarSelector.py.

Member Function Documentation

◆ selectSources()

def lsst.meas.astrom.catalogStarSelector.CatalogStarSelectorTask.selectSources (   self,
  sourceCat,
  matches = None,
  exposure = None 
)
Return a selection of sources based on reference catalog matches.

Parameters
----------
sourceCat : `lsst.afw.table.SourceCatalog`
    Catalog of sources to select from.
    This catalog must be contiguous in memory.
matches : `list` of `lsst.afw.table.ReferenceMatch`
    A match vector as produced by meas_astrom; required.
exposure : `lsst.afw.image.Exposure` or None
    The exposure the catalog was built from; used for debug display.

Return
------
struct : `lsst.pipe.base.Struct`
    Result struct with components:

    - selected : Boolean array of sources that were selected, same
      length as sourceCat (`numpy.ndarray` of `bool`)

Definition at line 98 of file catalogStarSelector.py.

98  def selectSources(self, sourceCat, matches=None, exposure=None):
99  """Return a selection of sources based on reference catalog matches.
100 
101  Parameters
102  ----------
103  sourceCat : `lsst.afw.table.SourceCatalog`
104  Catalog of sources to select from.
105  This catalog must be contiguous in memory.
106  matches : `list` of `lsst.afw.table.ReferenceMatch`
107  A match vector as produced by meas_astrom; required.
108  exposure : `lsst.afw.image.Exposure` or None
109  The exposure the catalog was built from; used for debug display.
110 
111  Return
112  ------
113  struct : `lsst.pipe.base.Struct`
114  Result struct with components:
115 
116  - selected : Boolean array of sources that were selected, same
117  length as sourceCat (`numpy.ndarray` of `bool`)
118  """
119  import lsstDebug
120  debugInfo = lsstDebug.Info(__name__)
121  display = debugInfo.display
122  pauseAtEnd = debugInfo.pauseAtEnd # pause when done
123 
124  if matches is None:
125  raise RuntimeError("CatalogStarSelectorTask requires matches")
126 
127  mi = exposure.getMaskedImage()
128 
129  if display:
130  frame = 1
131  ds9.mtv(mi, frame=frame, title="PSF candidates")
132 
133  isGoodSource = CheckSource(sourceCat, self.config.fluxLim, self.config.fluxMax, self.config.badFlags)
134  good = np.array([isGoodSource(record) for record in sourceCat])
135 
136  with ds9.Buffering():
137  for ref, source, d in matches:
138  if not ref.get("resolved"):
139  if not isGoodSource(source):
140  symb, ctype = "+", ds9.RED
141  else:
142  symb, ctype = "+", ds9.GREEN
143 
144  if display:
145  ds9.dot(symb, source.getX() - mi.getX0(), source.getY() - mi.getY0(),
146  size=4, frame=frame, ctype=ctype)
147 
148  if display and pauseAtEnd:
149  input("Continue? y[es] p[db] ")
150 
151  return Struct(selected=good)

Member Data Documentation

◆ ConfigClass

lsst.meas.astrom.catalogStarSelector.CatalogStarSelectorTask.ConfigClass = CatalogStarSelectorConfig
static

Definition at line 95 of file catalogStarSelector.py.

◆ usesMatches

bool lsst.meas.astrom.catalogStarSelector.CatalogStarSelectorTask.usesMatches = True
static

Definition at line 96 of file catalogStarSelector.py.


The documentation for this class was generated from the following file: