LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Functions | Variables
lsst.meas.astrom.setMatchDistance Namespace Reference

Functions

def setMatchDistance
 

Variables

list __all__ = ["setMatchDistance"]
 

Function Documentation

def lsst.meas.astrom.setMatchDistance.setMatchDistance (   matches)
Set the distance field of the matches in a match list to the distance in radians on the sky

@warning the coord field of the source in each match must be correct

@param[in,out] matches  a list of matches, an instance of lsst.afw.table.ReferenceMatch
    reads the coord field of the source and reference object of each match
    writes the distance field of each match

Definition at line 28 of file setMatchDistance.py.

28 
29 def setMatchDistance(matches):
30  """Set the distance field of the matches in a match list to the distance in radians on the sky
31 
32  @warning the coord field of the source in each match must be correct
33 
34  @param[in,out] matches a list of matches, an instance of lsst.afw.table.ReferenceMatch
35  reads the coord field of the source and reference object of each match
36  writes the distance field of each match
37  """
38  if len(matches) < 1:
39  return
40 
41  sourceCoordKey = afwTable.CoordKey(matches[0].first.schema["coord"])
42  refObjCoordKey = afwTable.CoordKey(matches[0].second.schema["coord"])
43  for match in matches:
44  sourceCoord = match.first.get(sourceCoordKey)
45  refObjCoord = match.second.get(refObjCoordKey)
46  match.distance = refObjCoord.angularSeparation(sourceCoord).asRadians()
A FunctorKey used to get or set celestial coordiantes from a pair of Angle keys.
Definition: aggregates.h:119

Variable Documentation

list lsst.meas.astrom.setMatchDistance.__all__ = ["setMatchDistance"]

Definition at line 26 of file setMatchDistance.py.