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: xy : tuple of 2 ndarrays
Points in the input cooridnate frame - x, y inputs.
world_coordinates : tuple of 2 ndarrays
Points in the output coordinate frame. The order matches the order of
xy.fiducial_point :
SkyCoordA fiducial point in the output coordinate frame.
projection :
ProjectionA projection type. One of the projections in
projcode.degree : int
Degree of Polynpomial model to be fit to data.
polynomial_type : str
one of “polynomial”, “chebyshev”, “legendre”
Returns: wcsobj :
WCSa WCS object for this observation.
Notes
This function implements the following algorithm:
world_coordinatesare transformed to a projection plane using the specified projection. A polynomial fitsxyand 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.