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.algorithms.makeCoaddApCorrMap Namespace Reference

Functions

def makeCoaddApCorrMap
 

Variables

list __all__ = ["makeCoaddApCorrMap",]
 

Function Documentation

def lsst.meas.algorithms.makeCoaddApCorrMap.makeCoaddApCorrMap (   catalog,
  coaddBox,
  coaddWcs,
  weightFieldName = "weight" 
)
Construct an ApCorrMap for a coadd

@param catalog: Table of coadd inputs (lsst.afw.table.ExposureCatalog)
@param coaddBox: Bounding box for coadd (lsst.afw.geom.Box2I)
@param coaddWcs: Wcs for coadd
@param weightFieldName: name of weight field in catalog
@return aperture corrections

Definition at line 6 of file makeCoaddApCorrMap.py.

6 
7 def makeCoaddApCorrMap(catalog, coaddBox, coaddWcs, weightFieldName="weight"):
8  """Construct an ApCorrMap for a coadd
9 
10  @param catalog: Table of coadd inputs (lsst.afw.table.ExposureCatalog)
11  @param coaddBox: Bounding box for coadd (lsst.afw.geom.Box2I)
12  @param coaddWcs: Wcs for coadd
13  @param weightFieldName: name of weight field in catalog
14  @return aperture corrections
15  """
16 
17  # Assemble the BoundedFields for each type
18  everything = {} # name --> list of CoaddBoundedFieldElement
19  weightKey = catalog.schema[weightFieldName].asKey()
20  for row in catalog:
21  apCorrMap = row.getApCorrMap()
22  if not apCorrMap:
23  continue
24  weight = row.get(weightKey)
25  wcs = row.getWcs()
26  validPolygon = row.getValidPolygon()
27  for name, bf in apCorrMap.items():
28  if not name in everything:
29  everything[name] = []
30  everything[name].append(CoaddBoundedFieldElement(bf, wcs, validPolygon, weight))
31 
32  # Construct a CoaddBoundedField for each type
33  apCorrMap = ApCorrMap()
34  for name, elements in everything.iteritems():
35  apCorrMap.set(name, CoaddBoundedField(coaddBox, coaddWcs, elements))
36 
37  return apCorrMap
Struct used to hold one Exposure's data in a CoaddBoundedField.
A thin wrapper around std::map to allow aperture corrections to be attached to Exposures.
Definition: ApCorrMap.h:42

Variable Documentation

list lsst.meas.algorithms.makeCoaddApCorrMap.__all__ = ["makeCoaddApCorrMap",]

Definition at line 4 of file makeCoaddApCorrMap.py.