CoaddProvenance#

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

Bases: object

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

Parameters:
  • inputs (Table) – A table of {visit, detector} combinations that contribute to any cell in the coadd.

  • contributions (Table) – 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

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.

to_legacy_cell_coadd_inputs(observations)

Construct a mapping from legacy cell index to the list of legacy input structs for that cell.

to_legacy_polygon_map()

Construct a legacy mapping from lsst.cell_coadds.ObservationIdentifiers to lsst.afw.geom.Polygon from the inputs table.

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

static from_legacy(legacy_cell_coadd)#

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

Parameters:

legacy_cell_coadd (TypeAliasType) – Legacy cell coadd to extract provenance from.

Return type:

CoaddProvenance

classmethod make_empty_contribution_table(n_rows)#

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

Parameters:

n_rows (int) – Number of rows in the new table.

Return type:

Table

classmethod make_empty_input_table(n_rows)#

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

Parameters:

n_rows (int) – Number of rows in the new table.

Return type:

Table

serialize(archive)#

Serialize the provenance to an output archive.

Parameters:

archive (OutputArchive[Any]) – Archive to write to.

Return type:

CoaddProvenanceSerializationModel

subset(cells)#

Return a new provenance object with just the given cells.

Parameters:

cells (Iterable[CellIJ]) – Cells to keep in the returned provenance.

Return type:

CoaddProvenance

to_legacy_cell_coadd_inputs(observations)#

Construct a mapping from legacy cell index to the list of legacy input structs for that cell.

Parameters:

observations (Iterable[TypeAliasType] | None) – Observations to include, or None to include all observations in the inputs table.

Return type:

dict[TypeAliasType, dict[TypeAliasType, TypeAliasType]]

to_legacy_polygon_map()#

Construct a legacy mapping from lsst.cell_coadds.ObservationIdentifiers to lsst.afw.geom.Polygon from the inputs table.

Return type:

dict[TypeAliasType, TypeAliasType]

This page was last modified on .