Skip to content

Commit

Permalink
Merge branch 'tickets/DM-27169' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
kfindeisen committed Dec 9, 2020
2 parents f32b2b1 + 5a4d3f0 commit 2ce3736
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
6 changes: 5 additions & 1 deletion doc/lsst.daf.butler/formatters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,17 @@ Additionally, if the storage class refers to a composite, the datastore can be c
Since derived components are computed and are not persisted themselves, the datastore needs to be told which component should be used to calculate this derived quantity.
To enable this the delegate must implement `StorageClassDelegate.selectResponsibleComponent()`.
This method is given the name of the derived component and a list of all available persisted components and must return one and only one relevant component.
The datastore will then make a component request to the formatter associated with that component.
The datastore will then make a component request to the `~lsst.daf.butler.Formatter` associated with that component.

.. note::

All delegates must support read/write components and derived components in the `StorageClassDelegate.getComponent()` implementation method.
As a corollary, all storage classes using components must specify a delegate.

.. note::

A component returned by `~StorageClassDelegate.selectResponsibleComponent()` may require a custom formatter, to support the derived component, even if it otherwise would not.

Read Parameters
^^^^^^^^^^^^^^^

Expand Down
2 changes: 2 additions & 0 deletions python/lsst/daf/butler/configs/datastores/formatters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ CoaddInputs: lsst.obs.base.formatters.fitsGeneric.FitsGenericFormatter
VisitInfo: lsst.obs.base.formatters.fitsGeneric.FitsGenericFormatter
ApCorr: lsst.obs.base.formatters.fitsGeneric.FitsGenericFormatter
PhotoCalib: lsst.obs.base.formatters.fitsGeneric.FitsGenericFormatter
FilterLabel: lsst.obs.base.formatters.fitsGeneric.FitsGenericFormatter
TransmissionCurve: lsst.obs.base.formatters.fitsGeneric.FitsGenericFormatter
Camera: lsst.obs.base.formatters.fitsGeneric.FitsGenericFormatter
Detector: lsst.obs.base.formatters.fitsGeneric.FitsGenericFormatter
Expand Down Expand Up @@ -60,6 +61,7 @@ MetricValue:
unsafe_dump: true
BrighterFatterKernel: lsst.daf.butler.formatters.pickle.PickleFormatter
StructuredDataDict: lsst.daf.butler.formatters.yaml.YamlFormatter
# TODO: remove Filter in DM-27177
Filter: lsst.obs.base.formatters.filter.FilterFormatter
Stamps: lsst.obs.base.formatters.fitsGeneric.FitsGenericFormatter
AstropyTable: lsst.daf.butler.formatters.astropyTable.AstropyTableFormatter
Expand Down
10 changes: 9 additions & 1 deletion python/lsst/daf/butler/configs/storageClasses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,13 @@ storageClasses:
pytype: lsst.meas.algorithms.Curve
CrosstalkCalib:
pytype: lsst.ip.isr.CrosstalkCalib
# TODO: remove Filter in DM-27177
Filter:
pytype: lsst.afw.image.Filter
FilterLabel:
pytype: lsst.afw.image.FilterLabel
# To support exposure.filter; remove in DM-27177
delegate: lsst.obs.base.formatters.filter.FilterTranslator
Exposure:
pytype: lsst.afw.image.Exposure
delegate: lsst.obs.base.exposureAssembler.ExposureAssembler
Expand All @@ -123,13 +128,16 @@ storageClasses:
coaddInputs: CoaddInputs
transmissionCurve: TransmissionCurve
metadata: PropertyList
filter: Filter
# TODO: for consistency with Exposure.getFilterLabel(). Deprecate in DM-27177, remove in DM-27811.
filterLabel: FilterLabel
detector: Detector
validPolygon: Polygon
derivedComponents:
bbox: Box2I
dimensions: Extent2I
xy0: Point2I
# TODO: change filter to FilterLabel and make non-derived in DM-27177. This is a breaking change.
filter: Filter
ExposureF:
inheritsFrom: Exposure
pytype: lsst.afw.image.ExposureF
Expand Down

0 comments on commit 2ce3736

Please sign in to comment.