TransformDiaSourceCatalogTask#

class lsst.ap.association.TransformDiaSourceCatalogTask(initInputs, **kwargs)#

Bases: TransformCatalogBaseTask

Transform a DiaSource catalog by calibrating and renaming columns to produce a table ready to insert into the Apdb.

Parameters#

initInputsdict

Must contain diaSourceSchema as the schema for the input catalog.

Attributes Summary

Methods Summary

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.

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 run method.

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#

dfpandas.DataFrame

DataFrame to read bits from and pack them into.

computeBBoxSizes(inputCatalog)#

Compute the size of a square bbox that fully contains the detection footprint.

Parameters#

inputCataloglsst.afw.table.SourceCatalog

Catalog containing detected footprints.

Returns#

outputBBoxSizesnp.ndarray, (N,)

Array of bbox sizes.

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#

diaSourceCatlsst.afw.table.SourceCatalog

Catalog of sources measured on the difference image.

diffImlsst.afw.image.Exposure

Result of subtracting template and science images.

bandstr

Filter band of the science image.

reliabilitylsst.afw.table.SourceCatalog

Reliability (e.g. real/bogus) scores, row-matched to diaSourceCat.

Returns#

resultslsst.pipe.base.Struct

Results struct with components.

  • diaSourceTable : Catalog of DiaSources with calibrated values and renamed columns. (lsst.pipe.tasks.ParquetTable or pandas.DataFrame)

runQuantum(butlerQC, inputRefs, outputRefs)#

Do butler IO and transform to provide in memory objects for tasks run method.

Parameters#

butlerQCQuantumContext

A butler which is specialized to operate in the context of a lsst.daf.butler.Quantum.

inputRefsInputQuantizedConnection

Datastructure whose attribute names are the names that identify connections defined in corresponding PipelineTaskConnections class. The values of these attributes are the lsst.daf.butler.DatasetRef objects associated with the defined input/prerequisite connections.

outputRefsOutputQuantizedConnection

Datastructure whose attribute names are the names that identify connections defined in corresponding PipelineTaskConnections class. The values of these attributes are the lsst.daf.butler.DatasetRef objects associated with the defined output connections.