Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 82fd441cd3f2a8bc33fc3ed41403eced > files > 1434

python-astropy-0.2.4-4.mga4.x86_64.rpm


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Wcsprm &mdash; Astropy v0.2.4</title>
    
    <link rel="stylesheet" href="../_static/bootstrap-astropy.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '0.2.4',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/sidebar.js"></script>
    <link rel="shortcut icon" href="../_static/astropy_logo.ico"/>
    <link rel="top" title="Astropy v0.2.4" href="../index.html" />
    <link rel="up" title="World Coordinate System (astropy.wcs)" href="../wcs/index.html" />
    <link rel="next" title="Unified file read/write interface" href="../io/unified.html" />
    <link rel="prev" title="WCSBase" href="astropy.wcs.WCSBase.html" /> 
  </head>
  <body>
<div class="topbar">
  <a class="brand" title="Documentation Home" href="../index.html"></a>
  <ul>
    <li><a class="homelink" title="AstroPy Homepage" href="http://www.astropy.org"></a></li>
    <li><a title="General Index" href="../genindex.html">Index</a></li>
    <li><a title="Python Module Index" href="../py-modindex.html">Modules</a></li>
    <li>
      
      
<form action="../search.html" method="get">
  <input type="text" name="q" placeholder="Search" />
  <input type="hidden" name="check_keywords" value="yes" />
  <input type="hidden" name="area" value="default" />
</form>
      
    </li>
  </ul>
</div>

<div class="related">
    <h3>Navigation</h3>
    <ul>
      <li class="right">
	<a href="../io/unified.html" title="Unified file read/write interface">
	  next &raquo;
	</a>
      </li>
      <li class="right">
	<a href="astropy.wcs.WCSBase.html" title="WCSBase">
	  &laquo; previous
	</a>
	 |
      </li>
      <li>
	<a href="../index.html">Astropy v0.2.4</a>
	 &raquo;
      </li>
      <li><a href="../wcs/index.html" accesskey="U">World Coordinate System (<tt class="docutils literal"><span class="pre">astropy.wcs</span></tt>)</a> &raquo;</li>
      
      <li>Wcsprm</li> 
    </ul>
</div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="wcsprm">
<h1>Wcsprm<a class="headerlink" href="#wcsprm" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="astropy.wcs.Wcsprm">
<em class="property">class </em><tt class="descclassname">astropy.wcs.</tt><tt class="descname">Wcsprm</tt><a class="headerlink" href="#astropy.wcs.Wcsprm" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p><a class="reference internal" href="#astropy.wcs.Wcsprm" title="astropy.wcs.Wcsprm"><tt class="xref py py-obj docutils literal"><span class="pre">Wcsprm</span></tt></a> is a direct wrapper around <a class="reference external" href="http://www.atnf.csiro.au/~mcalabre/WCS/">wcslib</a>.  It
provides access to the core WCS transformations that it supports.</p>
<p>The FITS header parsing enforces correct FITS &#8220;keyword = value&#8221; syntax
with regard to the equals sign occurring in columns 9 and 10.
However, it does recognize free-format character (NOST 100-2.0,
Sect. 5.2.1), integer (Sect. 5.2.3), and floating-point values
(Sect. 5.2.4) for all keywords.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters :</th><td class="field-body"><p class="first"><strong>header</strong> : An <a class="reference internal" href="../io/fits/api/headers.html#astropy.io.fits.Header" title="astropy.io.fits.Header"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.io.fits.Header</span></tt></a>, string, or <tt class="xref py py-obj docutils literal"><span class="pre">None</span></tt>.</p>
<blockquote>
<div><p>If <tt class="docutils literal"><span class="pre">None</span></tt>, the object will be initialized to default values.</p>
</div></blockquote>
<p><strong>key</strong> : string, optional</p>
<blockquote>
<div><p>The key referring to a particular WCS transform in the header.
This may be either <tt class="docutils literal"><span class="pre">'</span> <span class="pre">'</span></tt> or <tt class="docutils literal"><span class="pre">'A'</span></tt>-<tt class="docutils literal"><span class="pre">'Z'</span></tt> and corresponds to
the <tt class="docutils literal"><span class="pre">&quot;a&quot;</span></tt> part of <tt class="docutils literal"><span class="pre">&quot;CTYPEia&quot;</span></tt>.  (<em>key</em> may only be
provided if <em>header</em> is also provided.)</p>
</div></blockquote>
<p><strong>relax</strong> : bool or int, optional</p>
<blockquote>
<div><p>Degree of permissiveness:</p>
<ul class="simple">
<li><tt class="xref py py-obj docutils literal"><span class="pre">False</span></tt>: Recognize only FITS keywords defined by the published
WCS standard.</li>
<li><tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt>: Admit all recognized informal extensions of the WCS
standard.</li>
<li><tt class="xref py py-obj docutils literal"><span class="pre">int</span></tt>: a bit field selecting specific extensions to accept.  See
<a class="reference internal" href="../wcs/relax.html#relaxread"><em>Header-reading relaxation constants</em></a> for details.</li>
</ul>
</div></blockquote>
<p><strong>naxis</strong> : int, optional</p>
<blockquote>
<div><p>The number of world coordinates axes for the object.  (<em>naxis</em> may
only be provided if <em>header</em> is <tt class="xref py py-obj docutils literal"><span class="pre">None</span></tt>.)</p>
</div></blockquote>
<p><strong>keysel</strong> : sequence of flag bits, optional</p>
<blockquote>
<div><p>Vector of flag bits that may be used to restrict the keyword types
considered:</p>
<blockquote>
<div><ul class="simple">
<li><tt class="docutils literal"><span class="pre">WCSHDR_IMGHEAD</span></tt>: Image header keywords.</li>
<li><tt class="docutils literal"><span class="pre">WCSHDR_BIMGARR</span></tt>: Binary table image array.</li>
<li><tt class="docutils literal"><span class="pre">WCSHDR_PIXLIST</span></tt>: Pixel list keywords.</li>
</ul>
</div></blockquote>
<p>If zero, there is no restriction.  If -1, the underlying wcslib
function <tt class="docutils literal"><span class="pre">wcspih()</span></tt> is called, rather than <tt class="docutils literal"><span class="pre">wcstbh()</span></tt>.</p>
</div></blockquote>
<p><strong>colsel</strong> : sequence of int</p>
<blockquote>
<div><p>A sequence of table column numbers used to restrict the keywords
considered.  <tt class="xref py py-obj docutils literal"><span class="pre">None</span></tt> indicates no restriction.</p>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first"><strong>MemoryError</strong> :</p>
<blockquote>
<div><p>Memory allocation failed.</p>
</div></blockquote>
<p><strong>ValueError</strong> :</p>
<blockquote>
<div><p>Invalid key.</p>
</div></blockquote>
<p><strong>KeyError</strong> :</p>
<blockquote class="last">
<div><p>Key not found in FITS header.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Attributes Summary</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.alt" title="astropy.wcs.Wcsprm.alt"><tt class="xref py py-obj docutils literal"><span class="pre">alt</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">str</span></tt> Character code for alternate coordinate descriptions.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.axis_types" title="astropy.wcs.Wcsprm.axis_types"><tt class="xref py py-obj docutils literal"><span class="pre">axis_types</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">int</span> <span class="pre">array[naxis]</span></tt> An array of four-digit type codes for each axis.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.cd" title="astropy.wcs.Wcsprm.cd"><tt class="xref py py-obj docutils literal"><span class="pre">cd</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[naxis][naxis]</span></tt> The <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> linear transformation</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.cdelt" title="astropy.wcs.Wcsprm.cdelt"><tt class="xref py py-obj docutils literal"><span class="pre">cdelt</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[naxis]</span></tt> Coordinate increments (<tt class="docutils literal"><span class="pre">CDELTia</span></tt>) for each</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.cel_offset" title="astropy.wcs.Wcsprm.cel_offset"><tt class="xref py py-obj docutils literal"><span class="pre">cel_offset</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">boolean</span></tt> Is there an offset?</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.cname" title="astropy.wcs.Wcsprm.cname"><tt class="xref py py-obj docutils literal"><span class="pre">cname</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">list</span> <span class="pre">of</span> <span class="pre">strings</span></tt> A list of the coordinate axis names, from</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.colax" title="astropy.wcs.Wcsprm.colax"><tt class="xref py py-obj docutils literal"><span class="pre">colax</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">int</span> <span class="pre">array[naxis]</span></tt> An array recording the column numbers for each</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.colnum" title="astropy.wcs.Wcsprm.colnum"><tt class="xref py py-obj docutils literal"><span class="pre">colnum</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">int</span></tt> Column of FITS binary table associated with this WCS.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.crder" title="astropy.wcs.Wcsprm.crder"><tt class="xref py py-obj docutils literal"><span class="pre">crder</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[naxis]</span></tt> The random error in each coordinate axis,</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.crota" title="astropy.wcs.Wcsprm.crota"><tt class="xref py py-obj docutils literal"><span class="pre">crota</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[naxis]</span></tt> <tt class="docutils literal"><span class="pre">CROTAia</span></tt> keyvalues for each coordinate</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.crpix" title="astropy.wcs.Wcsprm.crpix"><tt class="xref py py-obj docutils literal"><span class="pre">crpix</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[naxis]</span></tt> Coordinate reference pixels (<tt class="docutils literal"><span class="pre">CRPIXja</span></tt>) for</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.crval" title="astropy.wcs.Wcsprm.crval"><tt class="xref py py-obj docutils literal"><span class="pre">crval</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[naxis]</span></tt> Coordinate reference values (<tt class="docutils literal"><span class="pre">CRVALia</span></tt>) for</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.csyer" title="astropy.wcs.Wcsprm.csyer"><tt class="xref py py-obj docutils literal"><span class="pre">csyer</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[naxis]</span></tt> The systematic error in the coordinate value</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.ctype" title="astropy.wcs.Wcsprm.ctype"><tt class="xref py py-obj docutils literal"><span class="pre">ctype</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">list</span> <span class="pre">of</span> <span class="pre">strings[naxis]</span></tt> List of <tt class="docutils literal"><span class="pre">CTYPEia</span></tt> keyvalues.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.cubeface" title="astropy.wcs.Wcsprm.cubeface"><tt class="xref py py-obj docutils literal"><span class="pre">cubeface</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">int</span></tt> Index into the <tt class="docutils literal"><span class="pre">pixcrd</span></tt> (pixel coordinate) array for the</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.cunit" title="astropy.wcs.Wcsprm.cunit"><tt class="xref py py-obj docutils literal"><span class="pre">cunit</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">list</span> <span class="pre">of</span> <span class="pre">astropy.UnitBase[naxis]</span></tt> List of <tt class="docutils literal"><span class="pre">CUNITia</span></tt> keyvalues as</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.dateavg" title="astropy.wcs.Wcsprm.dateavg"><tt class="xref py py-obj docutils literal"><span class="pre">dateavg</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">string</span></tt> Representative mid-point of the date of observation.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.dateobs" title="astropy.wcs.Wcsprm.dateobs"><tt class="xref py py-obj docutils literal"><span class="pre">dateobs</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">string</span></tt> Start of the date of observation.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.equinox" title="astropy.wcs.Wcsprm.equinox"><tt class="xref py py-obj docutils literal"><span class="pre">equinox</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span></tt> The equinox associated with dynamical equatorial or</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.imgpix_matrix" title="astropy.wcs.Wcsprm.imgpix_matrix"><tt class="xref py py-obj docutils literal"><span class="pre">imgpix_matrix</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[2][2]</span></tt> (read-only) Inverse of the <tt class="docutils literal"><span class="pre">CDELT</span></tt> or <tt class="docutils literal"><span class="pre">PC</span></tt></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.lat" title="astropy.wcs.Wcsprm.lat"><tt class="xref py py-obj docutils literal"><span class="pre">lat</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">int</span></tt> (read-only) The index into the world coord array containing</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.latpole" title="astropy.wcs.Wcsprm.latpole"><tt class="xref py py-obj docutils literal"><span class="pre">latpole</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span></tt> The native latitude of the celestial pole, <tt class="docutils literal"><span class="pre">LATPOLEa</span></tt> (deg).</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.lattyp" title="astropy.wcs.Wcsprm.lattyp"><tt class="xref py py-obj docutils literal"><span class="pre">lattyp</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">string</span></tt> (read-only) Celestial axis type for latitude.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.lng" title="astropy.wcs.Wcsprm.lng"><tt class="xref py py-obj docutils literal"><span class="pre">lng</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">int</span></tt> (read-only) The index into the world coord array containing</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.lngtyp" title="astropy.wcs.Wcsprm.lngtyp"><tt class="xref py py-obj docutils literal"><span class="pre">lngtyp</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">string</span></tt> (read-only) Celestial axis type for longitude.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.lonpole" title="astropy.wcs.Wcsprm.lonpole"><tt class="xref py py-obj docutils literal"><span class="pre">lonpole</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span></tt> The native longitude of the celestial pole.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.mjdavg" title="astropy.wcs.Wcsprm.mjdavg"><tt class="xref py py-obj docutils literal"><span class="pre">mjdavg</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span></tt> Modified Julian Date corresponding to <tt class="docutils literal"><span class="pre">DATE-AVG</span></tt>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.mjdobs" title="astropy.wcs.Wcsprm.mjdobs"><tt class="xref py py-obj docutils literal"><span class="pre">mjdobs</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span></tt> Modified Julian Date corresponding to <tt class="docutils literal"><span class="pre">DATE-OBS</span></tt>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.name" title="astropy.wcs.Wcsprm.name"><tt class="xref py py-obj docutils literal"><span class="pre">name</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">string</span></tt> The name given to the coordinate representation</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.naxis" title="astropy.wcs.Wcsprm.naxis"><tt class="xref py py-obj docutils literal"><span class="pre">naxis</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">int</span></tt> (read-only) The number of axes (pixel and coordinate).</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.obsgeo" title="astropy.wcs.Wcsprm.obsgeo"><tt class="xref py py-obj docutils literal"><span class="pre">obsgeo</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[3]</span></tt> Location of the observer in a standard terrestrial</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.pc" title="astropy.wcs.Wcsprm.pc"><tt class="xref py py-obj docutils literal"><span class="pre">pc</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[naxis][naxis]</span></tt> The <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> (pixel coordinate)</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.phi0" title="astropy.wcs.Wcsprm.phi0"><tt class="xref py py-obj docutils literal"><span class="pre">phi0</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span></tt> The native latitude of the fiducial point.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.piximg_matrix" title="astropy.wcs.Wcsprm.piximg_matrix"><tt class="xref py py-obj docutils literal"><span class="pre">piximg_matrix</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[2][2]</span></tt> (read-only) Matrix containing the product of</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.radesys" title="astropy.wcs.Wcsprm.radesys"><tt class="xref py py-obj docutils literal"><span class="pre">radesys</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">string</span></tt> The equatorial or ecliptic coordinate system type,</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.restfrq" title="astropy.wcs.Wcsprm.restfrq"><tt class="xref py py-obj docutils literal"><span class="pre">restfrq</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span></tt> Rest frequency (Hz) from <tt class="docutils literal"><span class="pre">RESTFRQa</span></tt>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.restwav" title="astropy.wcs.Wcsprm.restwav"><tt class="xref py py-obj docutils literal"><span class="pre">restwav</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span></tt> Rest wavelength (m) from <tt class="docutils literal"><span class="pre">RESTWAVa</span></tt>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.spec" title="astropy.wcs.Wcsprm.spec"><tt class="xref py py-obj docutils literal"><span class="pre">spec</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">int</span></tt> (read-only) The index containing the spectral axis values.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.specsys" title="astropy.wcs.Wcsprm.specsys"><tt class="xref py py-obj docutils literal"><span class="pre">specsys</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">string</span></tt> Spectral reference frame (standard of rest), <tt class="docutils literal"><span class="pre">SPECSYSa</span></tt>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.ssysobs" title="astropy.wcs.Wcsprm.ssysobs"><tt class="xref py py-obj docutils literal"><span class="pre">ssysobs</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">string</span></tt> Spectral reference frame.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.ssyssrc" title="astropy.wcs.Wcsprm.ssyssrc"><tt class="xref py py-obj docutils literal"><span class="pre">ssyssrc</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">string</span></tt> Spectral reference frame for redshift.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.tab" title="astropy.wcs.Wcsprm.tab"><tt class="xref py py-obj docutils literal"><span class="pre">tab</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">list</span> <span class="pre">of</span> <span class="pre">Tabprm</span></tt> Tabular coordinate objects.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.theta0" title="astropy.wcs.Wcsprm.theta0"><tt class="xref py py-obj docutils literal"><span class="pre">theta0</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span></tt>  The native longitude of the fiducial point.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.velangl" title="astropy.wcs.Wcsprm.velangl"><tt class="xref py py-obj docutils literal"><span class="pre">velangl</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span></tt> Velocity angle.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.velosys" title="astropy.wcs.Wcsprm.velosys"><tt class="xref py py-obj docutils literal"><span class="pre">velosys</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span></tt> Relative radial velocity.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.zsource" title="astropy.wcs.Wcsprm.zsource"><tt class="xref py py-obj docutils literal"><span class="pre">zsource</span></tt></a></td>
<td><tt class="docutils literal"><span class="pre">double</span></tt> The redshift, <tt class="docutils literal"><span class="pre">ZSOURCEa</span></tt>, of the source.</td>
</tr>
</tbody>
</table>
<p class="rubric">Methods Summary</p>
<table border="1" class="longtable docutils">
<colgroup>
<col width="10%" />
<col width="90%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.cdfix" title="astropy.wcs.Wcsprm.cdfix"><tt class="xref py py-obj docutils literal"><span class="pre">cdfix</span></tt></a>()</td>
<td>Fix erroneously omitted <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> keywords.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.celfix" title="astropy.wcs.Wcsprm.celfix"><tt class="xref py py-obj docutils literal"><span class="pre">celfix</span></tt></a></td>
<td>Translates AIPS-convention celestial projection types, <tt class="docutils literal"><span class="pre">-NCP</span></tt> and <tt class="docutils literal"><span class="pre">-GLS</span></tt>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.cylfix" title="astropy.wcs.Wcsprm.cylfix"><tt class="xref py py-obj docutils literal"><span class="pre">cylfix</span></tt></a>()</td>
<td>Fixes WCS keyvalues for malformed cylindrical projections.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.datfix" title="astropy.wcs.Wcsprm.datfix"><tt class="xref py py-obj docutils literal"><span class="pre">datfix</span></tt></a>()</td>
<td>Translates the old <tt class="docutils literal"><span class="pre">DATE-OBS</span></tt> date format to year-2000 standard form <tt class="docutils literal"><span class="pre">(yyyy-mm-ddThh:mm:ss)</span></tt> and derives <tt class="docutils literal"><span class="pre">MJD-OBS</span></tt> from it if not already set.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.fix" title="astropy.wcs.Wcsprm.fix"><tt class="xref py py-obj docutils literal"><span class="pre">fix</span></tt></a>([translate_units,&nbsp;naxis])</td>
<td>Applies all of the corrections handled separately by <a class="reference internal" href="#astropy.wcs.Wcsprm.datfix" title="astropy.wcs.Wcsprm.datfix"><tt class="xref py py-obj docutils literal"><span class="pre">datfix</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.unitfix" title="astropy.wcs.Wcsprm.unitfix"><tt class="xref py py-obj docutils literal"><span class="pre">unitfix</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.celfix" title="astropy.wcs.Wcsprm.celfix"><tt class="xref py py-obj docutils literal"><span class="pre">celfix</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.spcfix" title="astropy.wcs.Wcsprm.spcfix"><tt class="xref py py-obj docutils literal"><span class="pre">spcfix</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.cylfix" title="astropy.wcs.Wcsprm.cylfix"><tt class="xref py py-obj docutils literal"><span class="pre">cylfix</span></tt></a> and <a class="reference internal" href="#astropy.wcs.Wcsprm.cdfix" title="astropy.wcs.Wcsprm.cdfix"><tt class="xref py py-obj docutils literal"><span class="pre">cdfix</span></tt></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.get_cdelt" title="astropy.wcs.Wcsprm.get_cdelt"><tt class="xref py py-obj docutils literal"><span class="pre">get_cdelt</span></tt></a>(()&nbsp;-&gt;&nbsp;double&nbsp;array[naxis])</td>
<td>Coordinate increments (<tt class="docutils literal"><span class="pre">CDELTia</span></tt>) for each coord axis.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.get_pc" title="astropy.wcs.Wcsprm.get_pc"><tt class="xref py py-obj docutils literal"><span class="pre">get_pc</span></tt></a>(()&nbsp;-&gt;&nbsp;double&nbsp;array[naxis][naxis])</td>
<td>Returns the <tt class="docutils literal"><span class="pre">PC</span></tt> matrix in read-only form.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.get_ps" title="astropy.wcs.Wcsprm.get_ps"><tt class="xref py py-obj docutils literal"><span class="pre">get_ps</span></tt></a>(()&nbsp;-&gt;&nbsp;list&nbsp;of&nbsp;tuples)</td>
<td>Returns <tt class="docutils literal"><span class="pre">PSi_ma</span></tt> keywords for each <em>i</em> and <em>m</em>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.get_pv" title="astropy.wcs.Wcsprm.get_pv"><tt class="xref py py-obj docutils literal"><span class="pre">get_pv</span></tt></a>(()&nbsp;-&gt;&nbsp;list&nbsp;of&nbsp;tuples)</td>
<td>Returns <tt class="docutils literal"><span class="pre">PVi_ma</span></tt> keywords for each <em>i</em> and <em>m</em>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.has_cd" title="astropy.wcs.Wcsprm.has_cd"><tt class="xref py py-obj docutils literal"><span class="pre">has_cd</span></tt></a>(()&nbsp;-&gt;&nbsp;bool)</td>
<td>Returns <tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt> if <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> is present.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.has_cdi_ja" title="astropy.wcs.Wcsprm.has_cdi_ja"><tt class="xref py py-obj docutils literal"><span class="pre">has_cdi_ja</span></tt></a>(()&nbsp;-&gt;&nbsp;bool)</td>
<td>Alias for <a class="reference internal" href="#astropy.wcs.Wcsprm.has_cd" title="astropy.wcs.Wcsprm.has_cd"><tt class="xref py py-obj docutils literal"><span class="pre">has_cd</span></tt></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.has_crota" title="astropy.wcs.Wcsprm.has_crota"><tt class="xref py py-obj docutils literal"><span class="pre">has_crota</span></tt></a>(()&nbsp;-&gt;&nbsp;bool)</td>
<td>Returns <tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt> if <tt class="docutils literal"><span class="pre">CROTAia</span></tt> is present.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.has_crotaia" title="astropy.wcs.Wcsprm.has_crotaia"><tt class="xref py py-obj docutils literal"><span class="pre">has_crotaia</span></tt></a>(()&nbsp;-&gt;&nbsp;bool)</td>
<td>Alias for <a class="reference internal" href="#astropy.wcs.Wcsprm.has_crota" title="astropy.wcs.Wcsprm.has_crota"><tt class="xref py py-obj docutils literal"><span class="pre">has_crota</span></tt></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.has_pc" title="astropy.wcs.Wcsprm.has_pc"><tt class="xref py py-obj docutils literal"><span class="pre">has_pc</span></tt></a>(()&nbsp;-&gt;&nbsp;bool)</td>
<td>Returns <tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt> if <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> is present.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.has_pci_ja" title="astropy.wcs.Wcsprm.has_pci_ja"><tt class="xref py py-obj docutils literal"><span class="pre">has_pci_ja</span></tt></a>(()&nbsp;-&gt;&nbsp;bool)</td>
<td>Alias for <a class="reference internal" href="#astropy.wcs.Wcsprm.has_pc" title="astropy.wcs.Wcsprm.has_pc"><tt class="xref py py-obj docutils literal"><span class="pre">has_pc</span></tt></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.is_unity" title="astropy.wcs.Wcsprm.is_unity"><tt class="xref py py-obj docutils literal"><span class="pre">is_unity</span></tt></a>(()&nbsp;-&gt;&nbsp;bool)</td>
<td>Returns <tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt> if the linear transformation matrix (<a class="reference internal" href="#astropy.wcs.Wcsprm.cd" title="astropy.wcs.Wcsprm.cd"><tt class="xref py py-obj docutils literal"><span class="pre">cd</span></tt></a>) is unity.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.mix" title="astropy.wcs.Wcsprm.mix"><tt class="xref py py-obj docutils literal"><span class="pre">mix</span></tt></a>(mixpix,&nbsp;mixcel,&nbsp;vspan,&nbsp;vstep,&nbsp;viter,&nbsp;...)</td>
<td>Given either the celestial longitude or latitude plus an element of the pixel coordinate, solves for the remaining elements by iterating on the unknown celestial coordinate element using <a class="reference internal" href="#astropy.wcs.Wcsprm.s2p" title="astropy.wcs.Wcsprm.s2p"><tt class="xref py py-obj docutils literal"><span class="pre">s2p</span></tt></a>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.p2s" title="astropy.wcs.Wcsprm.p2s"><tt class="xref py py-obj docutils literal"><span class="pre">p2s</span></tt></a>(pixcrd,&nbsp;origin)</td>
<td>Converts pixel to world coordinates.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.print_contents" title="astropy.wcs.Wcsprm.print_contents"><tt class="xref py py-obj docutils literal"><span class="pre">print_contents</span></tt></a>()</td>
<td>Print the contents of the <a class="reference internal" href="#astropy.wcs.Wcsprm" title="astropy.wcs.Wcsprm"><tt class="xref py py-obj docutils literal"><span class="pre">Wcsprm</span></tt></a> object to stdout.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.s2p" title="astropy.wcs.Wcsprm.s2p"><tt class="xref py py-obj docutils literal"><span class="pre">s2p</span></tt></a>(world,&nbsp;origin)</td>
<td>Transforms world coordinates to pixel coordinates.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a>()</td>
<td>Sets up a WCS object for use according to information supplied within it.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.set_ps" title="astropy.wcs.Wcsprm.set_ps"><tt class="xref py py-obj docutils literal"><span class="pre">set_ps</span></tt></a>(list)</td>
<td>Sets <tt class="xref py py-obj docutils literal"><span class="pre">PSi_ma</span></tt> keywords for each <em>i</em> and <em>m</em>.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.set_pv" title="astropy.wcs.Wcsprm.set_pv"><tt class="xref py py-obj docutils literal"><span class="pre">set_pv</span></tt></a>(list)</td>
<td>Sets <tt class="xref py py-obj docutils literal"><span class="pre">PVi_ma</span></tt> keywords for each <em>i</em> and <em>m</em>.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.spcfix" title="astropy.wcs.Wcsprm.spcfix"><tt class="xref py py-obj docutils literal"><span class="pre">spcfix</span></tt></a>(()&nbsp;-&gt;&nbsp;int)</td>
<td>Translates AIPS-convention spectral coordinate types.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.sptr" title="astropy.wcs.Wcsprm.sptr"><tt class="xref py py-obj docutils literal"><span class="pre">sptr</span></tt></a>(ctype[,&nbsp;i])</td>
<td>Translates the spectral axis in a WCS object.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.sub" title="astropy.wcs.Wcsprm.sub"><tt class="xref py py-obj docutils literal"><span class="pre">sub</span></tt></a>(axes)</td>
<td>Extracts the coordinate description for a subimage from a <tt class="xref py py-obj docutils literal"><span class="pre">WCS</span></tt> object.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.to_header" title="astropy.wcs.Wcsprm.to_header"><tt class="xref py py-obj docutils literal"><span class="pre">to_header</span></tt></a>([relax])</td>
<td><a class="reference internal" href="#astropy.wcs.Wcsprm.to_header" title="astropy.wcs.Wcsprm.to_header"><tt class="xref py py-obj docutils literal"><span class="pre">to_header</span></tt></a> translates a WCS object into a FITS header.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.Wcsprm.unitfix" title="astropy.wcs.Wcsprm.unitfix"><tt class="xref py py-obj docutils literal"><span class="pre">unitfix</span></tt></a>([translate_units])</td>
<td>Translates non-standard <tt class="docutils literal"><span class="pre">CUNITia</span></tt> keyvalues.</td>
</tr>
</tbody>
</table>
<p class="rubric">Attributes Documentation</p>
<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.alt">
<tt class="descname">alt</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.alt" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">str</span></tt> Character code for alternate coordinate descriptions.</p>
<p>For example, the <tt class="docutils literal"><span class="pre">&quot;a&quot;</span></tt> in keyword names such as <tt class="docutils literal"><span class="pre">CTYPEia</span></tt>.  This
is a space character for the primary coordinate description, or one of
the 26 upper-case letters, A-Z.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.axis_types">
<tt class="descname">axis_types</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.axis_types" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">int</span> <span class="pre">array[naxis]</span></tt> An array of four-digit type codes for each axis.</p>
<ul class="simple">
<li>First digit (i.e. 1000s):<ul>
<li>0: Non-specific coordinate type.</li>
<li>1: Stokes coordinate.</li>
<li>2: Celestial coordinate (including <tt class="docutils literal"><span class="pre">CUBEFACE</span></tt>).</li>
<li>3: Spectral coordinate.</li>
</ul>
</li>
<li>Second digit (i.e. 100s):<ul>
<li>0: Linear axis.</li>
<li>1: Quantized axis (<tt class="docutils literal"><span class="pre">STOKES</span></tt>, <tt class="docutils literal"><span class="pre">CUBEFACE</span></tt>).</li>
<li>2: Non-linear celestial axis.</li>
<li>3: Non-linear spectral axis.</li>
<li>4: Logarithmic axis.</li>
<li>5: Tabular axis.</li>
</ul>
</li>
<li>Third digit (i.e. 10s):<ul>
<li>0: Group number, e.g. lookup table number</li>
</ul>
</li>
<li>The fourth digit is used as a qualifier depending on the axis type.<ul>
<li>For celestial axes:<ul>
<li>0: Longitude coordinate.</li>
<li>1: Latitude coordinate.</li>
<li>2: <tt class="docutils literal"><span class="pre">CUBEFACE</span></tt> number.</li>
</ul>
</li>
<li>For lookup tables: the axis number in a multidimensional table.</li>
</ul>
</li>
</ul>
<p><tt class="docutils literal"><span class="pre">CTYPEia</span></tt> in <tt class="docutils literal"><span class="pre">&quot;4-3&quot;</span></tt> form with unrecognized algorithm code will
have its type set to -1 and generate an error.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.cd">
<tt class="descname">cd</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.cd" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[naxis][naxis]</span></tt> The <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> linear transformation
matrix.</p>
<p>For historical compatibility, three alternate specifications of the
linear transforations are available in wcslib.  The canonical
<tt class="docutils literal"><span class="pre">PCi_ja</span></tt> with <tt class="docutils literal"><span class="pre">CDELTia</span></tt>, <tt class="docutils literal"><span class="pre">CDi_ja</span></tt>, and the deprecated
<tt class="docutils literal"><span class="pre">CROTAia</span></tt> keywords.  Although the latter may not formally co-exist
with <tt class="docutils literal"><span class="pre">PCi_ja</span></tt>, the approach here is simply to ignore them if given
in conjunction with <tt class="docutils literal"><span class="pre">PCi_ja</span></tt>.</p>
<p><a class="reference internal" href="#astropy.wcs.Wcsprm.has_pc" title="astropy.wcs.Wcsprm.has_pc"><tt class="xref py py-obj docutils literal"><span class="pre">has_pc</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.has_cd" title="astropy.wcs.Wcsprm.has_cd"><tt class="xref py py-obj docutils literal"><span class="pre">has_cd</span></tt></a> and
<a class="reference internal" href="#astropy.wcs.Wcsprm.has_crota" title="astropy.wcs.Wcsprm.has_crota"><tt class="xref py py-obj docutils literal"><span class="pre">has_crota</span></tt></a> can be used to determine which of
these alternatives are present in the header.</p>
<p>These alternate specifications of the linear transformation matrix are
translated immediately to <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> by <a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a> and
are nowhere visible to the lower-level routines.  In particular,
<a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a> resets <a class="reference internal" href="#astropy.wcs.Wcsprm.cdelt" title="astropy.wcs.Wcsprm.cdelt"><tt class="xref py py-obj docutils literal"><span class="pre">cdelt</span></tt></a> to unity
if <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> is present (and no <tt class="docutils literal"><span class="pre">PCi_ja</span></tt>).  If no <tt class="docutils literal"><span class="pre">CROTAia</span></tt> is
associated with the latitude axis, <a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a> reverts
to a unity <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> matrix.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.cdelt">
<tt class="descname">cdelt</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.cdelt" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[naxis]</span></tt> Coordinate increments (<tt class="docutils literal"><span class="pre">CDELTia</span></tt>) for each
coord axis.</p>
<p>If a <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> linear transformation matrix is present, a warning is
raised and <a class="reference internal" href="#astropy.wcs.Wcsprm.cdelt" title="astropy.wcs.Wcsprm.cdelt"><tt class="xref py py-obj docutils literal"><span class="pre">cdelt</span></tt></a> is ignored.  The <tt class="docutils literal"><span class="pre">CDi_ja</span></tt>
matrix may be deleted by:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">del</span> <span class="n">wcs</span><span class="o">.</span><span class="n">wcs</span><span class="o">.</span><span class="n">cd</span>
</pre></div>
</div>
<p>An undefined value is represented by NaN.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.cel_offset">
<tt class="descname">cel_offset</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.cel_offset" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">boolean</span></tt> Is there an offset?</p>
<p>If <tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt>, an offset will be applied to <tt class="docutils literal"><span class="pre">(x,</span> <span class="pre">y)</span></tt> to force <tt class="docutils literal"><span class="pre">(x,</span> <span class="pre">y)</span> <span class="pre">=</span>
<span class="pre">(0,</span> <span class="pre">0)</span></tt> at the fiducial point, (phi_0, theta_0).  Default is <tt class="xref py py-obj docutils literal"><span class="pre">False</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.cname">
<tt class="descname">cname</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.cname" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">list</span> <span class="pre">of</span> <span class="pre">strings</span></tt> A list of the coordinate axis names, from
<tt class="docutils literal"><span class="pre">CNAMEia</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.colax">
<tt class="descname">colax</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.colax" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">int</span> <span class="pre">array[naxis]</span></tt> An array recording the column numbers for each
axis in a pixel list.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.colnum">
<tt class="descname">colnum</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.colnum" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">int</span></tt> Column of FITS binary table associated with this WCS.</p>
<p>Where the coordinate representation is associated with an image-array
column in a FITS binary table, this property may be used to record the
relevant column number.</p>
<p>It should be set to zero for an image header or pixel list.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.crder">
<tt class="descname">crder</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.crder" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[naxis]</span></tt> The random error in each coordinate axis,
<tt class="docutils literal"><span class="pre">CRDERia</span></tt>.</p>
<p>An undefined value is represented by NaN.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.crota">
<tt class="descname">crota</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.crota" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[naxis]</span></tt> <tt class="docutils literal"><span class="pre">CROTAia</span></tt> keyvalues for each coordinate
axis.</p>
<p>For historical compatibility, three alternate specifications of the
linear transforations are available in wcslib.  The canonical
<tt class="docutils literal"><span class="pre">PCi_ja</span></tt> with <tt class="docutils literal"><span class="pre">CDELTia</span></tt>, <tt class="docutils literal"><span class="pre">CDi_ja</span></tt>, and the deprecated
<tt class="docutils literal"><span class="pre">CROTAia</span></tt> keywords.  Although the latter may not formally co-exist
with <tt class="docutils literal"><span class="pre">PCi_ja</span></tt>, the approach here is simply to ignore them if given
in conjunction with <tt class="docutils literal"><span class="pre">PCi_ja</span></tt>.</p>
<p><a class="reference internal" href="#astropy.wcs.Wcsprm.has_pc" title="astropy.wcs.Wcsprm.has_pc"><tt class="xref py py-obj docutils literal"><span class="pre">has_pc</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.has_cd" title="astropy.wcs.Wcsprm.has_cd"><tt class="xref py py-obj docutils literal"><span class="pre">has_cd</span></tt></a> and
<a class="reference internal" href="#astropy.wcs.Wcsprm.has_crota" title="astropy.wcs.Wcsprm.has_crota"><tt class="xref py py-obj docutils literal"><span class="pre">has_crota</span></tt></a> can be used to determine which of
these alternatives are present in the header.</p>
<p>These alternate specifications of the linear transformation matrix are
translated immediately to <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> by <a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a> and
are nowhere visible to the lower-level routines.  In particular,
<a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a> resets <a class="reference internal" href="#astropy.wcs.Wcsprm.cdelt" title="astropy.wcs.Wcsprm.cdelt"><tt class="xref py py-obj docutils literal"><span class="pre">cdelt</span></tt></a> to unity
if <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> is present (and no <tt class="docutils literal"><span class="pre">PCi_ja</span></tt>).  If no <tt class="docutils literal"><span class="pre">CROTAia</span></tt> is
associated with the latitude axis, <a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a> reverts
to a unity <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> matrix.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.crpix">
<tt class="descname">crpix</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.crpix" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[naxis]</span></tt> Coordinate reference pixels (<tt class="docutils literal"><span class="pre">CRPIXja</span></tt>) for
each pixel axis.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.crval">
<tt class="descname">crval</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.crval" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[naxis]</span></tt> Coordinate reference values (<tt class="docutils literal"><span class="pre">CRVALia</span></tt>) for
each coordinate axis.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.csyer">
<tt class="descname">csyer</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.csyer" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[naxis]</span></tt> The systematic error in the coordinate value
axes, <tt class="docutils literal"><span class="pre">CSYERia</span></tt>.</p>
<p>An undefined value is represented by NaN.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.ctype">
<tt class="descname">ctype</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.ctype" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">list</span> <span class="pre">of</span> <span class="pre">strings[naxis]</span></tt> List of <tt class="docutils literal"><span class="pre">CTYPEia</span></tt> keyvalues.</p>
<p>The <a class="reference internal" href="#astropy.wcs.Wcsprm.ctype" title="astropy.wcs.Wcsprm.ctype"><tt class="xref py py-obj docutils literal"><span class="pre">ctype</span></tt></a> keyword values must be in upper case
and there must be zero or one pair of matched celestial axis types,
and zero or one spectral axis.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.cubeface">
<tt class="descname">cubeface</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.cubeface" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">int</span></tt> Index into the <tt class="docutils literal"><span class="pre">pixcrd</span></tt> (pixel coordinate) array for the
<tt class="docutils literal"><span class="pre">CUBEFACE</span></tt> axis.</p>
<p>This is used for quadcube projections where the cube faces are stored
on a separate axis.</p>
<p>The quadcube projections (<tt class="docutils literal"><span class="pre">TSC</span></tt>, <tt class="docutils literal"><span class="pre">CSC</span></tt>, <tt class="docutils literal"><span class="pre">QSC</span></tt>) may be
represented in FITS in either of two ways:</p>
<blockquote>
<div><ul>
<li><p class="first">The six faces may be laid out in one plane and numbered as
follows:</p>
<div class="highlight-python"><pre>         0

4  3  2  1  4  3  2

         5</pre>
</div>
<p>Faces 2, 3 and 4 may appear on one side or the other (or both).
The world-to-pixel routines map faces 2, 3 and 4 to the left but
the pixel-to-world routines accept them on either side.</p>
</li>
<li><p class="first">The <tt class="docutils literal"><span class="pre">COBE</span></tt> convention in which the six faces are stored in a
three-dimensional structure using a <tt class="docutils literal"><span class="pre">CUBEFACE</span></tt> axis indexed
from 0 to 5 as above.</p>
</li>
</ul>
</div></blockquote>
<p>These routines support both methods; <a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a>
determines which is being used by the presence or absence of a
<tt class="docutils literal"><span class="pre">CUBEFACE</span></tt> axis in <a class="reference internal" href="#astropy.wcs.Wcsprm.ctype" title="astropy.wcs.Wcsprm.ctype"><tt class="xref py py-obj docutils literal"><span class="pre">ctype</span></tt></a>.
<a class="reference internal" href="#astropy.wcs.Wcsprm.p2s" title="astropy.wcs.Wcsprm.p2s"><tt class="xref py py-obj docutils literal"><span class="pre">p2s</span></tt></a> and <a class="reference internal" href="#astropy.wcs.Wcsprm.s2p" title="astropy.wcs.Wcsprm.s2p"><tt class="xref py py-obj docutils literal"><span class="pre">s2p</span></tt></a> translate the
<tt class="docutils literal"><span class="pre">CUBEFACE</span></tt> axis representation to the single plane representation
understood by the lower-level projection routines.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.cunit">
<tt class="descname">cunit</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.cunit" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">list</span> <span class="pre">of</span> <span class="pre">astropy.UnitBase[naxis]</span></tt> List of <tt class="docutils literal"><span class="pre">CUNITia</span></tt> keyvalues as
<tt class="xref py py-obj docutils literal"><span class="pre">astropy.units.UnitBase</span></tt> instances.</p>
<p>These define the units of measurement of the <tt class="docutils literal"><span class="pre">CRVALia</span></tt>, <tt class="docutils literal"><span class="pre">CDELTia</span></tt>
and <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> keywords.</p>
<p>As <tt class="docutils literal"><span class="pre">CUNITia</span></tt> is an optional header keyword,
<a class="reference internal" href="#astropy.wcs.Wcsprm.cunit" title="astropy.wcs.Wcsprm.cunit"><tt class="xref py py-obj docutils literal"><span class="pre">cunit</span></tt></a> may be left blank but otherwise is
expected to contain a standard units specification as defined by WCS
Paper I.  <a class="reference internal" href="#astropy.wcs.Wcsprm.unitfix" title="astropy.wcs.Wcsprm.unitfix"><tt class="xref py py-obj docutils literal"><span class="pre">unitfix</span></tt></a> is available to translate
commonly used non-standard units specifications but this must be done
as a separate step before invoking <a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a>.</p>
<p>For celestial axes, if <a class="reference internal" href="#astropy.wcs.Wcsprm.cunit" title="astropy.wcs.Wcsprm.cunit"><tt class="xref py py-obj docutils literal"><span class="pre">cunit</span></tt></a> is not blank,
<a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a> uses <tt class="xref py py-obj docutils literal"><span class="pre">wcsunits</span></tt> to parse it and scale
<a class="reference internal" href="#astropy.wcs.Wcsprm.cdelt" title="astropy.wcs.Wcsprm.cdelt"><tt class="xref py py-obj docutils literal"><span class="pre">cdelt</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.crval" title="astropy.wcs.Wcsprm.crval"><tt class="xref py py-obj docutils literal"><span class="pre">crval</span></tt></a>, and
<a class="reference internal" href="#astropy.wcs.Wcsprm.cd" title="astropy.wcs.Wcsprm.cd"><tt class="xref py py-obj docutils literal"><span class="pre">cd</span></tt></a> to decimal degrees.  It then resets
<a class="reference internal" href="#astropy.wcs.Wcsprm.cunit" title="astropy.wcs.Wcsprm.cunit"><tt class="xref py py-obj docutils literal"><span class="pre">cunit</span></tt></a> to <tt class="docutils literal"><span class="pre">&quot;deg&quot;</span></tt>.</p>
<p>For spectral axes, if <a class="reference internal" href="#astropy.wcs.Wcsprm.cunit" title="astropy.wcs.Wcsprm.cunit"><tt class="xref py py-obj docutils literal"><span class="pre">cunit</span></tt></a> is not blank,
<a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a> uses <tt class="xref py py-obj docutils literal"><span class="pre">wcsunits</span></tt> to parse it and scale
<a class="reference internal" href="#astropy.wcs.Wcsprm.cdelt" title="astropy.wcs.Wcsprm.cdelt"><tt class="xref py py-obj docutils literal"><span class="pre">cdelt</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.crval" title="astropy.wcs.Wcsprm.crval"><tt class="xref py py-obj docutils literal"><span class="pre">crval</span></tt></a>, and
<a class="reference internal" href="#astropy.wcs.Wcsprm.cd" title="astropy.wcs.Wcsprm.cd"><tt class="xref py py-obj docutils literal"><span class="pre">cd</span></tt></a> to SI units.  It then resets
<a class="reference internal" href="#astropy.wcs.Wcsprm.cunit" title="astropy.wcs.Wcsprm.cunit"><tt class="xref py py-obj docutils literal"><span class="pre">cunit</span></tt></a> accordingly.</p>
<p><a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a> ignores <a class="reference internal" href="#astropy.wcs.Wcsprm.cunit" title="astropy.wcs.Wcsprm.cunit"><tt class="xref py py-obj docutils literal"><span class="pre">cunit</span></tt></a> for
other coordinate types; <a class="reference internal" href="#astropy.wcs.Wcsprm.cunit" title="astropy.wcs.Wcsprm.cunit"><tt class="xref py py-obj docutils literal"><span class="pre">cunit</span></tt></a> may be used to
label coordinate values.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.dateavg">
<tt class="descname">dateavg</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.dateavg" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">string</span></tt> Representative mid-point of the date of observation.</p>
<p>In ISO format, <tt class="docutils literal"><span class="pre">yyyy-mm-ddThh:mm:ss</span></tt>.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#astropy.wcs.Wcsprm.dateobs" title="astropy.wcs.Wcsprm.dateobs"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.dateobs</span></tt></a></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.dateobs">
<tt class="descname">dateobs</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.dateobs" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">string</span></tt> Start of the date of observation.</p>
<p>In ISO format, <tt class="docutils literal"><span class="pre">yyyy-mm-ddThh:mm:ss</span></tt>.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#astropy.wcs.Wcsprm.dateavg" title="astropy.wcs.Wcsprm.dateavg"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.dateavg</span></tt></a></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.equinox">
<tt class="descname">equinox</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.equinox" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span></tt> The equinox associated with dynamical equatorial or
ecliptic coordinate systems.</p>
<p><tt class="docutils literal"><span class="pre">EQUINOXa</span></tt> (or <tt class="docutils literal"><span class="pre">EPOCH</span></tt> in older headers).  Not applicable to ICRS
equatorial or ecliptic coordinates.</p>
<p>An undefined value is represented by NaN.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.imgpix_matrix">
<tt class="descname">imgpix_matrix</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.imgpix_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[2][2]</span></tt> (read-only) Inverse of the <tt class="docutils literal"><span class="pre">CDELT</span></tt> or <tt class="docutils literal"><span class="pre">PC</span></tt>
matrix.</p>
<p>Inverse containing the product of the <tt class="docutils literal"><span class="pre">CDELTia</span></tt> diagonal matrix and
the <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> matrix.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.lat">
<tt class="descname">lat</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.lat" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">int</span></tt> (read-only) The index into the world coord array containing
latitude values.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.latpole">
<tt class="descname">latpole</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.latpole" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span></tt> The native latitude of the celestial pole, <tt class="docutils literal"><span class="pre">LATPOLEa</span></tt> (deg).</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.lattyp">
<tt class="descname">lattyp</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.lattyp" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">string</span></tt> (read-only) Celestial axis type for latitude.</p>
<p>For example, &#8220;RA&#8221;, &#8220;DEC&#8221;, &#8220;GLON&#8221;, &#8220;GLAT&#8221;, etc. extracted from &#8220;RA&#8211;&#8221;,
&#8220;DEC-&#8221;, &#8220;GLON&#8221;, &#8220;GLAT&#8221;, etc. in the first four characters of
<tt class="docutils literal"><span class="pre">CTYPEia</span></tt> but with trailing dashes removed.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.lng">
<tt class="descname">lng</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.lng" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">int</span></tt> (read-only) The index into the world coord array containing
longitude values.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.lngtyp">
<tt class="descname">lngtyp</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.lngtyp" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">string</span></tt> (read-only) Celestial axis type for longitude.</p>
<p>For example, &#8220;RA&#8221;, &#8220;DEC&#8221;, &#8220;GLON&#8221;, &#8220;GLAT&#8221;, etc. extracted from &#8220;RA&#8211;&#8221;,
&#8220;DEC-&#8221;, &#8220;GLON&#8221;, &#8220;GLAT&#8221;, etc. in the first four characters of
<tt class="docutils literal"><span class="pre">CTYPEia</span></tt> but with trailing dashes removed.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.lonpole">
<tt class="descname">lonpole</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.lonpole" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span></tt> The native longitude of the celestial pole.</p>
<p><tt class="docutils literal"><span class="pre">LONPOLEa</span></tt> (deg).</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.mjdavg">
<tt class="descname">mjdavg</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.mjdavg" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span></tt> Modified Julian Date corresponding to <tt class="docutils literal"><span class="pre">DATE-AVG</span></tt>.</p>
<p><tt class="docutils literal"><span class="pre">(MJD</span> <span class="pre">=</span> <span class="pre">JD</span> <span class="pre">-</span> <span class="pre">2400000.5)</span></tt>.</p>
<p>An undefined value is represented by NaN.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#astropy.wcs.Wcsprm.mjdobs" title="astropy.wcs.Wcsprm.mjdobs"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.mjdobs</span></tt></a></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.mjdobs">
<tt class="descname">mjdobs</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.mjdobs" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span></tt> Modified Julian Date corresponding to <tt class="docutils literal"><span class="pre">DATE-OBS</span></tt>.</p>
<p><tt class="docutils literal"><span class="pre">(MJD</span> <span class="pre">=</span> <span class="pre">JD</span> <span class="pre">-</span> <span class="pre">2400000.5)</span></tt>.</p>
<p>An undefined value is represented by NaN.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#astropy.wcs.Wcsprm.mjdavg" title="astropy.wcs.Wcsprm.mjdavg"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.mjdavg</span></tt></a></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.name">
<tt class="descname">name</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.name" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">string</span></tt> The name given to the coordinate representation
<tt class="docutils literal"><span class="pre">WCSNAMEa</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.naxis">
<tt class="descname">naxis</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.naxis" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">int</span></tt> (read-only) The number of axes (pixel and coordinate).</p>
<p>Given by the <tt class="docutils literal"><span class="pre">NAXIS</span></tt> or <tt class="docutils literal"><span class="pre">WCSAXESa</span></tt> keyvalues.</p>
<p>The number of coordinate axes is determined at parsing time, and can
not be subsequently changed.</p>
<p>It is determined from the highest of the following:</p>
<blockquote>
<div><ol class="arabic simple">
<li><tt class="docutils literal"><span class="pre">NAXIS</span></tt></li>
<li><tt class="docutils literal"><span class="pre">WCSAXESa</span></tt></li>
<li>The highest axis number in any parameterized WCS keyword.  The
keyvalue, as well as the keyword, must be syntactically valid
otherwise it will not be considered.</li>
</ol>
</div></blockquote>
<p>If none of these keyword types is present, i.e. if the header only
contains auxiliary WCS keywords for a particular coordinate
representation, then no coordinate description is constructed for it.</p>
<p>This value may differ for different coordinate representations of the
same image.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.obsgeo">
<tt class="descname">obsgeo</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.obsgeo" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[3]</span></tt> Location of the observer in a standard terrestrial
reference frame.</p>
<p><tt class="docutils literal"><span class="pre">OBSGEO-X</span></tt>, <tt class="docutils literal"><span class="pre">OBSGEO-Y</span></tt>, <tt class="docutils literal"><span class="pre">OBSGEO-Z</span></tt> (in meters).</p>
<p>An undefined value is represented by NaN.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.pc">
<tt class="descname">pc</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.pc" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[naxis][naxis]</span></tt> The <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> (pixel coordinate)
transformation matrix.</p>
<p>The order is:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="p">[[</span><span class="n">PC1_1</span><span class="p">,</span> <span class="n">PC1_2</span><span class="p">],</span>
 <span class="p">[</span><span class="n">PC2_1</span><span class="p">,</span> <span class="n">PC2_2</span><span class="p">]]</span>
</pre></div>
</div>
<p>For historical compatibility, three alternate specifications of the
linear transforations are available in wcslib.  The canonical
<tt class="docutils literal"><span class="pre">PCi_ja</span></tt> with <tt class="docutils literal"><span class="pre">CDELTia</span></tt>, <tt class="docutils literal"><span class="pre">CDi_ja</span></tt>, and the deprecated
<tt class="docutils literal"><span class="pre">CROTAia</span></tt> keywords.  Although the latter may not formally co-exist
with <tt class="docutils literal"><span class="pre">PCi_ja</span></tt>, the approach here is simply to ignore them if given
in conjunction with <tt class="docutils literal"><span class="pre">PCi_ja</span></tt>.</p>
<p><a class="reference internal" href="#astropy.wcs.Wcsprm.has_pc" title="astropy.wcs.Wcsprm.has_pc"><tt class="xref py py-obj docutils literal"><span class="pre">has_pc</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.has_cd" title="astropy.wcs.Wcsprm.has_cd"><tt class="xref py py-obj docutils literal"><span class="pre">has_cd</span></tt></a> and
<a class="reference internal" href="#astropy.wcs.Wcsprm.has_crota" title="astropy.wcs.Wcsprm.has_crota"><tt class="xref py py-obj docutils literal"><span class="pre">has_crota</span></tt></a> can be used to determine which of
these alternatives are present in the header.</p>
<p>These alternate specifications of the linear transformation matrix are
translated immediately to <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> by <a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a> and
are nowhere visible to the lower-level routines.  In particular,
<a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a> resets <a class="reference internal" href="#astropy.wcs.Wcsprm.cdelt" title="astropy.wcs.Wcsprm.cdelt"><tt class="xref py py-obj docutils literal"><span class="pre">cdelt</span></tt></a> to unity
if <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> is present (and no <tt class="docutils literal"><span class="pre">PCi_ja</span></tt>).  If no <tt class="docutils literal"><span class="pre">CROTAia</span></tt> is
associated with the latitude axis, <a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a> reverts
to a unity <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> matrix.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.phi0">
<tt class="descname">phi0</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.phi0" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span></tt> The native latitude of the fiducial point.</p>
<p>The point whose celestial coordinates are given in <tt class="docutils literal"><span class="pre">ref[1:2]</span></tt>.  If
undefined (NaN) the initialization routine, <a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a>,
will set this to a projection-specific default.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#astropy.wcs.Wcsprm.theta0" title="astropy.wcs.Wcsprm.theta0"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.theta0</span></tt></a></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.piximg_matrix">
<tt class="descname">piximg_matrix</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.piximg_matrix" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span> <span class="pre">array[2][2]</span></tt> (read-only) Matrix containing the product of
the <tt class="docutils literal"><span class="pre">CDELTia</span></tt> diagonal matrix and the <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> matrix.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.radesys">
<tt class="descname">radesys</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.radesys" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">string</span></tt> The equatorial or ecliptic coordinate system type,
<tt class="docutils literal"><span class="pre">RADESYSa</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.restfrq">
<tt class="descname">restfrq</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.restfrq" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span></tt> Rest frequency (Hz) from <tt class="docutils literal"><span class="pre">RESTFRQa</span></tt>.</p>
<p>An undefined value is represented by NaN.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.restwav">
<tt class="descname">restwav</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.restwav" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span></tt> Rest wavelength (m) from <tt class="docutils literal"><span class="pre">RESTWAVa</span></tt>.</p>
<p>An undefined value is represented by NaN.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.spec">
<tt class="descname">spec</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.spec" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">int</span></tt> (read-only) The index containing the spectral axis values.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.specsys">
<tt class="descname">specsys</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.specsys" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">string</span></tt> Spectral reference frame (standard of rest), <tt class="docutils literal"><span class="pre">SPECSYSa</span></tt>.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#astropy.wcs.Wcsprm.ssysobs" title="astropy.wcs.Wcsprm.ssysobs"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.ssysobs</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.velosys" title="astropy.wcs.Wcsprm.velosys"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.velosys</span></tt></a></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.ssysobs">
<tt class="descname">ssysobs</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.ssysobs" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">string</span></tt> Spectral reference frame.</p>
<p>The spectral reference frame in which there is no differential
variation in the spectral coordinate across the field-of-view,
<tt class="docutils literal"><span class="pre">SSYSOBSa</span></tt>.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#astropy.wcs.Wcsprm.specsys" title="astropy.wcs.Wcsprm.specsys"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.specsys</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.velosys" title="astropy.wcs.Wcsprm.velosys"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.velosys</span></tt></a></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.ssyssrc">
<tt class="descname">ssyssrc</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.ssyssrc" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">string</span></tt> Spectral reference frame for redshift.</p>
<p>The spectral reference frame (standard of rest) in which the redshift
was measured, <tt class="docutils literal"><span class="pre">SSYSSRCa</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.tab">
<tt class="descname">tab</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.tab" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">list</span> <span class="pre">of</span> <span class="pre">Tabprm</span></tt> Tabular coordinate objects.</p>
<p>A list of tabular coordinate objects associated with this WCS.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.theta0">
<tt class="descname">theta0</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.theta0" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span></tt>  The native longitude of the fiducial point.</p>
<p>The point whose celestial coordinates are given in <tt class="docutils literal"><span class="pre">ref[1:2]</span></tt>.  If
undefined (NaN) the initialization routine, <a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a>,
will set this to a projection-specific default.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#astropy.wcs.Wcsprm.phi0" title="astropy.wcs.Wcsprm.phi0"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.phi0</span></tt></a></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.velangl">
<tt class="descname">velangl</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.velangl" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span></tt> Velocity angle.</p>
<p>The angle in degrees that should be used to decompose an observed
velocity into radial and transverse components.</p>
<p>An undefined value is represented by NaN.</p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.velosys">
<tt class="descname">velosys</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.velosys" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span></tt> Relative radial velocity.</p>
<p>The relative radial velocity (m/s) between the observer and the
selected standard of rest in the direction of the celestial reference
coordinate, <tt class="docutils literal"><span class="pre">VELOSYSa</span></tt>.</p>
<p>An undefined value is represented by NaN.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#astropy.wcs.Wcsprm.specsys" title="astropy.wcs.Wcsprm.specsys"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.specsys</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.ssysobs" title="astropy.wcs.Wcsprm.ssysobs"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.ssysobs</span></tt></a></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.Wcsprm.zsource">
<tt class="descname">zsource</tt><a class="headerlink" href="#astropy.wcs.Wcsprm.zsource" title="Permalink to this definition">¶</a></dt>
<dd><p><tt class="docutils literal"><span class="pre">double</span></tt> The redshift, <tt class="docutils literal"><span class="pre">ZSOURCEa</span></tt>, of the source.</p>
<p>An undefined value is represented by NaN.</p>
</dd></dl>

<p class="rubric">Methods Documentation</p>
<dl class="method">
<dt id="astropy.wcs.Wcsprm.cdfix">
<tt class="descname">cdfix</tt><big>(</big><big>)</big><a class="headerlink" href="#astropy.wcs.Wcsprm.cdfix" title="Permalink to this definition">¶</a></dt>
<dd><p>Fix erroneously omitted <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> keywords.</p>
<p>Sets the diagonal element of the <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> matrix to unity if all
<tt class="docutils literal"><span class="pre">CDi_ja</span></tt> keywords associated with a given axis were omitted.
According to Paper I, if any <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> keywords at all are given in a
FITS header then those not given default to zero.  This results in a
singular matrix with an intersecting row and column of zeros.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>success</strong> : int</p>
<blockquote class="last">
<div><p>Returns <tt class="docutils literal"><span class="pre">0</span></tt> for success; <tt class="docutils literal"><span class="pre">-1</span></tt> if no change required.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.celfix">
<tt class="descname">celfix</tt><big>(</big><big>)</big><a class="headerlink" href="#astropy.wcs.Wcsprm.celfix" title="Permalink to this definition">¶</a></dt>
<dd><p>Translates AIPS-convention celestial projection types, <tt class="docutils literal"><span class="pre">-NCP</span></tt> and
<tt class="docutils literal"><span class="pre">-GLS</span></tt>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>success</strong> : int</p>
<blockquote class="last">
<div><p>Returns <tt class="docutils literal"><span class="pre">0</span></tt> for success; <tt class="docutils literal"><span class="pre">-1</span></tt> if no change required.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.cylfix">
<tt class="descname">cylfix</tt><big>(</big><big>)</big><a class="headerlink" href="#astropy.wcs.Wcsprm.cylfix" title="Permalink to this definition">¶</a></dt>
<dd><p>Fixes WCS keyvalues for malformed cylindrical projections.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>success</strong> : int</p>
<blockquote class="last">
<div><p>Returns <tt class="docutils literal"><span class="pre">0</span></tt> for success; <tt class="docutils literal"><span class="pre">-1</span></tt> if no change required.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.datfix">
<tt class="descname">datfix</tt><big>(</big><big>)</big><a class="headerlink" href="#astropy.wcs.Wcsprm.datfix" title="Permalink to this definition">¶</a></dt>
<dd><p>Translates the old <tt class="docutils literal"><span class="pre">DATE-OBS</span></tt> date format to year-2000 standard form
<tt class="docutils literal"><span class="pre">(yyyy-mm-ddThh:mm:ss)</span></tt> and derives <tt class="docutils literal"><span class="pre">MJD-OBS</span></tt> from it if not
already set.</p>
<p>Alternatively, if <a class="reference internal" href="#astropy.wcs.Wcsprm.mjdobs" title="astropy.wcs.Wcsprm.mjdobs"><tt class="xref py py-obj docutils literal"><span class="pre">mjdobs</span></tt></a> is set and
<a class="reference internal" href="#astropy.wcs.Wcsprm.dateobs" title="astropy.wcs.Wcsprm.dateobs"><tt class="xref py py-obj docutils literal"><span class="pre">dateobs</span></tt></a> isn&#8217;t, then <a class="reference internal" href="#astropy.wcs.Wcsprm.datfix" title="astropy.wcs.Wcsprm.datfix"><tt class="xref py py-obj docutils literal"><span class="pre">datfix</span></tt></a>
derives <a class="reference internal" href="#astropy.wcs.Wcsprm.dateobs" title="astropy.wcs.Wcsprm.dateobs"><tt class="xref py py-obj docutils literal"><span class="pre">dateobs</span></tt></a> from it.  If both are set but
disagree by more than half a day then <tt class="xref py py-obj docutils literal"><span class="pre">ValueError</span></tt> is raised.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>success</strong> : int</p>
<blockquote class="last">
<div><p>Returns <tt class="docutils literal"><span class="pre">0</span></tt> for success; <tt class="docutils literal"><span class="pre">-1</span></tt> if no change required.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.fix">
<tt class="descname">fix</tt><big>(</big><em>translate_units=''</em>, <em>naxis=0</em><big>)</big><a class="headerlink" href="#astropy.wcs.Wcsprm.fix" title="Permalink to this definition">¶</a></dt>
<dd><p>Applies all of the corrections handled separately by
<a class="reference internal" href="#astropy.wcs.Wcsprm.datfix" title="astropy.wcs.Wcsprm.datfix"><tt class="xref py py-obj docutils literal"><span class="pre">datfix</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.unitfix" title="astropy.wcs.Wcsprm.unitfix"><tt class="xref py py-obj docutils literal"><span class="pre">unitfix</span></tt></a>,
<a class="reference internal" href="#astropy.wcs.Wcsprm.celfix" title="astropy.wcs.Wcsprm.celfix"><tt class="xref py py-obj docutils literal"><span class="pre">celfix</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.spcfix" title="astropy.wcs.Wcsprm.spcfix"><tt class="xref py py-obj docutils literal"><span class="pre">spcfix</span></tt></a>,
<a class="reference internal" href="#astropy.wcs.Wcsprm.cylfix" title="astropy.wcs.Wcsprm.cylfix"><tt class="xref py py-obj docutils literal"><span class="pre">cylfix</span></tt></a> and <a class="reference internal" href="#astropy.wcs.Wcsprm.cdfix" title="astropy.wcs.Wcsprm.cdfix"><tt class="xref py py-obj docutils literal"><span class="pre">cdfix</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters :</th><td class="field-body"><p class="first"><strong>translate_units</strong> : str</p>
<blockquote>
<div><p>Do potentially unsafe translations of non-standard unit strings.</p>
<p>Although <tt class="docutils literal"><span class="pre">&quot;S&quot;</span></tt> is commonly used to represent seconds, its
translation to <tt class="docutils literal"><span class="pre">&quot;s&quot;</span></tt> is potentially unsafe since the standard
recognizes <tt class="docutils literal"><span class="pre">&quot;S&quot;</span></tt> formally as Siemens, however rarely that may be
used.  The same applies to <tt class="docutils literal"><span class="pre">&quot;H&quot;</span></tt> for hours (Henry), and <tt class="docutils literal"><span class="pre">&quot;D&quot;</span></tt>
for days (Debye).</p>
<p>This string controls what to do in such cases, and is
case-insensitive.</p>
<ul class="simple">
<li>If the string contains <tt class="docutils literal"><span class="pre">&quot;s&quot;</span></tt>, translate <tt class="docutils literal"><span class="pre">&quot;S&quot;</span></tt> to <tt class="docutils literal"><span class="pre">&quot;s&quot;</span></tt>.</li>
<li>If the string contains <tt class="docutils literal"><span class="pre">&quot;h&quot;</span></tt>, translate <tt class="docutils literal"><span class="pre">&quot;H&quot;</span></tt> to <tt class="docutils literal"><span class="pre">&quot;h&quot;</span></tt>.</li>
<li>If the string contains <tt class="docutils literal"><span class="pre">&quot;d&quot;</span></tt>, translate <tt class="docutils literal"><span class="pre">&quot;D&quot;</span></tt> to <tt class="docutils literal"><span class="pre">&quot;d&quot;</span></tt>.</li>
</ul>
<p>Thus <tt class="docutils literal"><span class="pre">''</span></tt> doesn&#8217;t do any unsafe translations, whereas <tt class="docutils literal"><span class="pre">'shd'</span></tt>
does all of them.</p>
</div></blockquote>
<p><strong>naxis</strong> : int array[naxis]</p>
<blockquote>
<div><p>Image axis lengths.  If this array is set to zero or <tt class="docutils literal"><span class="pre">None</span></tt>,
then <a class="reference internal" href="#astropy.wcs.Wcsprm.cylfix" title="astropy.wcs.Wcsprm.cylfix"><tt class="xref py py-obj docutils literal"><span class="pre">cylfix</span></tt></a> will not be invoked.</p>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>status</strong> : dict</p>
<blockquote class="last">
<div><p>Returns a dictionary containing the following keys, each referring
to a status string for each of the sub-fix functions that were
called:</p>
<ul class="simple">
<li><a class="reference internal" href="#astropy.wcs.Wcsprm.cdfix" title="astropy.wcs.Wcsprm.cdfix"><tt class="xref py py-obj docutils literal"><span class="pre">cdfix</span></tt></a></li>
<li><a class="reference internal" href="#astropy.wcs.Wcsprm.datfix" title="astropy.wcs.Wcsprm.datfix"><tt class="xref py py-obj docutils literal"><span class="pre">datfix</span></tt></a></li>
<li><a class="reference internal" href="#astropy.wcs.Wcsprm.unitfix" title="astropy.wcs.Wcsprm.unitfix"><tt class="xref py py-obj docutils literal"><span class="pre">unitfix</span></tt></a></li>
<li><a class="reference internal" href="#astropy.wcs.Wcsprm.celfix" title="astropy.wcs.Wcsprm.celfix"><tt class="xref py py-obj docutils literal"><span class="pre">celfix</span></tt></a></li>
<li><a class="reference internal" href="#astropy.wcs.Wcsprm.spcfix" title="astropy.wcs.Wcsprm.spcfix"><tt class="xref py py-obj docutils literal"><span class="pre">spcfix</span></tt></a></li>
<li><a class="reference internal" href="#astropy.wcs.Wcsprm.cylfix" title="astropy.wcs.Wcsprm.cylfix"><tt class="xref py py-obj docutils literal"><span class="pre">cylfix</span></tt></a></li>
</ul>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.get_cdelt">
<tt class="descname">get_cdelt</tt><big>(</big><big>)</big> &rarr; double array[naxis]<a class="headerlink" href="#astropy.wcs.Wcsprm.get_cdelt" title="Permalink to this definition">¶</a></dt>
<dd><p>Coordinate increments (<tt class="docutils literal"><span class="pre">CDELTia</span></tt>) for each coord axis.</p>
<p>Returns the <tt class="docutils literal"><span class="pre">CDELT</span></tt> offsets in read-only form.  Unlike the
<a class="reference internal" href="#astropy.wcs.Wcsprm.cdelt" title="astropy.wcs.Wcsprm.cdelt"><tt class="xref py py-obj docutils literal"><span class="pre">cdelt</span></tt></a> property, this works even when the header
specifies the linear transformation matrix in one of the alternative
<tt class="docutils literal"><span class="pre">CDi_ja</span></tt> or <tt class="docutils literal"><span class="pre">CROTAia</span></tt> forms.  This is useful when you want access
to the linear transformation matrix, but don&#8217;t care how it was
specified in the header.</p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.get_pc">
<tt class="descname">get_pc</tt><big>(</big><big>)</big> &rarr; double array[naxis][naxis]<a class="headerlink" href="#astropy.wcs.Wcsprm.get_pc" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the <tt class="docutils literal"><span class="pre">PC</span></tt> matrix in read-only form.  Unlike the
<a class="reference internal" href="#astropy.wcs.Wcsprm.pc" title="astropy.wcs.Wcsprm.pc"><tt class="xref py py-obj docutils literal"><span class="pre">pc</span></tt></a> property, this works even when the header
specifies the linear transformation matrix in one of the alternative
<tt class="docutils literal"><span class="pre">CDi_ja</span></tt> or <tt class="docutils literal"><span class="pre">CROTAia</span></tt> forms.  This is useful when you want access
to the linear transformation matrix, but don&#8217;t care how it was
specified in the header.</p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.get_ps">
<tt class="descname">get_ps</tt><big>(</big><big>)</big> &rarr; list of tuples<a class="headerlink" href="#astropy.wcs.Wcsprm.get_ps" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <tt class="docutils literal"><span class="pre">PSi_ma</span></tt> keywords for each <em>i</em> and <em>m</em>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>ps</strong> : list of tuples</p>
<blockquote class="last">
<div><p>Returned as a list of tuples of the form (<em>i</em>, <em>m</em>, <em>value</em>):</p>
<ul class="simple">
<li><em>i</em>: int.  Axis number, as in <tt class="docutils literal"><span class="pre">PSi_ma</span></tt>, (i.e. 1-relative)</li>
<li><em>m</em>: int.  Parameter number, as in <tt class="docutils literal"><span class="pre">PSi_ma</span></tt>, (i.e. 0-relative)</li>
<li><em>value</em>: string.  Parameter value.</li>
</ul>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="#astropy.wcs.Wcsprm.set_ps" title="astropy.wcs.Wcsprm.set_ps"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.set_ps</span></tt></a></dt>
<dd>Set <tt class="docutils literal"><span class="pre">PSi_ma</span></tt> values</dd>
</dl>
</div>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.get_pv">
<tt class="descname">get_pv</tt><big>(</big><big>)</big> &rarr; list of tuples<a class="headerlink" href="#astropy.wcs.Wcsprm.get_pv" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <tt class="docutils literal"><span class="pre">PVi_ma</span></tt> keywords for each <em>i</em> and <em>m</em>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>Returned as a list of tuples of the form (*i*, *m*, *value*):</strong> :</p>
<blockquote class="last">
<div><ul class="simple">
<li><em>i</em>: int.  Axis number, as in <tt class="docutils literal"><span class="pre">PVi_ma</span></tt>, (i.e. 1-relative)</li>
<li><em>m</em>: int.  Parameter number, as in <tt class="docutils literal"><span class="pre">PVi_ma</span></tt>, (i.e. 0-relative)</li>
<li><em>value</em>: string. Parameter value.</li>
</ul>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="#astropy.wcs.Wcsprm.set_pv" title="astropy.wcs.Wcsprm.set_pv"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.set_pv</span></tt></a></dt>
<dd>Set <tt class="docutils literal"><span class="pre">PVi_ma</span></tt> values</dd>
</dl>
</div>
<p class="rubric">Notes</p>
<p>Note that, if they were not given, <a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a> resets
the entries for <tt class="docutils literal"><span class="pre">PVi_1a</span></tt>, <tt class="docutils literal"><span class="pre">PVi_2a</span></tt>, <tt class="docutils literal"><span class="pre">PVi_3a</span></tt>, and <tt class="docutils literal"><span class="pre">PVi_4a</span></tt> for
longitude axis <em>i</em> to match (<tt class="docutils literal"><span class="pre">phi_0</span></tt>, <tt class="docutils literal"><span class="pre">theta_0</span></tt>), the native
longitude and latitude of the reference point given by <tt class="docutils literal"><span class="pre">LONPOLEa</span></tt>
and <tt class="docutils literal"><span class="pre">LATPOLEa</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.has_cd">
<tt class="descname">has_cd</tt><big>(</big><big>)</big> &rarr; bool<a class="headerlink" href="#astropy.wcs.Wcsprm.has_cd" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt> if <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> is present.</p>
<p><tt class="docutils literal"><span class="pre">CDi_ja</span></tt> is an alternate specification of the linear transformation
matrix, maintained for historical compatibility.</p>
<p>Matrix elements in the IRAF convention are equivalent to the product
<tt class="docutils literal"><span class="pre">CDi_ja</span> <span class="pre">=</span> <span class="pre">CDELTia</span> <span class="pre">*</span> <span class="pre">PCi_ja</span></tt>, but the defaults differ from that of
the <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> matrix.  If one or more <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> keywords are present
then all unspecified <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> default to zero.  If no <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> (or
<tt class="docutils literal"><span class="pre">CROTAia</span></tt>) keywords are present, then the header is assumed to be in
<tt class="docutils literal"><span class="pre">PCi_ja</span></tt> form whether or not any <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> keywords are present
since this results in an interpretation of <tt class="docutils literal"><span class="pre">CDELTia</span></tt> consistent with
the original FITS specification.</p>
<p>While <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> may not formally co-exist with <tt class="docutils literal"><span class="pre">PCi_ja</span></tt>, it may
co-exist with <tt class="docutils literal"><span class="pre">CDELTia</span></tt> and <tt class="docutils literal"><span class="pre">CROTAia</span></tt> which are to be ignored.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="#astropy.wcs.Wcsprm.cd" title="astropy.wcs.Wcsprm.cd"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.cd</span></tt></a></dt>
<dd>Get the raw <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> values.</dd>
</dl>
</div>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.has_cdi_ja">
<tt class="descname">has_cdi_ja</tt><big>(</big><big>)</big> &rarr; bool<a class="headerlink" href="#astropy.wcs.Wcsprm.has_cdi_ja" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for <a class="reference internal" href="#astropy.wcs.Wcsprm.has_cd" title="astropy.wcs.Wcsprm.has_cd"><tt class="xref py py-obj docutils literal"><span class="pre">has_cd</span></tt></a>.  Maintained for backward
compatibility.</p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.has_crota">
<tt class="descname">has_crota</tt><big>(</big><big>)</big> &rarr; bool<a class="headerlink" href="#astropy.wcs.Wcsprm.has_crota" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt> if <tt class="docutils literal"><span class="pre">CROTAia</span></tt> is present.</p>
<p><tt class="docutils literal"><span class="pre">CROTAia</span></tt> is an alternate specification of the linear transformation
matrix, maintained for historical compatibility.</p>
<p>In the AIPS convention, <tt class="docutils literal"><span class="pre">CROTAia</span></tt> may only be associated with the
latitude axis of a celestial axis pair.  It specifies a rotation in
the image plane that is applied <em>after</em> the <tt class="docutils literal"><span class="pre">CDELTia</span></tt>; any other
<tt class="docutils literal"><span class="pre">CROTAia</span></tt> keywords are ignored.</p>
<p><tt class="docutils literal"><span class="pre">CROTAia</span></tt> may not formally co-exist with <tt class="docutils literal"><span class="pre">PCi_ja</span></tt>.  <tt class="docutils literal"><span class="pre">CROTAia</span></tt> and
<tt class="docutils literal"><span class="pre">CDELTia</span></tt> may formally co-exist with <tt class="docutils literal"><span class="pre">CDi_ja</span></tt> but if so are to be
ignored.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="#astropy.wcs.Wcsprm.crota" title="astropy.wcs.Wcsprm.crota"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.crota</span></tt></a></dt>
<dd>Get the raw <tt class="docutils literal"><span class="pre">CROTAia</span></tt> values</dd>
</dl>
</div>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.has_crotaia">
<tt class="descname">has_crotaia</tt><big>(</big><big>)</big> &rarr; bool<a class="headerlink" href="#astropy.wcs.Wcsprm.has_crotaia" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for <a class="reference internal" href="#astropy.wcs.Wcsprm.has_crota" title="astropy.wcs.Wcsprm.has_crota"><tt class="xref py py-obj docutils literal"><span class="pre">has_crota</span></tt></a>.  Maintained for backward
compatibility.</p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.has_pc">
<tt class="descname">has_pc</tt><big>(</big><big>)</big> &rarr; bool<a class="headerlink" href="#astropy.wcs.Wcsprm.has_pc" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt> if <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> is present.  <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> is the
recommended way to specify the linear transformation matrix.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="#astropy.wcs.Wcsprm.pc" title="astropy.wcs.Wcsprm.pc"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.pc</span></tt></a></dt>
<dd>Get the raw <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> values</dd>
</dl>
</div>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.has_pci_ja">
<tt class="descname">has_pci_ja</tt><big>(</big><big>)</big> &rarr; bool<a class="headerlink" href="#astropy.wcs.Wcsprm.has_pci_ja" title="Permalink to this definition">¶</a></dt>
<dd><p>Alias for <a class="reference internal" href="#astropy.wcs.Wcsprm.has_pc" title="astropy.wcs.Wcsprm.has_pc"><tt class="xref py py-obj docutils literal"><span class="pre">has_pc</span></tt></a>.  Maintained for backward
compatibility.</p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.is_unity">
<tt class="descname">is_unity</tt><big>(</big><big>)</big> &rarr; bool<a class="headerlink" href="#astropy.wcs.Wcsprm.is_unity" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns <tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt> if the linear transformation matrix
(<a class="reference internal" href="#astropy.wcs.Wcsprm.cd" title="astropy.wcs.Wcsprm.cd"><tt class="xref py py-obj docutils literal"><span class="pre">cd</span></tt></a>) is unity.</p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.mix">
<tt class="descname">mix</tt><big>(</big><em>mixpix</em>, <em>mixcel</em>, <em>vspan</em>, <em>vstep</em>, <em>viter</em>, <em>world</em>, <em>pixcrd</em>, <em>origin</em><big>)</big><a class="headerlink" href="#astropy.wcs.Wcsprm.mix" title="Permalink to this definition">¶</a></dt>
<dd><p>Given either the celestial longitude or latitude plus an element of
the pixel coordinate, solves for the remaining elements by iterating
on the unknown celestial coordinate element using
<a class="reference internal" href="#astropy.wcs.Wcsprm.s2p" title="astropy.wcs.Wcsprm.s2p"><tt class="xref py py-obj docutils literal"><span class="pre">s2p</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters :</th><td class="field-body"><p class="first"><strong>mixpix</strong> : int</p>
<blockquote>
<div><p>Which element on the pixel coordinate is given.</p>
</div></blockquote>
<p><strong>mixcel</strong> : int</p>
<blockquote>
<div><p>Which element of the celestial coordinate is given. If <em>mixcel</em> =
<tt class="docutils literal"><span class="pre">1</span></tt>, celestial longitude is given in <tt class="docutils literal"><span class="pre">world[self.lng]</span></tt>,
latitude returned in <tt class="docutils literal"><span class="pre">world[self.lat]</span></tt>.  If <em>mixcel</em> = <tt class="docutils literal"><span class="pre">2</span></tt>,
celestial latitude is given in <tt class="docutils literal"><span class="pre">world[self.lat]</span></tt>, longitude
returned in <tt class="docutils literal"><span class="pre">world[self.lng]</span></tt>.</p>
</div></blockquote>
<p><strong>vspan</strong> : pair of floats</p>
<blockquote>
<div><p>Solution interval for the celestial coordinate, in degrees.  The
ordering of the two limits is irrelevant.  Longitude ranges may be
specified with any convenient normalization, for example
<tt class="docutils literal"><span class="pre">(-120,+120)</span></tt> is the same as <tt class="docutils literal"><span class="pre">(240,480)</span></tt>, except that the
solution will be returned with the same normalization, i.e. lie
within the interval specified.</p>
</div></blockquote>
<p><strong>vstep</strong> : float</p>
<blockquote>
<div><p>Step size for solution search, in degrees.  If <tt class="docutils literal"><span class="pre">0</span></tt>, a sensible,
although perhaps non-optimal default will be used.</p>
</div></blockquote>
<p><strong>viter</strong> : int</p>
<blockquote>
<div><p>If a solution is not found then the step size will be halved and
the search recommenced.  <em>viter</em> controls how many times the step
size is halved.  The allowed range is 5 - 10.</p>
</div></blockquote>
<p><strong>world</strong> : double array[naxis]</p>
<blockquote>
<div><p>World coordinate elements.  <tt class="docutils literal"><span class="pre">world[self.lng]</span></tt> and
<tt class="docutils literal"><span class="pre">world[self.lat]</span></tt> are the celestial longitude and latitude, in
degrees.  Which is given and which returned depends on the value
of <em>mixcel</em>.  All other elements are given.  The results will be
written to this array in-place.</p>
</div></blockquote>
<p><strong>pixcrd</strong> : double array[naxis].</p>
<blockquote>
<div><p>Pixel coordinates.  The element indicated by <em>mixpix</em> is given and
the remaining elements will be written in-place.</p>
</div></blockquote>
<p><strong>origin</strong> : int</p>
<blockquote>
<div><p>Specifies the origin of pixel values.  The Fortran and FITS
standards use an origin of 1.  Numpy and C use array indexing with
origin at 0.</p>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>result</strong> : dict</p>
<blockquote>
<div><p>Returns a dictionary with the following keys:</p>
<ul>
<li><p class="first"><em>phi</em> (double array[naxis])</p>
</li>
<li><p class="first"><em>theta</em> (double array[naxis])</p>
<blockquote>
<div><ul class="simple">
<li>Longitude and latitude in the native coordinate system of
the projection, in degrees.</li>
</ul>
</div></blockquote>
</li>
<li><p class="first"><em>imgcrd</em> (double array[naxis])</p>
<blockquote>
<div><ul class="simple">
<li>Image coordinate elements.  <tt class="docutils literal"><span class="pre">imgcrd[self.lng]</span></tt> and
<tt class="docutils literal"><span class="pre">imgcrd[self.lat]</span></tt> are the projected <em>x</em>- and
<em>y</em>-coordinates, in decimal degrees.</li>
</ul>
</div></blockquote>
</li>
<li><p class="first"><em>world</em> (double array[naxis])</p>
<blockquote>
<div><ul class="simple">
<li>Another reference to the <em>world</em> argument passed in.</li>
</ul>
</div></blockquote>
</li>
</ul>
</div></blockquote>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first"><strong>MemoryError</strong> :</p>
<blockquote>
<div><p>Memory allocation failed.</p>
</div></blockquote>
<p><strong>SingularMatrixError</strong> :</p>
<blockquote>
<div><p>Linear transformation matrix is singular.</p>
</div></blockquote>
<p><strong>InconsistentAxisTypesError</strong> :</p>
<blockquote>
<div><p>Inconsistent or unrecognized coordinate axis types.</p>
</div></blockquote>
<p><strong>ValueError</strong> :</p>
<blockquote>
<div><p>Invalid parameter value.</p>
</div></blockquote>
<p><strong>InvalidTransformError</strong> :</p>
<blockquote>
<div><p>Invalid coordinate transformation parameters.</p>
</div></blockquote>
<p><strong>InvalidTransformError</strong> :</p>
<blockquote>
<div><p>Ill-conditioned coordinate transformation parameters.</p>
</div></blockquote>
<p><strong>InvalidCoordinateError</strong> :</p>
<blockquote>
<div><p>Invalid world coordinate.</p>
</div></blockquote>
<p><strong>NoSolutionError</strong> :</p>
<blockquote class="last">
<div><p>No solution found in the specified interval.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#astropy.wcs.Wcsprm.lat" title="astropy.wcs.Wcsprm.lat"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.lat</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.lng" title="astropy.wcs.Wcsprm.lng"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.lng</span></tt></a></p>
</div>
<p class="rubric">Notes</p>
<p>Initially, the specified solution interval is checked to see if it&#8217;s a
&#8220;crossing&#8221; interval.  If it isn&#8217;t, a search is made for a crossing
solution by iterating on the unknown celestial coordinate starting at
the upper limit of the solution interval and decrementing by the
specified step size.  A crossing is indicated if the trial value of
the pixel coordinate steps through the value specified.  If a crossing
interval is found then the solution is determined by a modified form
of &#8220;regula falsi&#8221; division of the crossing interval.  If no crossing
interval was found within the specified solution interval then a
search is made for a &#8220;non-crossing&#8221; solution as may arise from a
point of tangency.  The process is complicated by having to make
allowance for the discontinuities that occur in all map projections.</p>
<p>Once one solution has been determined others may be found by
subsequent invocations of <a class="reference internal" href="#astropy.wcs.Wcsprm.mix" title="astropy.wcs.Wcsprm.mix"><tt class="xref py py-obj docutils literal"><span class="pre">mix</span></tt></a> with suitably
restricted solution intervals.</p>
<p>Note the circumstance that arises when the solution point lies at a
native pole of a projection in which the pole is represented as a
finite curve, for example the zenithals and conics.  In such cases two
or more valid solutions may exist but <a class="reference internal" href="#astropy.wcs.Wcsprm.mix" title="astropy.wcs.Wcsprm.mix"><tt class="xref py py-obj docutils literal"><span class="pre">mix</span></tt></a> only
ever returns one.</p>
<p>Because of its generality, <a class="reference internal" href="#astropy.wcs.Wcsprm.mix" title="astropy.wcs.Wcsprm.mix"><tt class="xref py py-obj docutils literal"><span class="pre">mix</span></tt></a> is very
compute-intensive.  For compute-limited applications, more efficient
special-case solvers could be written for simple projections, for
example non-oblique cylindrical projections.</p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.p2s">
<tt class="descname">p2s</tt><big>(</big><em>pixcrd</em>, <em>origin</em><big>)</big><a class="headerlink" href="#astropy.wcs.Wcsprm.p2s" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts pixel to world coordinates.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters :</th><td class="field-body"><p class="first"><strong>pixcrd</strong> : double array[ncoord][nelem]</p>
<blockquote>
<div><p>Array of pixel coordinates.</p>
</div></blockquote>
<p><strong>origin</strong> : int</p>
<blockquote>
<div><p>Specifies the origin of pixel values.  The Fortran and FITS
standards use an origin of 1.  Numpy and C use array indexing with
origin at 0.</p>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>result</strong> : dict</p>
<blockquote>
<div><p>Returns a dictionary with the following keys:</p>
<ul class="simple">
<li><em>imgcrd</em>: double array[ncoord][nelem]<ul>
<li>Array of intermediate world coordinates.  For celestial axes,
<tt class="docutils literal"><span class="pre">imgcrd[][self.lng]</span></tt> and <tt class="docutils literal"><span class="pre">imgcrd[][self.lat]</span></tt> are the
projected <em>x</em>-, and <em>y</em>-coordinates, in pseudo degrees.  For
spectral axes, <tt class="docutils literal"><span class="pre">imgcrd[][self.spec]</span></tt> is the intermediate
spectral coordinate, in SI units.</li>
</ul>
</li>
<li><em>phi</em>: double array[ncoord]</li>
<li><em>theta</em>: double array[ncoord]<ul>
<li>Longitude and latitude in the native coordinate system of the
projection, in degrees.</li>
</ul>
</li>
<li><em>world</em>: double array[ncoord][nelem]<ul>
<li>Array of world coordinates.  For celestial axes,
<tt class="docutils literal"><span class="pre">world[][self.lng]</span></tt> and <tt class="docutils literal"><span class="pre">world[][self.lat]</span></tt> are the
celestial longitude and latitude, in degrees.  For spectral
axes, <tt class="docutils literal"><span class="pre">world[][self.spec]</span></tt> is the intermediate spectral
coordinate, in SI units.</li>
</ul>
</li>
<li><em>stat</em>: int array[ncoord]<ul>
<li>Status return value for each coordinate. <tt class="docutils literal"><span class="pre">0</span></tt> for success,
<tt class="docutils literal"><span class="pre">1+</span></tt> for invalid pixel coordinate.</li>
</ul>
</li>
</ul>
</div></blockquote>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first"><strong>MemoryError</strong> :</p>
<blockquote>
<div><p>Memory allocation failed.</p>
</div></blockquote>
<p><strong>SingularMatrixError</strong> :</p>
<blockquote>
<div><p>Linear transformation matrix is singular.</p>
</div></blockquote>
<p><strong>InconsistentAxisTypesError</strong> :</p>
<blockquote>
<div><p>Inconsistent or unrecognized coordinate axis types.</p>
</div></blockquote>
<p><strong>ValueError</strong> :</p>
<blockquote>
<div><p>Invalid parameter value.</p>
</div></blockquote>
<p><strong>ValueError</strong> :</p>
<blockquote>
<div><p><em>x</em>- and <em>y</em>-coordinate arrays are not the same size.</p>
</div></blockquote>
<p><strong>InvalidTransformError</strong> :</p>
<blockquote>
<div><p>Invalid coordinate transformation parameters.</p>
</div></blockquote>
<p><strong>InvalidTransformError</strong> :</p>
<blockquote class="last">
<div><p>Ill-conditioned coordinate transformation parameters.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#astropy.wcs.Wcsprm.lat" title="astropy.wcs.Wcsprm.lat"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.lat</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.lng" title="astropy.wcs.Wcsprm.lng"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.lng</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.print_contents">
<tt class="descname">print_contents</tt><big>(</big><big>)</big><a class="headerlink" href="#astropy.wcs.Wcsprm.print_contents" title="Permalink to this definition">¶</a></dt>
<dd><p>Print the contents of the <a class="reference internal" href="#astropy.wcs.Wcsprm" title="astropy.wcs.Wcsprm"><tt class="xref py py-obj docutils literal"><span class="pre">Wcsprm</span></tt></a> object to stdout.
Probably only useful for debugging purposes, and may be removed in the
future.</p>
<p>To get a string of the contents, use <tt class="xref py py-obj docutils literal"><span class="pre">repr</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.s2p">
<tt class="descname">s2p</tt><big>(</big><em>world</em>, <em>origin</em><big>)</big><a class="headerlink" href="#astropy.wcs.Wcsprm.s2p" title="Permalink to this definition">¶</a></dt>
<dd><p>Transforms world coordinates to pixel coordinates.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters :</th><td class="field-body"><p class="first"><strong>world</strong> : double array[ncoord][nelem]</p>
<blockquote>
<div><p>Array of world coordinates, in decimal degrees.</p>
</div></blockquote>
<p><strong>origin</strong> : int</p>
<blockquote>
<div><p>Specifies the origin of pixel values.  The Fortran and FITS
standards use an origin of 1.  Numpy and C use array indexing with
origin at 0.</p>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>result</strong> : dict</p>
<blockquote>
<div><p>Returns a dictionary with the following keys:</p>
<ul>
<li><p class="first"><em>phi</em>: double array[ncoord]</p>
</li>
<li><p class="first"><em>theta</em>: double array[ncoord]</p>
<blockquote>
<div><ul class="simple">
<li>Longitude and latitude in the native coordinate system of
the projection, in degrees.</li>
</ul>
</div></blockquote>
</li>
<li><p class="first"><em>imgcrd</em>: double array[ncoord][nelem]</p>
<blockquote>
<div><ul class="simple">
<li>Array of intermediate world coordinates.  For celestial axes,
<tt class="docutils literal"><span class="pre">imgcrd[][self.lng]</span></tt> and <tt class="docutils literal"><span class="pre">imgcrd[][self.lat]</span></tt> are the
projected <em>x</em>-, and <em>y</em>-coordinates, in pseudo &#8220;degrees&#8221;.
For quadcube projections with a <tt class="docutils literal"><span class="pre">CUBEFACE</span></tt> axis, the face
number is also returned in <tt class="docutils literal"><span class="pre">imgcrd[][self.cubeface]</span></tt>.  For
spectral axes, <tt class="docutils literal"><span class="pre">imgcrd[][self.spec]</span></tt> is the intermediate
spectral coordinate, in SI units.</li>
</ul>
</div></blockquote>
</li>
<li><p class="first"><em>pixcrd</em>: double array[ncoord][nelem]</p>
<blockquote>
<div><ul class="simple">
<li>Array of pixel coordinates.  Pixel coordinates are
zero-based.</li>
</ul>
</div></blockquote>
</li>
<li><p class="first"><em>stat</em>: int array[ncoord]</p>
<blockquote>
<div><ul class="simple">
<li>Status return value for each coordinate. <tt class="docutils literal"><span class="pre">0</span></tt> for success,
<tt class="docutils literal"><span class="pre">1+</span></tt> for invalid pixel coordinate.</li>
</ul>
</div></blockquote>
</li>
</ul>
</div></blockquote>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first"><strong>MemoryError</strong> :</p>
<blockquote>
<div><p>Memory allocation failed.</p>
</div></blockquote>
<p><strong>SingularMatrixError</strong> :</p>
<blockquote>
<div><p>Linear transformation matrix is singular.</p>
</div></blockquote>
<p><strong>InconsistentAxisTypesError</strong> :</p>
<blockquote>
<div><p>Inconsistent or unrecognized coordinate axis types.</p>
</div></blockquote>
<p><strong>ValueError</strong> :</p>
<blockquote>
<div><p>Invalid parameter value.</p>
</div></blockquote>
<p><strong>InvalidTransformError</strong> :</p>
<blockquote>
<div><p>Invalid coordinate transformation parameters.</p>
</div></blockquote>
<p><strong>InvalidTransformError</strong> :</p>
<blockquote class="last">
<div><p>Ill-conditioned coordinate transformation parameters.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#astropy.wcs.Wcsprm.lat" title="astropy.wcs.Wcsprm.lat"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.lat</span></tt></a>, <a class="reference internal" href="#astropy.wcs.Wcsprm.lng" title="astropy.wcs.Wcsprm.lng"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.lng</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.set">
<tt class="descname">set</tt><big>(</big><big>)</big><a class="headerlink" href="#astropy.wcs.Wcsprm.set" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets up a WCS object for use according to information supplied within
it.</p>
<p>Note that this routine need not be called directly; it will be invoked
by <a class="reference internal" href="#astropy.wcs.Wcsprm.p2s" title="astropy.wcs.Wcsprm.p2s"><tt class="xref py py-obj docutils literal"><span class="pre">p2s</span></tt></a> and <a class="reference internal" href="#astropy.wcs.Wcsprm.s2p" title="astropy.wcs.Wcsprm.s2p"><tt class="xref py py-obj docutils literal"><span class="pre">s2p</span></tt></a> if
necessary.</p>
<p>Some attributes that are based on other attributes (such as
<a class="reference internal" href="#astropy.wcs.Wcsprm.lattyp" title="astropy.wcs.Wcsprm.lattyp"><tt class="xref py py-obj docutils literal"><span class="pre">lattyp</span></tt></a> on <a class="reference internal" href="#astropy.wcs.Wcsprm.ctype" title="astropy.wcs.Wcsprm.ctype"><tt class="xref py py-obj docutils literal"><span class="pre">ctype</span></tt></a>) may not
be correct until after <a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a> is called.</p>
<p><a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a> strips off trailing blanks in all string
members.</p>
<p><a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a> recognizes the <tt class="docutils literal"><span class="pre">NCP</span></tt> projection and
converts it to the equivalent <tt class="docutils literal"><span class="pre">SIN</span></tt> projection and it also
recognizes <tt class="docutils literal"><span class="pre">GLS</span></tt> as a synonym for <tt class="docutils literal"><span class="pre">SFL</span></tt>.  It does alias
translation for the AIPS spectral types (<tt class="docutils literal"><span class="pre">FREQ-LSR</span></tt>, <tt class="docutils literal"><span class="pre">FELO-HEL</span></tt>,
etc.) but without changing the input header keywords.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first"><strong>MemoryError</strong> :</p>
<blockquote>
<div><p>Memory allocation failed.</p>
</div></blockquote>
<p><strong>SingularMatrixError</strong> :</p>
<blockquote>
<div><p>Linear transformation matrix is singular.</p>
</div></blockquote>
<p><strong>InconsistentAxisTypesError</strong> :</p>
<blockquote>
<div><p>Inconsistent or unrecognized coordinate axis types.</p>
</div></blockquote>
<p><strong>ValueError</strong> :</p>
<blockquote>
<div><p>Invalid parameter value.</p>
</div></blockquote>
<p><strong>InvalidTransformError</strong> :</p>
<blockquote>
<div><p>Invalid coordinate transformation parameters.</p>
</div></blockquote>
<p><strong>InvalidTransformError</strong> :</p>
<blockquote class="last">
<div><p>Ill-conditioned coordinate transformation parameters.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.set_ps">
<tt class="descname">set_ps</tt><big>(</big><em>list</em><big>)</big><a class="headerlink" href="#astropy.wcs.Wcsprm.set_ps" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets <tt class="xref py py-obj docutils literal"><span class="pre">PSi_ma</span></tt> keywords for each <em>i</em> and <em>m</em>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters :</th><td class="field-body"><p class="first"><strong>ps</strong> : sequence of tuples</p>
<blockquote class="last">
<div><p>The input must be a sequence of tuples of the form (<em>i</em>, <em>m</em>,
<em>value</em>):</p>
<ul class="simple">
<li><em>i</em>: int.  Axis number, as in <tt class="docutils literal"><span class="pre">PSi_ma</span></tt>, (i.e. 1-relative)</li>
<li><em>m</em>: int.  Parameter number, as in <tt class="docutils literal"><span class="pre">PSi_ma</span></tt>, (i.e. 0-relative)</li>
<li><em>value</em>: string.  Parameter value.</li>
</ul>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#astropy.wcs.Wcsprm.get_ps" title="astropy.wcs.Wcsprm.get_ps"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.get_ps</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.set_pv">
<tt class="descname">set_pv</tt><big>(</big><em>list</em><big>)</big><a class="headerlink" href="#astropy.wcs.Wcsprm.set_pv" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets <tt class="xref py py-obj docutils literal"><span class="pre">PVi_ma</span></tt> keywords for each <em>i</em> and <em>m</em>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters :</th><td class="field-body"><p class="first"><strong>pv</strong> : list of tuples</p>
<blockquote class="last">
<div><p>The input must be a sequence of tuples of the form (<em>i</em>, <em>m</em>,
<em>value</em>):</p>
<ul class="simple">
<li><em>i</em>: int.  Axis number, as in <tt class="docutils literal"><span class="pre">PVi_ma</span></tt>, (i.e. 1-relative)</li>
<li><em>m</em>: int.  Parameter number, as in <tt class="docutils literal"><span class="pre">PVi_ma</span></tt>, (i.e. 0-relative)</li>
<li><em>value</em>: float.  Parameter value.</li>
</ul>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="#astropy.wcs.Wcsprm.get_pv" title="astropy.wcs.Wcsprm.get_pv"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.wcs.Wcsprm.get_pv</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.spcfix">
<tt class="descname">spcfix</tt><big>(</big><big>)</big> &rarr; int<a class="headerlink" href="#astropy.wcs.Wcsprm.spcfix" title="Permalink to this definition">¶</a></dt>
<dd><p>Translates AIPS-convention spectral coordinate types.  {<tt class="docutils literal"><span class="pre">FREQ</span></tt>,
<tt class="docutils literal"><span class="pre">VELO</span></tt>, <tt class="docutils literal"><span class="pre">FELO</span></tt>}-{<tt class="docutils literal"><span class="pre">OBS</span></tt>, <tt class="docutils literal"><span class="pre">HEL</span></tt>, <tt class="docutils literal"><span class="pre">LSR</span></tt>} (e.g. <tt class="docutils literal"><span class="pre">FREQ-LSR</span></tt>,
<tt class="docutils literal"><span class="pre">VELO-OBS</span></tt>, <tt class="docutils literal"><span class="pre">FELO-HEL</span></tt>)</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>success</strong> : int</p>
<blockquote class="last">
<div><p>Returns <tt class="docutils literal"><span class="pre">0</span></tt> for success; <tt class="docutils literal"><span class="pre">-1</span></tt> if no change required.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.sptr">
<tt class="descname">sptr</tt><big>(</big><em>ctype</em>, <em>i=-1</em><big>)</big><a class="headerlink" href="#astropy.wcs.Wcsprm.sptr" title="Permalink to this definition">¶</a></dt>
<dd><p>Translates the spectral axis in a WCS object.</p>
<p>For example, a <tt class="docutils literal"><span class="pre">FREQ</span></tt> axis may be translated into <tt class="docutils literal"><span class="pre">ZOPT-F2W</span></tt> and
vice versa.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters :</th><td class="field-body"><p class="first"><strong>ctype</strong> : string</p>
<blockquote>
<div><p>Required spectral <tt class="docutils literal"><span class="pre">CTYPEia</span></tt>, maximum of 8 characters.  The first
four characters are required to be given and are never modified.
The remaining four, the algorithm code, are completely determined
by, and must be consistent with, the first four characters.
Wildcarding may be used, i.e.  if the final three characters are
specified as <tt class="docutils literal"><span class="pre">&quot;???&quot;</span></tt>, or if just the eighth character is
specified as <tt class="docutils literal"><span class="pre">&quot;?&quot;</span></tt>, the correct algorithm code will be
substituted and returned.</p>
</div></blockquote>
<p><strong>i</strong> : int</p>
<blockquote>
<div><p>Index of the spectral axis (0-relative).  If <tt class="docutils literal"><span class="pre">i</span> <span class="pre">&lt;</span> <span class="pre">0</span></tt> (or not
provided), it will be set to the first spectral axis identified
from the <tt class="docutils literal"><span class="pre">CTYPE</span></tt> keyvalues in the FITS header.</p>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><p class="first"><strong>MemoryError</strong> :</p>
<blockquote>
<div><p>Memory allocation failed.</p>
</div></blockquote>
<p><strong>SingularMatrixError</strong> :</p>
<blockquote>
<div><p>Linear transformation matrix is singular.</p>
</div></blockquote>
<p><strong>InconsistentAxisTypesError</strong> :</p>
<blockquote>
<div><p>Inconsistent or unrecognized coordinate axis types.</p>
</div></blockquote>
<p><strong>ValueError</strong> :</p>
<blockquote>
<div><p>Invalid parameter value.</p>
</div></blockquote>
<p><strong>InvalidTransformError</strong> :</p>
<blockquote>
<div><p>Invalid coordinate transformation parameters.</p>
</div></blockquote>
<p><strong>InvalidTransformError</strong> :</p>
<blockquote>
<div><p>Ill-conditioned coordinate transformation parameters.</p>
</div></blockquote>
<p><strong>InvalidSubimageSpecificationError</strong> :</p>
<blockquote class="last">
<div><p>Invalid subimage specification (no spectral axis).</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.sub">
<tt class="descname">sub</tt><big>(</big><em>axes</em><big>)</big><a class="headerlink" href="#astropy.wcs.Wcsprm.sub" title="Permalink to this definition">¶</a></dt>
<dd><p>Extracts the coordinate description for a subimage from a
<tt class="xref py py-obj docutils literal"><span class="pre">WCS</span></tt> object.</p>
<p>The world coordinate system of the subimage must be separable in the
sense that the world coordinates at any point in the subimage must
depend only on the pixel coordinates of the axes extracted.  In
practice, this means that the <tt class="docutils literal"><span class="pre">PCi_ja</span></tt> matrix of the original image
must not contain non-zero off-diagonal terms that associate any of the
subimage axes with any of the non-subimage axes.</p>
<p><a class="reference internal" href="#astropy.wcs.Wcsprm.sub" title="astropy.wcs.Wcsprm.sub"><tt class="xref py py-obj docutils literal"><span class="pre">sub</span></tt></a> can also add axes to a wcsprm object.  The new axes will be
created using the defaults set by the Wcsprm constructor which produce
a simple, unnamed, linear axis with world coordinates equal to the
pixel coordinate.  These default values can be changed before
invoking <a class="reference internal" href="#astropy.wcs.Wcsprm.set" title="astropy.wcs.Wcsprm.set"><tt class="xref py py-obj docutils literal"><span class="pre">set</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters :</th><td class="field-body"><p class="first"><strong>axes</strong> : int or a sequence.</p>
<blockquote>
<div><ul class="simple">
<li>If an int, include the first <em>N</em> axes in their original order.</li>
<li>If a sequence, may contain a combination of image axis numbers
(1-relative) or special axis identifiers (see below).  Order is
significant; <tt class="docutils literal"><span class="pre">axes[0]</span></tt> is the axis number of the input image
that corresponds to the first axis in the subimage, etc.  Use an
axis number of 0 to create a new axis using the defaults.</li>
<li>If <tt class="docutils literal"><span class="pre">0</span></tt>, <tt class="docutils literal"><span class="pre">[]</span></tt> or <tt class="docutils literal"><span class="pre">None</span></tt>, do a deep copy.</li>
</ul>
<p>Coordinate axes types may be specified using either strings or
special integer constants.  The available types are:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">'longitude'</span></tt> / <tt class="docutils literal"><span class="pre">WCSSUB_LONGITUDE</span></tt>: Celestial longitude</li>
<li><tt class="docutils literal"><span class="pre">'latitude'</span></tt> / <tt class="docutils literal"><span class="pre">WCSSUB_LATITUDE</span></tt>: Celestial latitude</li>
<li><tt class="docutils literal"><span class="pre">'cubeface'</span></tt> / <tt class="docutils literal"><span class="pre">WCSSUB_CUBEFACE</span></tt>: Quadcube <tt class="docutils literal"><span class="pre">CUBEFACE</span></tt> axis</li>
<li><tt class="docutils literal"><span class="pre">'spectral'</span></tt> / <tt class="docutils literal"><span class="pre">WCSSUB_SPECTRAL</span></tt>: Spectral axis</li>
<li><tt class="docutils literal"><span class="pre">'stokes'</span></tt> / <tt class="docutils literal"><span class="pre">WCSSUB_STOKES</span></tt>: Stokes axis</li>
<li><tt class="docutils literal"><span class="pre">'celestial'</span></tt> / <tt class="docutils literal"><span class="pre">WCSSUB_CELESTIAL</span></tt>: An alias for the
combination of <tt class="docutils literal"><span class="pre">'longitude'</span></tt>, <tt class="docutils literal"><span class="pre">'latitude'</span></tt> and <tt class="docutils literal"><span class="pre">'cubeface'</span></tt>.</li>
</ul>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>new_wcs</strong> : <tt class="xref py py-obj docutils literal"><span class="pre">WCS</span></tt> object</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><p class="first"><strong>MemoryError</strong> :</p>
<blockquote>
<div><p>Memory allocation failed.</p>
</div></blockquote>
<p><strong>InvalidSubimageSpecificationError</strong> :</p>
<blockquote>
<div><p>Invalid subimage specification (no spectral axis).</p>
</div></blockquote>
<p><strong>NonseparableSubimageCoordinateSystem</strong> :</p>
<blockquote class="last">
<div><p>Non-separable subimage coordinate system.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Notes</p>
<p>Combinations of subimage axes of particular types may be extracted in
the same order as they occur in the input image by combining the
integer constants with the &#8216;binary or&#8217; (<tt class="docutils literal"><span class="pre">|</span></tt>) operator.  For
example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">wcs</span><span class="o">.</span><span class="n">sub</span><span class="p">([</span><span class="n">WCSSUB_LONGITUDE</span> <span class="o">|</span> <span class="n">WCSSUB_LATITUDE</span> <span class="o">|</span> <span class="n">WCSSUB_SPECTRAL</span><span class="p">])</span>
</pre></div>
</div>
<p>would extract the longitude, latitude, and spectral axes in the same
order as the input image.  If one of each were present, the resulting
object would have three dimensions.</p>
<p>For convenience, <tt class="docutils literal"><span class="pre">WCSSUB_CELESTIAL</span></tt> is defined as the combination
<tt class="docutils literal"><span class="pre">WCSSUB_LONGITUDE</span> <span class="pre">|</span> <span class="pre">WCSSUB_LATITUDE</span> <span class="pre">|</span> <span class="pre">WCSSUB_CUBEFACE</span></tt>.</p>
<p>The codes may also be negated to extract all but the types specified,
for example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">wcs</span><span class="o">.</span><span class="n">sub</span><span class="p">([</span>
  <span class="n">WCSSUB_LONGITUDE</span><span class="p">,</span>
  <span class="n">WCSSUB_LATITUDE</span><span class="p">,</span>
  <span class="n">WCSSUB_CUBEFACE</span><span class="p">,</span>
  <span class="o">-</span><span class="p">(</span><span class="n">WCSSUB_SPECTRAL</span> <span class="o">|</span> <span class="n">WCSSUB_STOKES</span><span class="p">)])</span>
</pre></div>
</div>
<p>The last of these specifies all axis types other than spectral or
Stokes.  Extraction is done in the order specified by <tt class="xref py py-obj docutils literal"><span class="pre">axes</span></tt>, i.e. a
longitude axis (if present) would be extracted first (via <tt class="docutils literal"><span class="pre">axes[0]</span></tt>)
and not subsequently (via <tt class="docutils literal"><span class="pre">axes[3]</span></tt>).  Likewise for the latitude and
cubeface axes in this example.</p>
<p>The number of dimensions in the returned object may be less than or
greater than the length of <tt class="xref py py-obj docutils literal"><span class="pre">axes</span></tt>.  However, it will never exceed the
number of axes in the input image.</p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.to_header">
<tt class="descname">to_header</tt><big>(</big><em>relax=False</em><big>)</big><a class="headerlink" href="#astropy.wcs.Wcsprm.to_header" title="Permalink to this definition">¶</a></dt>
<dd><p><a class="reference internal" href="#astropy.wcs.Wcsprm.to_header" title="astropy.wcs.Wcsprm.to_header"><tt class="xref py py-obj docutils literal"><span class="pre">to_header</span></tt></a> translates a WCS object into a FITS header.</p>
<p>The details of the header depends on context:</p>
<blockquote>
<div><ul class="simple">
<li>If the <a class="reference internal" href="#astropy.wcs.Wcsprm.colnum" title="astropy.wcs.Wcsprm.colnum"><tt class="xref py py-obj docutils literal"><span class="pre">colnum</span></tt></a> member is non-zero then a
binary table image array header will be produced.</li>
<li>Otherwise, if the <a class="reference internal" href="#astropy.wcs.Wcsprm.colax" title="astropy.wcs.Wcsprm.colax"><tt class="xref py py-obj docutils literal"><span class="pre">colax</span></tt></a> member is set
non-zero then a pixel list header will be produced.</li>
<li>Otherwise, a primary image or image extension header will be
produced.</li>
</ul>
</div></blockquote>
<p>The output header will almost certainly differ from the input in a
number of respects:</p>
<blockquote>
<div><ol class="arabic simple">
<li>The output header only contains WCS-related keywords.  In
particular, it does not contain syntactically-required keywords
such as <tt class="docutils literal"><span class="pre">SIMPLE</span></tt>, <tt class="docutils literal"><span class="pre">NAXIS</span></tt>, <tt class="docutils literal"><span class="pre">BITPIX</span></tt>, or <tt class="docutils literal"><span class="pre">END</span></tt>.</li>
<li>Deprecated (e.g. <tt class="docutils literal"><span class="pre">CROTAn</span></tt>) or non-standard usage will be
translated to standard (this is partially dependent on whether
<a class="reference internal" href="#astropy.wcs.Wcsprm.fix" title="astropy.wcs.Wcsprm.fix"><tt class="xref py py-obj docutils literal"><span class="pre">fix</span></tt></a> was applied).</li>
<li>Quantities will be converted to the units used internally,
basically SI with the addition of degrees.</li>
<li>Floating-point quantities may be given to a different decimal
precision.</li>
<li>Elements of the <tt class="docutils literal"><span class="pre">PCi_j</span></tt> matrix will be written if and only if
they differ from the unit matrix.  Thus, if the matrix is unity
then no elements will be written.</li>
<li>Additional keywords such as <tt class="docutils literal"><span class="pre">WCSAXES</span></tt>, <tt class="docutils literal"><span class="pre">CUNITia</span></tt>,
<tt class="docutils literal"><span class="pre">LONPOLEa</span></tt> and <tt class="docutils literal"><span class="pre">LATPOLEa</span></tt> may appear.</li>
<li>The original keycomments will be lost, although
<a class="reference internal" href="#astropy.wcs.Wcsprm.to_header" title="astropy.wcs.Wcsprm.to_header"><tt class="xref py py-obj docutils literal"><span class="pre">to_header</span></tt></a> tries hard to write meaningful
comments.</li>
<li>Keyword order may be changed.</li>
</ol>
</div></blockquote>
<p>Keywords can be translated between the image array, binary table, and
pixel lists forms by manipulating the <a class="reference internal" href="#astropy.wcs.Wcsprm.colnum" title="astropy.wcs.Wcsprm.colnum"><tt class="xref py py-obj docutils literal"><span class="pre">colnum</span></tt></a> or
<a class="reference internal" href="#astropy.wcs.Wcsprm.colax" title="astropy.wcs.Wcsprm.colax"><tt class="xref py py-obj docutils literal"><span class="pre">colax</span></tt></a> members of the <tt class="xref py py-obj docutils literal"><span class="pre">WCS</span></tt>
object.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters :</th><td class="field-body"><p class="first"><strong>relax</strong> : bool or int</p>
<blockquote>
<div><p>Degree of permissiveness:</p>
<ul class="simple">
<li><tt class="xref py py-obj docutils literal"><span class="pre">False</span></tt>: Recognize only FITS keywords defined by the published
WCS standard.</li>
<li><tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt>: Admit all recognized informal extensions of the WCS
standard.</li>
<li><tt class="xref py py-obj docutils literal"><span class="pre">int</span></tt>: a bit field selecting specific extensions to write.
See <a class="reference internal" href="../wcs/relax.html#relaxwrite"><em>Header-writing relaxation constants</em></a> for details.</li>
</ul>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>header</strong> : str</p>
<blockquote class="last">
<div><p>Raw FITS header as a string.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.Wcsprm.unitfix">
<tt class="descname">unitfix</tt><big>(</big><em>translate_units=''</em><big>)</big><a class="headerlink" href="#astropy.wcs.Wcsprm.unitfix" title="Permalink to this definition">¶</a></dt>
<dd><p>Translates non-standard <tt class="docutils literal"><span class="pre">CUNITia</span></tt> keyvalues.</p>
<p>For example, <tt class="docutils literal"><span class="pre">DEG</span></tt> -&gt; <tt class="docutils literal"><span class="pre">deg</span></tt>, also stripping off unnecessary
whitespace.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters :</th><td class="field-body"><p class="first"><strong>translate_units</strong> : string, optional</p>
<blockquote>
<div><p>Do potentially unsafe translations of non-standard unit strings.</p>
<p>Although <tt class="docutils literal"><span class="pre">&quot;S&quot;</span></tt> is commonly used to represent seconds, its
recognizes <tt class="docutils literal"><span class="pre">&quot;S&quot;</span></tt> formally as Siemens, however rarely that may
be translation to <tt class="docutils literal"><span class="pre">&quot;s&quot;</span></tt> is potentially unsafe since the
standard used.  The same applies to <tt class="docutils literal"><span class="pre">&quot;H&quot;</span></tt> for hours (Henry),
and <tt class="docutils literal"><span class="pre">&quot;D&quot;</span></tt> for days (Debye).</p>
<p>This string controls what to do in such cases, and is
case-insensitive.</p>
<ul class="simple">
<li>If the string contains <tt class="docutils literal"><span class="pre">&quot;s&quot;</span></tt>, translate <tt class="docutils literal"><span class="pre">&quot;S&quot;</span></tt> to <tt class="docutils literal"><span class="pre">&quot;s&quot;</span></tt>.</li>
<li>If the string contains <tt class="docutils literal"><span class="pre">&quot;h&quot;</span></tt>, translate <tt class="docutils literal"><span class="pre">&quot;H&quot;</span></tt> to <tt class="docutils literal"><span class="pre">&quot;h&quot;</span></tt>.</li>
<li>If the string contains <tt class="docutils literal"><span class="pre">&quot;d&quot;</span></tt>, translate <tt class="docutils literal"><span class="pre">&quot;D&quot;</span></tt> to <tt class="docutils literal"><span class="pre">&quot;d&quot;</span></tt>.</li>
</ul>
<p>Thus <tt class="docutils literal"><span class="pre">''</span></tt> doesn&#8217;t do any unsafe translations, whereas <tt class="docutils literal"><span class="pre">'shd'</span></tt>
does all of them.</p>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns :</th><td class="field-body"><p class="first"><strong>success</strong> : int</p>
<blockquote class="last">
<div><p>Returns <tt class="docutils literal"><span class="pre">0</span></tt> for success; <tt class="docutils literal"><span class="pre">-1</span></tt> if no change required.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper"><h3>Page Contents</h3>
<ul>
<li><a class="reference internal" href="#">Wcsprm</a></li>
</ul>


        </div>
      </div>
      <div class="clearer"></div>
    </div>
<footer class="footer">
  <p class="pull-right">
    <a href="../_sources/_generated/astropy.wcs.Wcsprm.txt"
       rel="nofollow">Page Source</a> &nbsp;
    <a href="#">Back to Top</a></p>
  <p>
    &copy; Copyright 2011-2013, The Astropy Developers.<br/>
    Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. &nbsp;
    Last built 22 Oct 2013. <br/>
  </p>
</footer>
  </body>
</html>