CoaddProvenance#

class lsst.images.cells.CoaddProvenance(inputs: Table, contributions: Table)#

Bases: object

A pair of tables that record the inputs to a cell-based coadd.

Parameters#

inputs

A table of {visit, detector} combinations that contribute to any cell in the coadd.

contributions

A table of {visit, detector, cell} combinations that describe how an observation contributed to a cell.

Notes#

This object can represent the provenance of a whole patch, a single cell, or anything in between. In the single-cell case, the inputs and contributions tables have the same number of rows (but may not be ordered the same way!).

Attributes Summary

contributions

A table of {visit, detector, cell} combinations that describe how an observation contributed to a cell.

inputs

A table of {visit, detector} combinations that contribute to any cell in the coadd.

Methods Summary

deserialize(model, archive)

Deserialize a provenance from an input archive.

from_legacy(legacy_cell_coadd)

Extract provenance from a legacy lsst.cell_coadds.MultipleCellCoadd object.

make_empty_contribution_table(n_rows)

Make an empty contributions table with a set number of rows.

make_empty_input_table(n_rows)

Make an empty inputs table with a set number of rows.

serialize(archive)

Serialize the provenance to an output archive.

subset(cells)

Return a new provenance object with just the given cells.

Attributes Documentation

contributions#

A table of {visit, detector, cell} combinations that describe how an observation contributed to a cell.

inputs#

A table of {visit, detector} combinations that contribute to any cell in the coadd.

Methods Documentation

classmethod deserialize(model: CoaddProvenanceSerializationModel, archive: InputArchive[Any]) CoaddProvenance#

Deserialize a provenance from an input archive.

Parameters#

model

A Pydantic model representation of the image, holding references to data stored in the archive.

archive

Archive to read from.

Notes#

While CoaddProvenance.subset can be used to filter provenance information down to just certain cells, there is no advantage to be had from doing this during deserialization (the table data is not ordered by cell, and hence there’s read-slicing we can do).

static from_legacy(legacy_cell_coadd: MultipleCellCoadd) CoaddProvenance#

Extract provenance from a legacy lsst.cell_coadds.MultipleCellCoadd object.

classmethod make_empty_contribution_table(n_rows: int) Table#

Make an empty contributions table with a set number of rows.

classmethod make_empty_input_table(n_rows: int) Table#

Make an empty inputs table with a set number of rows.

serialize(archive: OutputArchive[Any]) CoaddProvenanceSerializationModel#

Serialize the provenance to an output archive.

Parameters#

archive

Archive to write to.

subset(cells: Iterable[CellIJ]) CoaddProvenance#

Return a new provenance object with just the given cells.