TransformDiaSourceCatalogTask#
- class lsst.ap.association.TransformDiaSourceCatalogTask(initInputs, **kwargs)#
Bases:
TransformCatalogBaseTaskTransform a DiaSource catalog by calibrating and renaming columns to produce a table ready to insert into the Apdb.
Parameters#
- initInputs
dict Must contain
diaSourceSchemaas the schema for the input catalog.
Attributes Summary
Methods Summary
Add Column functor for each of the flags to the internal functor dictionary.
bitPackFlags(df)Pack requested flag columns in inputRecord into single columns in outputRecord.
computeBBoxSizes(inputCatalog)Compute the size of a square bbox that fully contains the detection footprint.
run(diaSourceCat, diffIm, band[, reliability])Convert input catalog to ParquetTable/Pandas and run functors.
runQuantum(butlerQC, inputRefs, outputRefs)Do butler IO and transform to provide in memory objects for tasks
runmethod.Attributes Documentation
- inputDataset = 'deepDiff_diaSrc'#
- outputDataset = 'deepDiff_diaSrcTable'#
Methods Documentation
- addUnpackedFlagFunctors()#
Add Column functor for each of the flags to the internal functor dictionary.
- bitPackFlags(df)#
Pack requested flag columns in inputRecord into single columns in outputRecord.
Parameters#
- df
pandas.DataFrame DataFrame to read bits from and pack them into.
- df
- computeBBoxSizes(inputCatalog)#
Compute the size of a square bbox that fully contains the detection footprint.
Parameters#
- inputCatalog
lsst.afw.table.SourceCatalog Catalog containing detected footprints.
Returns#
- outputBBoxSizes
np.ndarray, (N,) Array of bbox sizes.
- inputCatalog
- run(diaSourceCat, diffIm, band, reliability=None)#
Convert input catalog to ParquetTable/Pandas and run functors.
Additionally, add new columns for stripping information from the exposure and into the DiaSource catalog.
Parameters#
- diaSourceCat
lsst.afw.table.SourceCatalog Catalog of sources measured on the difference image.
- diffIm
lsst.afw.image.Exposure Result of subtracting template and science images.
- band
str Filter band of the science image.
- reliability
lsst.afw.table.SourceCatalog Reliability (e.g. real/bogus) scores, row-matched to
diaSourceCat.
Returns#
- results
lsst.pipe.base.Struct Results struct with components.
diaSourceTable: Catalog of DiaSources with calibrated values and renamed columns. (lsst.pipe.tasks.ParquetTableorpandas.DataFrame)
- diaSourceCat
- runQuantum(butlerQC, inputRefs, outputRefs)#
Do butler IO and transform to provide in memory objects for tasks
runmethod.Parameters#
- butlerQC
QuantumContext A butler which is specialized to operate in the context of a
lsst.daf.butler.Quantum.- inputRefs
InputQuantizedConnection Datastructure whose attribute names are the names that identify connections defined in corresponding
PipelineTaskConnectionsclass. The values of these attributes are thelsst.daf.butler.DatasetRefobjects associated with the defined input/prerequisite connections.- outputRefs
OutputQuantizedConnection Datastructure whose attribute names are the names that identify connections defined in corresponding
PipelineTaskConnectionsclass. The values of these attributes are thelsst.daf.butler.DatasetRefobjects associated with the defined output connections.
- butlerQC
- initInputs