matchutils

A module that provides algorithms matching catalogs and for initial estimation of shifts based on 2D histograms.

License:

LICENSE

class tweakwcs.matchutils.MatchCatalogs[source]

A class that provides common interface for matching catalogs.

class tweakwcs.matchutils.XYXYMatch(searchrad=3.0, separation=0.5, use2dhist=True, xoffset=0.0, yoffset=0.0, tolerance=1.0)[source]

Catalog source matching in tangent plane. Uses xyxymatch algorithm to cross-match sources between this catalog and a reference catalog.

Note

The tangent plane is a plane tangent to the celestial sphere and it must be not distorted, that is, if image coordinates are distorted, then distortion correction must be applied to them before tangent plane coordinates are computed. Alternatively, one can think that undistorted world coordinates are projected from the sphere onto the tangent plane.

Parameters:
searchrad: float, optional

The search radius for a match (in units of the tangent plane).

separation: float, optional

The minimum separation in the tangent plane (in units of the tangent plane) for sources in the image and reference catalogs in order to be considered to be disctinct sources. Objects closer together than separation distance are removed from the image and reference coordinate catalogs prior to matching. This parameter gets passed directly to xyxymatch() for use in matching the object lists from each image with the reference catalog’s object list.

use2dhist: bool, optional

Use 2D histogram to find initial offset?

xoffset: float, optional

Initial estimate for the offset in X (in units of the tangent plane) between the sources in the image and the reference catalogs. This offset will be used for all input images provided. This parameter is ignored when use2dhist is True.

yoffset: float, optional

Initial estimate for the offset in Y (in units of the tangent plane) between the sources in the image and the reference catalogs. This offset will be used for all input images provided. This parameter is ignored when use2dhist is True.

tolerance: float, optional

The matching tolerance (in units of the tangent plane) after applying an initial solution derived from the ‘triangles’ algorithm. This parameter gets passed directly to xyxymatch() for use in matching the object lists from each image with the reference image’s object list.