Skip to content

Commit

Permalink
Improve getOverlappingExposures docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
parejkoj committed Oct 23, 2024
1 parent c21bdf8 commit 00d240d
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions python/lsst/ip/diffim/getTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,46 +126,51 @@ def runQuantum(self, butlerQC, inputRefs, outputRefs):
butlerQC.put(outputs, outputRefs)

def getOverlappingExposures(self, inputs):
"""Return lists of coadds and their corresponding dataIds that overlap
the detector.
"""Return a data structure containing the coadds that overlap the
specified bbox projected onto the sky, and a corresponding data
structure of their dataIds.
These are the appropriate inputs to this task's `run` method.
The spatial index in the registry has generous padding and often
supplies patches near, but not directly overlapping the detector.
Filters inputs so that we don't have to read in all input coadds.
This filters the inputs so that we don't have to read in all
possibly-matching coadds.
Parameters
----------
inputs : `dict` of task Inputs, containing:
- coaddExposures : `list` \
[`lsst.daf.butler.DeferredDatasetHandle` of \
`lsst.afw.image.Exposure`]
Data references to exposures that might overlap the detector.
Data references to exposures that might overlap the desired
region.
- bbox : `lsst.geom.Box2I`
Template Bounding box of the detector geometry onto which to
resample the coaddExposures.
Template bounding box of the pixel geometry onto which the
coaddExposures will be resampled.
- skyMap : `lsst.skymap.SkyMap`
Input definition of geometry/bbox and projection/wcs for
template exposures.
Geometry of the tracts and patches the coadds are defined on.
- wcs : `lsst.afw.geom.SkyWcs`
Template WCS onto which to resample the coaddExposures.
Template WCS onto which the coadds will be resampled, .
Returns
-------
result : `lsst.pipe.base.Struct`
A struct with attributes:
``coaddExposures``
Dict of Coadd exposures that overlap the detector, indexed on
tract id (`dict` [`int`, `list` [`lsst.afw.image.Exposure`] ]).
Dict of coadd exposures that overlap the projected bbox,
indexed on tract id
(`dict` [`int`, `list` [`lsst.afw.image.Exposure`] ]).
``dataIds``
Dict of data IDs of the coadd exposures that overlap the
detector, indexed on tract id
projected bbox, indexed on tract id
(`dict` [`int`, `list [`lsst.daf.butler.DataCoordinate`] ]).
Raises
------
NoWorkFound
Raised if no patches overlap the input detector bbox.
Raised if no patches overlap the input detector bbox, or the input
WCS is None.
"""
# Check that the patches actually overlap the detector
# Exposure's validPolygon would be more accurate
Expand Down

0 comments on commit 00d240d

Please sign in to comment.