lsst.meas.base g72c761de85+04e91635fd
Classes | Functions | Variables
lsst.meas.base.forcedPhotCcd Namespace Reference

Classes

class  documentation
 
class  for
 
class  ForcedPhotCcd
 
class  ForcedPhotCcdConnections
 
class  PerTractCcdDataIdContainer
 

Functions

def imageOverlapsTract (tract, imageWcs, imageBox)
 

Variables

 applyMosaicResults = None
 
 footprintSource
 
 doApplySkyCorr
 
 doApplyExternalSkyWcs
 
 doApplyExternalPhotoCalib
 
 doApplyFinalizedPsf
 

Function Documentation

◆ imageOverlapsTract()

def lsst.meas.base.forcedPhotCcd.imageOverlapsTract (   tract,
  imageWcs,
  imageBox 
)
Return whether the given bounding box overlaps the tract given a WCS.

Parameters
----------
tract : `lsst.skymap.TractInfo`
    TractInfo specifying a tract.
imageWcs : `lsst.afw.geom.SkyWcs`
    World coordinate system for the image.
imageBox : `lsst.geom.Box2I`
    Bounding box for the image.

Returns
-------
overlap : `bool`
    `True` if the bounding box overlaps the tract; `False` otherwise.

Definition at line 122 of file forcedPhotCcd.py.

Variable Documentation

◆ applyMosaicResults

lsst.meas.base.forcedPhotCcd.applyMosaicResults = None

Definition at line 52 of file forcedPhotCcd.py.

◆ doApplyExternalPhotoCalib

lsst.meas.base.forcedPhotCcd.doApplyExternalPhotoCalib

Definition at line 501 of file forcedPhotCcd.py.

◆ doApplyExternalSkyWcs

lsst.meas.base.forcedPhotCcd.doApplyExternalSkyWcs

Definition at line 497 of file forcedPhotCcd.py.

◆ doApplyFinalizedPsf

lsst.meas.base.forcedPhotCcd.doApplyFinalizedPsf

Definition at line 505 of file forcedPhotCcd.py.

◆ doApplySkyCorr

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

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)

    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'])

    inputs['measCat'], inputs['exposureId'] = self.generateMeasCat(inputRefs.exposure.dataId,
                                                                   inputs['exposure'],
                                                                   inputs['refCat'], inputs['refWcs'],
                                                                   "visit_detector")
    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 494 of file forcedPhotCcd.py.

◆ footprintSource

lsst.meas.base.forcedPhotCcd.footprintSource

Definition at line 377 of file forcedPhotCcd.py.