Reference/API¶
astropy.wcs Package¶
astropy.wcs
contains utilities for managing World Coordinate System
(WCS) transformations in FITS files. These transformations map the
pixel locations in an image to their real-world units, such as their
position on the sky sphere.
It performs three separate classes of WCS transformations:
Core WCS, as defined in the FITS WCS standard, based on Mark Calabretta’s wcslib. See
Wcsprm
.table lookup distortions as defined in WCS distortion paper. See
DistortionLookupTable
.
Each of these transformations can be used independently or together in a standard pipeline.
Functions¶
|
Find all the WCS transformations in the given header. |
Get the path to astropy.wcs’s C header files. |
|
|
Prints a WCS validation report for the given FITS file. |
Classes¶
|
Class that contains auxiliary coordinate system information of a specialist nature. |
|
Represents a single lookup table for a distortion paper transformation. |
The warning raised when the contents of the FITS header have been modified to be standards compliant. |
|
The WCS header inconsistent or unrecognized coordinate axis type(s). |
|
One or more of the world coordinates is invalid. |
|
The subimage specification is invalid. |
|
The given tabular parameters are invalid. |
|
The WCS transformation is invalid, or the transformation parameters are invalid. |
|
|
An error class used to report non-convergence and/or divergence of numerical methods. |
No solution can be found in the given interval. |
|
No WCS keywords were found in the given header. |
|
Non-separable subimage coordinate system. |
|
The linear transformation matrix is singular. |
|
|
The |
|
A class to store the information related to tabular coordinates, i.e., coordinates that are defined via a lookup table. |
|
WCS objects perform standard WCS transformations, and correct for SIP and distortion paper table-lookup transformations, based on the WCS keywords and supplementary data read from a FITS file. |
|
Wcs objects amalgamate basic WCS (as provided by wcslib), with SIP and distortion paper operations. |
Base class of all invalid WCS errors. |
|
|
|
|
Classes to construct coordinate lookup tables from a binary table extension (BINTABLE). |
Class Inheritance Diagram¶
digraph inheritancec0043a22c8 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "AstropyWarning" [URL="../../api/astropy.utils.exceptions.AstropyWarning.html#astropy.utils.exceptions.AstropyWarning",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="The base warning class from which all Astropy warnings should inherit."]; "Auxprm" [URL="../../api/astropy.wcs.Auxprm.html#astropy.wcs.Auxprm",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Class that contains auxiliary coordinate system information of a specialist"]; "BaseHighLevelWCS" [URL="../../api/astropy.wcs.wcsapi.BaseHighLevelWCS.html#astropy.wcs.wcsapi.BaseHighLevelWCS",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Abstract base class for the high-level WCS interface."]; "BaseLowLevelWCS" [URL="../../api/astropy.wcs.wcsapi.BaseLowLevelWCS.html#astropy.wcs.wcsapi.BaseLowLevelWCS",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Abstract base class for the low-level WCS interface."]; "DistortionLookupTable" [URL="../../api/astropy.wcs.DistortionLookupTable.html#astropy.wcs.DistortionLookupTable",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="DistortionLookupTable(*table*, *crpix*, *crval*, *cdelt*)"]; "FITSFixedWarning" [URL="../../api/astropy.wcs.FITSFixedWarning.html#astropy.wcs.FITSFixedWarning",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="The warning raised when the contents of the FITS header have been"]; "AstropyWarning" -> "FITSFixedWarning" [arrowsize=0.5,style="setlinewidth(0.5)"]; "FITSWCSAPIMixin" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="A mix-in class that is intended to be inherited by the"]; "BaseLowLevelWCS" -> "FITSWCSAPIMixin" [arrowsize=0.5,style="setlinewidth(0.5)"]; "HighLevelWCSMixin" -> "FITSWCSAPIMixin" [arrowsize=0.5,style="setlinewidth(0.5)"]; "HighLevelWCSMixin" [URL="../../api/astropy.wcs.wcsapi.HighLevelWCSMixin.html#astropy.wcs.wcsapi.HighLevelWCSMixin",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Mix-in class that automatically provides the high-level WCS API for the"]; "BaseHighLevelWCS" -> "HighLevelWCSMixin" [arrowsize=0.5,style="setlinewidth(0.5)"]; "InconsistentAxisTypesError" [URL="../../api/astropy.wcs.InconsistentAxisTypesError.html#astropy.wcs.InconsistentAxisTypesError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="InconsistentAxisTypesError()"]; "WcsError" -> "InconsistentAxisTypesError" [arrowsize=0.5,style="setlinewidth(0.5)"]; "InvalidCoordinateError" [URL="../../api/astropy.wcs.InvalidCoordinateError.html#astropy.wcs.InvalidCoordinateError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="InvalidCoordinateError()"]; "WcsError" -> "InvalidCoordinateError" [arrowsize=0.5,style="setlinewidth(0.5)"]; "InvalidSubimageSpecificationError" [URL="../../api/astropy.wcs.InvalidSubimageSpecificationError.html#astropy.wcs.InvalidSubimageSpecificationError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="InvalidSubimageSpecificationError()"]; "WcsError" -> "InvalidSubimageSpecificationError" [arrowsize=0.5,style="setlinewidth(0.5)"]; "InvalidTabularParametersError" [URL="../../api/astropy.wcs.InvalidTabularParametersError.html#astropy.wcs.InvalidTabularParametersError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="InvalidTabularParametersError()"]; "WcsError" -> "InvalidTabularParametersError" [arrowsize=0.5,style="setlinewidth(0.5)"]; "InvalidTransformError" [URL="../../api/astropy.wcs.InvalidTransformError.html#astropy.wcs.InvalidTransformError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="InvalidTransformError()"]; "WcsError" -> "InvalidTransformError" [arrowsize=0.5,style="setlinewidth(0.5)"]; "NoConvergence" [URL="../../api/astropy.wcs.NoConvergence.html#astropy.wcs.NoConvergence",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="An error class used to report non-convergence and/or divergence"]; "NoSolutionError" [URL="../../api/astropy.wcs.NoSolutionError.html#astropy.wcs.NoSolutionError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="NoSolutionError()"]; "WcsError" -> "NoSolutionError" [arrowsize=0.5,style="setlinewidth(0.5)"]; "NoWcsKeywordsFoundError" [URL="../../api/astropy.wcs.NoWcsKeywordsFoundError.html#astropy.wcs.NoWcsKeywordsFoundError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="NoWcsKeywordsFoundError()"]; "WcsError" -> "NoWcsKeywordsFoundError" [arrowsize=0.5,style="setlinewidth(0.5)"]; "NonseparableSubimageCoordinateSystemError" [URL="../../api/astropy.wcs.NonseparableSubimageCoordinateSystemError.html#astropy.wcs.NonseparableSubimageCoordinateSystemError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="NonseparableSubimageCoordinateSystemError()"]; "WcsError" -> "NonseparableSubimageCoordinateSystemError" [arrowsize=0.5,style="setlinewidth(0.5)"]; "SingularMatrixError" [URL="../../api/astropy.wcs.SingularMatrixError.html#astropy.wcs.SingularMatrixError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="SingularMatrixError()"]; "WcsError" -> "SingularMatrixError" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Sip" [URL="../../api/astropy.wcs.Sip.html#astropy.wcs.Sip",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Sip(*a, b, ap, bp, crpix*)"]; "Tabprm" [URL="../../api/astropy.wcs.Tabprm.html#astropy.wcs.Tabprm",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="A class to store the information related to tabular coordinates,"]; "WCS" [URL="../../api/astropy.wcs.WCS.html#astropy.wcs.WCS",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="WCS objects perform standard WCS transformations, and correct for"]; "FITSWCSAPIMixin" -> "WCS" [arrowsize=0.5,style="setlinewidth(0.5)"]; "WCSBase" -> "WCS" [arrowsize=0.5,style="setlinewidth(0.5)"]; "WCSBase" [URL="../../api/astropy.wcs.WCSBase.html#astropy.wcs.WCSBase",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Wcs(*sip, cpdis, wcsprm, det2im*)"]; "WcsError" [URL="../../api/astropy.wcs.WcsError.html#astropy.wcs.WcsError",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Base class of all invalid WCS errors."]; "Wcsprm" [URL="../../api/astropy.wcs.Wcsprm.html#astropy.wcs.Wcsprm",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Wcsprm(header=None, key=' ', relax=False, naxis=2, keysel=0, colsel=None)"]; "Wtbarr" [URL="../../api/astropy.wcs.Wtbarr.html#astropy.wcs.Wtbarr",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Classes to construct coordinate lookup tables from a binary table"]; }astropy.wcs.utils Module¶
Functions¶
|
Add a new Stokes axis that is uncorrelated with any other axes. |
|
For a given coordinate frame, return the corresponding WCS object. |
For a given WCS, return the coordinate frame that matches the celestial component of the WCS. |
|
For a WCS returns pixel scales along each axis of the image pixel at the |
|
For a celestial WCS (see |
|
|
For a WCS returns |
|
Calculate the pixel scale along each axis of a non-celestial WCS, for example one with mixed spectral and spatial axes. |
|
Convert a set of SkyCoord coordinates into pixels. |
|
Convert a set of pixel coordinates into a |
|
Transform pixel coordinates in a dataset with a WCS to pixel coordinates in another dataset with a different WCS. |
|
Return a matrix of shape |
|
Given two matching sets of coordinates on detector and sky, compute the WCS. |
Classes¶
|
|
|
Class Inheritance Diagram¶
digraph inheritance849780ade3 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "custom_frame_to_wcs_mappings" [URL="../../api/astropy.wcs.utils.custom_frame_to_wcs_mappings.html#astropy.wcs.utils.custom_frame_to_wcs_mappings",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "custom_wcs_to_frame_mappings" [URL="../../api/astropy.wcs.utils.custom_wcs_to_frame_mappings.html#astropy.wcs.utils.custom_wcs_to_frame_mappings",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; }astropy.wcs.wcsapi Package¶
Functions¶
|
Deserialize classes recursively. |
|
Given a slice as input sanitise it to an easier to parse format.format |
|
Validate a list of physical types against the UCD1+ standard |
|
Classes¶
Abstract base class for the high-level WCS interface. |
|
Abstract base class for the low-level WCS interface. |
|
|
A base wrapper class for things that modify Low Level WCSes. |
Mix-in class that automatically provides the high-level WCS API for the low-level WCS object given by the |
|
|
Wrapper class that can take any |
|
A Low Level WCS wrapper which applies an array slice to a WCS. |