LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
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.