lsst.meas.base gb94f486bb8+3693998928
Loading...
Searching...
No Matches
Classes | Variables
lsst.meas.base.forcedPhotCcd Namespace Reference

Classes

class  for
 
class  ForcedPhotCcdConnections
 
class  may
 

Variables

 footprintSource
 
 doApplySkyCorr
 
 doApplyExternalSkyWcs
 
 doApplyExternalPhotoCalib
 
 doApplyFinalizedPsf
 

Variable Documentation

◆ doApplyExternalPhotoCalib

lsst.meas.base.forcedPhotCcd.doApplyExternalPhotoCalib

Definition at line 368 of file forcedPhotCcd.py.

◆ doApplyExternalSkyWcs

lsst.meas.base.forcedPhotCcd.doApplyExternalSkyWcs

Definition at line 364 of file forcedPhotCcd.py.

◆ doApplyFinalizedPsf

lsst.meas.base.forcedPhotCcd.doApplyFinalizedPsf

Definition at line 372 of file forcedPhotCcd.py.

◆ doApplySkyCorr

lsst.meas.base.forcedPhotCcd.doApplySkyCorr
ConfigClass = ForcedPhotCcdConfig
_DefaultName = "forcedPhotCcd"
dataPrefix = ""

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

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

    if refSchema is None:
        raise ValueError("No reference schema provided.")

    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)

    tract = butlerQC.quantum.dataId['tract']
    skyMap = inputs.pop('skyMap')
    inputs['refWcs'] = skyMap[tract].getWcs()

    # Connections only exist if they are configured to be used.
    skyCorr = inputs.pop('skyCorr', None)
    if self.config.useGlobalExternalSkyWcs:
        externalSkyWcsCatalog = inputs.pop('externalSkyWcsGlobalCatalog', None)
    else:
        externalSkyWcsCatalog = inputs.pop('externalSkyWcsTractCatalog', None)
    if self.config.useGlobalExternalPhotoCalib:
        externalPhotoCalibCatalog = inputs.pop('externalPhotoCalibGlobalCatalog', None)
    else:
        externalPhotoCalibCatalog = inputs.pop('externalPhotoCalibTractCatalog', None)
    finalizedPsfApCorrCatalog = inputs.pop('finalizedPsfApCorrCatalog', None)

    inputs['exposure'] = self.prepareCalibratedExposure(
        inputs['exposure'],
        skyCorr=skyCorr,
        externalSkyWcsCatalog=externalSkyWcsCatalog,
        externalPhotoCalibCatalog=externalPhotoCalibCatalog,
        finalizedPsfApCorrCatalog=finalizedPsfApCorrCatalog
    )

    inputs['refCat'] = self.mergeAndFilterReferences(inputs['exposure'], inputs['refCat'],
                                                     inputs['refWcs'])

    if inputs['refCat'] is None:
        self.log.info("No WCS for exposure %s.  No %s catalog will be written.",
                      butlerQC.quantum.dataId, outputRefs.measCat.datasetType.name)
    else:
        inputs['measCat'], inputs['exposureId'] = self.generateMeasCat(inputRefs.exposure.dataId,
                                                                       inputs['exposure'],
                                                                       inputs['refCat'], inputs['refWcs'])
        self.attachFootprints(inputs['measCat'], inputs['refCat'], inputs['exposure'], inputs['refWcs'])
        outputs = self.run(**inputs)
        butlerQC.put(outputs, outputRefs)

def prepareCalibratedExposure(self, exposure, skyCorr=None, externalSkyWcsCatalog=None,
                              externalPhotoCalibCatalog=None, finalizedPsfApCorrCatalog=None):

Definition at line 361 of file forcedPhotCcd.py.

◆ footprintSource

lsst.meas.base.forcedPhotCcd.footprintSource

Definition at line 246 of file forcedPhotCcd.py.