lsst.meas.base gf5648a9175+045f18088e
lsst.meas.base.forcedPhotCcd.ForcedPhotCcd Class Reference
Inheritance diagram for lsst.meas.base.forcedPhotCcd.ForcedPhotCcd:

Detailed Description

catalog = lsst.afw.table.SourceCatalog(self.measurement.schema)
catalog.getTable().setMetadata(self.measurement.algMetadata)
datasetType = self.dataPrefix + "forced_src"
return {datasetType: catalog}


class ForcedPhotCcdFromDataFrameConnections(PipelineTaskConnections,
                                    dimensions=("instrument", "visit", "detector", "skymap", "tract"),
                                    defaultTemplates={"inputCoaddName": "goodSeeing",
                                                      "inputName": "calexp",
                                                      "skyWcsName": "jointcal",
                                                      "photoCalibName": "fgcm"}):
refCat = cT.Input(
doc="Catalog of positions at which to force photometry.",
name="{inputCoaddName}Diff_fullDiaObjTable",
storageClass="DataFrame",
dimensions=["skymap", "tract", "patch"],
multiple=True,
deferLoad=True,
)
exposure = cT.Input(
doc="Input exposure to perform photometry on.",
name="{inputName}",
storageClass="ExposureF",
dimensions=["instrument", "visit", "detector"],
)
skyCorr = cT.Input(
doc="Input Sky Correction to be subtracted from the calexp if doApplySkyCorr=True",
name="skyCorr",
storageClass="Background",
dimensions=("instrument", "visit", "detector"),
)
externalSkyWcsTractCatalog = cT.Input(
doc=("Per-tract, per-visit wcs calibrations.  These catalogs use the detector "
     "id for the catalog id, sorted on id for fast lookup."),
name="{skyWcsName}SkyWcsCatalog",
storageClass="ExposureCatalog",
dimensions=["instrument", "visit", "tract"],
)
externalSkyWcsGlobalCatalog = cT.Input(
doc=("Per-visit wcs calibrations computed globally (with no tract information). "
     "These catalogs use the detector id for the catalog id, sorted on id for "
     "fast lookup."),
name="{skyWcsName}SkyWcsCatalog",
storageClass="ExposureCatalog",
dimensions=["instrument", "visit"],
)
externalPhotoCalibTractCatalog = cT.Input(
doc=("Per-tract, per-visit photometric calibrations.  These catalogs use the "
     "detector id for the catalog id, sorted on id for fast lookup."),
name="{photoCalibName}PhotoCalibCatalog",
storageClass="ExposureCatalog",
dimensions=["instrument", "visit", "tract"],
)
externalPhotoCalibGlobalCatalog = cT.Input(
doc=("Per-visit photometric calibrations computed globally (with no tract "
     "information).  These catalogs use the detector id for the catalog id, "
     "sorted on id for fast lookup."),
name="{photoCalibName}PhotoCalibCatalog",
storageClass="ExposureCatalog",
dimensions=["instrument", "visit"],
)
finalizedPsfApCorrCatalog = cT.Input(
doc=("Per-visit finalized psf models and aperture correction maps. "
     "These catalogs use the detector id for the catalog id, "
     "sorted on id for fast lookup."),
name="finalized_psf_ap_corr_catalog",
storageClass="ExposureCatalog",
dimensions=["instrument", "visit"],
)
measCat = cT.Output(
doc="Output forced photometry catalog.",
name="forced_src_diaObject",
storageClass="SourceCatalog",
dimensions=["instrument", "visit", "detector", "skymap", "tract"],
)
outputSchema = cT.InitOutput(
doc="Schema for the output forced measurement catalogs.",
name="forced_src_diaObject_schema",
storageClass="SourceCatalog",
)

def __init__(self, *, config=None):
super().__init__(config=config)
if not config.doApplySkyCorr:
    self.inputs.remove("skyCorr")
if config.doApplyExternalSkyWcs:
    if config.useGlobalExternalSkyWcs:
        self.inputs.remove("externalSkyWcsTractCatalog")
    else:
        self.inputs.remove("externalSkyWcsGlobalCatalog")
else:
    self.inputs.remove("externalSkyWcsTractCatalog")
    self.inputs.remove("externalSkyWcsGlobalCatalog")
if config.doApplyExternalPhotoCalib:
    if config.useGlobalExternalPhotoCalib:
        self.inputs.remove("externalPhotoCalibTractCatalog")
    else:
        self.inputs.remove("externalPhotoCalibGlobalCatalog")
else:
    self.inputs.remove("externalPhotoCalibTractCatalog")
    self.inputs.remove("externalPhotoCalibGlobalCatalog")
if not config.doApplyFinalizedPsf:
    self.inputs.remove("finalizedPsfApCorrCatalog")


class ForcedPhotCcdFromDataFrameConfig(ForcedPhotCcdConfig,
                               pipelineConnections=ForcedPhotCcdFromDataFrameConnections):
def setDefaults(self):
super().setDefaults()
self.footprintSource = "psf"
self.measurement.doReplaceWithNoise = False
self.measurement.plugins.names = ["base_LocalPhotoCalib", "base_LocalWcs", "base_LocalBackground",
                                  "base_TransformedCentroidFromCoord", "base_PsfFlux",
                                  "base_PixelFlags"]
self.measurement.copyColumns = {'id': 'diaObjectId', 'coord_ra': 'coord_ra', 'coord_dec': 'coord_dec'}
self.measurement.slots.centroid = "base_TransformedCentroidFromCoord"
self.measurement.slots.psfFlux = "base_PsfFlux"
self.measurement.slots.shape = None

def validate(self):
super().validate()
if self.footprintSource == "transformed":
    raise ValueError("Cannot transform footprints from reference catalog, "
                     "because DataFrames can't hold footprints.")


class ForcedPhotCcdFromDataFrameTask(ForcedPhotCcdTask):

Definition at line 719 of file forcedPhotCcd.py.


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