wcs_from_points¶
- gwcs.wcstools.wcs_from_points(xy, world_coordinates, fiducial, projection=<Sky2Pix_Gnomonic()>, degree=4, polynomial_type='polynomial')[source]¶
Given two matching sets of coordinates on detector and sky, compute the WCS.
- Parameters
- xytuple of 2 ndarrays
Points in the input cooridnate frame - x, y inputs.
- world_coordinatestuple of 2 ndarrays
Points in the output coordinate frame. The order matches the order of
xy
.- fiducial_point
SkyCoord
A fiducial point in the output coordinate frame.
- projection
Projection
A projection type. One of the projections in
projcode
.- degreeint
Degree of Polynpomial model to be fit to data.
- polynomial_typestr
one of “polynomial”, “chebyshev”, “legendre”
- Returns
- wcsobj
WCS
a WCS object for this observation.
- wcsobj
Notes
This function implements the following algorithm:
world_coordinates
are transformed to a projection plane using the specified projection. A polynomial fitsxy
and the projected coordinates. The fitted polynomials and the projection transforms are combined into a tranform from detector to sky. The input coordinate frame is set todetector
. The output coordinate frame is initialized based on the frame in the fiducial.