lsst.meas.base 22.0.1-26-g26961ef+b4cfca32e7
lsst.meas.base.forcedPhotCoadd.documentation Class Reference
Inheritance diagram for lsst.meas.base.forcedPhotCoadd.documentation:
lsst.meas.base.forcedPhotCcd.for

Detailed Description

ConfigClass = ForcedPhotCoaddConfig
RunnerClass = ForcedPhotCoaddRunner
_DefaultName = "forcedPhotCoadd"
dataPrefix = "deepCoadd_"

def __init__(self, butler=None, refSchema=None, initInputs=None, **kwds):
    super().__init__(**kwds)

    if initInputs is not None:
        refSchema = initInputs['inputSchema'].schema

    self.makeSubtask("references", butler=butler, schema=refSchema)
    if refSchema is None:
        refSchema = self.references.schema
    self.makeSubtask("measurement", refSchema=refSchema)
    # It is necessary to get the schema internal to the forced measurement task until such a time
    # that the schema is not owned by the measurement task, but is passed in by an external caller
    if self.config.doApCorr:
        self.makeSubtask("applyApCorr", schema=self.measurement.schema)
    self.makeSubtask('catalogCalculation', schema=self.measurement.schema)
    self.outputSchema = lsst.afw.table.SourceCatalog(self.measurement.schema)

def runQuantum(self, butlerQC, inputRefs, outputRefs):
    inputs = butlerQC.get(inputRefs)

    refCatInBand = inputs.pop('refCatInBand')
    inputs['measCat'], inputs['exposureId'] = self.generateMeasCat(inputRefs.exposure.dataId,
                                                                   inputs['exposure'],
                                                                   inputs['refCat'],
                                                                   refCatInBand,
                                                                   inputs['refWcs'],
                                                                   "tract_patch")
    outputs = self.run(**inputs)
    butlerQC.put(outputs, outputRefs)

def generateMeasCat(self, exposureDataId, exposure, refCat, refCatInBand, refWcs, idPackerName):
exposureIdInfo = ExposureIdInfo.fromDataId(exposureDataId, idPackerName)
idFactory = exposureIdInfo.makeSourceIdFactory()

measCat = self.measurement.generateMeasCat(exposure, refCat, refWcs,
                                           idFactory=idFactory)
# attach footprints here, as the attachFootprints method is geared for gen2
# and is not worth modifying, as this can naturally live inside this method
for srcRecord in measCat:
    fpRecord = refCatInBand.find(srcRecord.getId())
    if fpRecord is None:
        raise LookupError("Cannot find Footprint for source {}; please check that {} "
                          "IDs are compatible with reference source IDs"
                          .format(srcRecord.getId(), self.config.connections.refCatInBand))
    srcRecord.setFootprint(fpRecord.getFootprint())
return measCat, exposureIdInfo.expId

def runDataRef(self, dataRef, psfCache=None):

Definition at line 270 of file forcedPhotCoadd.py.


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