RegisterTask#

class lsst.pipe.tasks.registerImage.RegisterTask(config: Config | None = None, *, name: str | None = None, parentTask: Task | None = None, log: logging.Logger | lsst.utils.logging.LsstLogAdapter | None = None)#

Bases: Task

Task to register (align) multiple images.

The ‘run’ method provides a revised Wcs from matches and fitting sources. Additional methods are provided as a convenience to warp an exposure (‘warpExposure’) and sources (‘warpSources’) with the new Wcs.

Methods Summary

fitWcs(matches, inputWcs, inputBBox)

Fit Wcs to matches.

matchSources(inputSources, templateSources)

Match sources between the input and template.

run(inputSources, inputWcs, inputBBox, ...)

Register (align) an input exposure to the template The sources must have RA,Dec set, and accurate to within the 'matchRadius' of the configuration in order to facilitate source matching.

warpExposure(inputExp, newWcs, templateWcs, ...)

Warp input exposure to template frame.

warpSources(inputSources, newWcs, ...)

Warp sources to the new frame.

Methods Documentation

fitWcs(matches, inputWcs, inputBBox)#

Fit Wcs to matches.

The fitting includes iterative sigma-clipping.

Parameters#

matcheslist

List of matches (first is target, second is input).

inputWcslsst.afw.geom.SkyWcs

Original input Wcs.

inputBBoxlsst.geom.Box

Bounding box of input exposure.

Returns#

wcs: lsst.afw.geom.SkyWcs

Wcs fitted to matches.

matchSources(inputSources, templateSources)#

Match sources between the input and template.

The order of the input arguments matters (because the later Wcs fitting assumes a particular order).

Parameters#

inputSourceslsst.afw.table.SourceCatalog

Source catalog of the input frame.

templateSourceslsst.afw.table.SourceCatalog

Source of the target frame.

Returns#

matches: list

Match list.

run(inputSources, inputWcs, inputBBox, templateSources)#

Register (align) an input exposure to the template The sources must have RA,Dec set, and accurate to within the ‘matchRadius’ of the configuration in order to facilitate source matching. We fit a new Wcs, but do NOT set it in the input exposure.

Parameters#

inputSourceslsst.afw.table.SourceCatalog

Sources from input exposure.

inputWcslsst.afw.geom.SkyWcs

Wcs of input exposure.

inputBBoxlsst.geom.Box

Bounding box of input exposure.

templateSourceslsst.afw.table.SourceCatalog

Sources from template exposure.

Returns#

resultlsst.pipe.base.Struct

Results as a struct with attributes:

matches

Matches between sources (list).

wcs

Wcs for input in frame of template (lsst.afw.geom.SkyWcs).

warpExposure(inputExp, newWcs, templateWcs, templateBBox)#

Warp input exposure to template frame.

There are a variety of data attached to the exposure (e.g., PSF, PhotoCalib and other metadata), but we do not attempt to warp these to the template frame.

Parameters#

inputExplsst.afw.image.Exposure

Input exposure, to be warped.

newWcslsst.afw.geom.SkyWcs

Revised Wcs for input exposure.

templateWcslsst.afw.geom.SkyWcs

Target Wcs.

templateBBoxlsst.geom.Box

Target bounding box.

Returns#

alignedExplsst.afw.image.Exposure

Warped exposure.

warpSources(inputSources, newWcs, templateWcs, templateBBox)#

Warp sources to the new frame.

It would be difficult to transform all possible quantities of potential interest between the two frames. We therefore update only the sky and pixel coordinates.

Parameters#

inputSourceslsst.afw.table.SourceCatalog

Sources on input exposure, to be warped.

newWcslsst.afw.geom.SkyWcs

Revised Wcs for input exposure.

templateWcslsst.afw.geom.SkyWcs

Target Wcs.

templateBBoxlsst.geom.Box

Target bounding box.

Returns#

alignedSourceslsst.afw.table.SourceCatalog

Warped sources.