# matchutils¶

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

class tweakwcs.matchutils.MatchCatalogs[source]
class tweakwcs.matchutils.TPMatch(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.
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.