Sophie

Sophie

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

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>WCS &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="WCSBase" href="astropy.wcs.WCSBase.html" />
    <link rel="prev" title="Tabprm" href="astropy.wcs.Tabprm.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="astropy.wcs.WCSBase.html" title="WCSBase">
	  next &raquo;
	</a>
      </li>
      <li class="right">
	<a href="astropy.wcs.Tabprm.html" title="Tabprm">
	  &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>WCS</li> 
    </ul>
</div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="wcs">
<h1>WCS<a class="headerlink" href="#wcs" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="astropy.wcs.wcs.WCS">
<em class="property">class </em><tt class="descclassname">astropy.wcs.wcs.</tt><tt class="descname">WCS</tt><big>(</big><em>header=None</em>, <em>fobj=None</em>, <em>key=' '</em>, <em>minerr=0.0</em>, <em>relax=True</em>, <em>naxis=None</em>, <em>keysel=None</em>, <em>colsel=None</em>, <em>fix=True</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L127" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="astropy.wcs.WCSBase.html#astropy.wcs.WCSBase" title="astropy.wcs.WCSBase"><tt class="xref py py-class docutils literal"><span class="pre">astropy.wcs.WCSBase</span></tt></a></p>
<p>WCS objects perform standard WCS transformations, and correct for
<a class="reference external" href="http://irsa.ipac.caltech.edu/data/SPITZER/docs/files/spitzer/shupeADASS.pdf">SIP</a> and <a class="reference external" href="http://www.atnf.csiro.au/people/mcalabre/WCS/index.html">Paper IV</a> table-lookup distortions, based on the WCS
keywords and supplementary data read from a FITS file.</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> : astropy.io.fits header object, string, dict-like, or None, optional</p>
<blockquote>
<div><p>If <em>header</em> is not provided or None, the object will be
initialized to default values.</p>
</div></blockquote>
<p><strong>fobj</strong> : An astropy.io.fits file (hdulist) object, optional</p>
<blockquote>
<div><p>It is needed when header keywords point to a <a class="reference external" href="http://www.atnf.csiro.au/people/mcalabre/WCS/index.html">Paper IV</a>
Lookup table distortion stored in a different extension.</p>
</div></blockquote>
<p><strong>key</strong> : string, optional</p>
<blockquote>
<div><p>The name of a particular WCS transform to use.  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 the <tt class="docutils literal"><span class="pre">CTYPEia</span></tt> cards.  <em>key</em> may only be
provided if <em>header</em> is also provided.</p>
</div></blockquote>
<p><strong>minerr</strong> : float, optional</p>
<blockquote>
<div><p>The minimum value a distortion correction must have in order
to be applied. If the value of <tt class="docutils literal"><span class="pre">CQERRja</span></tt> is smaller than
<em>minerr</em>, the corresponding distortion is not applied.</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">True</span></tt> (default): Admit all recognized informal extensions
of the WCS standard.</li>
<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">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 or sequence, optional</p>
<blockquote>
<div><p>Extracts specific coordinate axes using
<a class="reference internal" href="astropy.wcs.Wcsprm.html#astropy.wcs.Wcsprm.sub" title="astropy.wcs.Wcsprm.sub"><tt class="xref py py-meth docutils literal"><span class="pre">sub()</span></tt></a>.  If a header is provided, and
<em>naxis</em> is not <tt class="docutils literal"><span class="pre">None</span></tt>, <em>naxis</em> will be passed to
<a class="reference internal" href="astropy.wcs.Wcsprm.html#astropy.wcs.Wcsprm.sub" title="astropy.wcs.Wcsprm.sub"><tt class="xref py py-meth docutils literal"><span class="pre">sub()</span></tt></a> in order to select specific
axes from the header.  See <a class="reference internal" href="astropy.wcs.Wcsprm.html#astropy.wcs.Wcsprm.sub" title="astropy.wcs.Wcsprm.sub"><tt class="xref py py-meth docutils literal"><span class="pre">sub()</span></tt></a> for
more details about this parameter.</p>
</div></blockquote>
<p><strong>keysel</strong> : sequence of flags, optional</p>
<blockquote>
<div><p>A sequence of flags used to select the keyword types
considered by wcslib.  When <tt class="docutils literal"><span class="pre">None</span></tt>, only the standard image
header keywords are considered (and the underlying wcspih() C
function is called).  To use binary table image array or pixel
list keywords, <em>keysel</em> must be set.</p>
<p>Each element in the list should be one of the following
strings:</p>
<ul class="simple">
<li>&#8216;image&#8217;: Image header keywords</li>
<li>&#8216;binary&#8217;: Binary table image array keywords</li>
<li>&#8216;pixel&#8217;: Pixel list keywords</li>
</ul>
<p>Keywords such as <tt class="docutils literal"><span class="pre">EQUIna</span></tt> or <tt class="docutils literal"><span class="pre">RFRQna</span></tt> that are common to
binary table image arrays and pixel lists (including
<tt class="docutils literal"><span class="pre">WCSNna</span></tt> and <tt class="docutils literal"><span class="pre">TWCSna</span></tt>) are selected by both &#8216;binary&#8217; and
&#8216;pixel&#8217;.</p>
</div></blockquote>
<p><strong>colsel</strong> : sequence of int, optional</p>
<blockquote>
<div><p>A sequence of table column numbers used to restrict the WCS
transformations considered to only those pertaining to the
specified columns.  If <tt class="xref py py-obj docutils literal"><span class="pre">None</span></tt>, there is no restriction.</p>
</div></blockquote>
<p><strong>fix</strong> : bool, optional</p>
<blockquote>
<div><p>When <tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt> (default), call <tt class="xref py py-obj docutils literal"><span class="pre">fix</span></tt> on
the resulting object to fix any non-standard uses in the
header.  <a class="reference internal" href="astropy.wcs.wcs.FITSFixedWarning.html#astropy.wcs.wcs.FITSFixedWarning" title="astropy.wcs.wcs.FITSFixedWarning"><tt class="xref py py-obj docutils literal"><span class="pre">FITSFixedWarning</span></tt></a> Warnings will be emitted if any
changes were made.</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>
<div><p>Key not found in FITS header.</p>
</div></blockquote>
<p><strong>AssertionError</strong> :</p>
<blockquote class="last">
<div><p>Lookup table distortion present in the header but <em>fobj</em> was
not provided.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Notes</p>
<ol class="arabic">
<li><p class="first">astropy.wcs supports arbitrary <em>n</em> dimensions for the core WCS
(the transformations handled by WCSLIB).  However, the Paper IV
lookup table and SIP distortions must be two dimensional.
Therefore, if you try to create a WCS object where the core WCS
has a different number of dimensions than 2 and that object
also contains a Paper IV lookup table or SIP distortion, a
<tt class="xref py py-obj docutils literal"><span class="pre">ValueError</span></tt> exception will be raised.  To avoid this, consider
using the <em>naxis</em> kwarg to select two dimensions from the core
WCS.</p>
</li>
<li><p class="first">The number of coordinate axes in the transformation is not
determined directly from the <tt class="docutils literal"><span class="pre">NAXIS</span></tt> keyword but instead from
the highest of:</p>
<blockquote>
<div><ul class="simple">
<li><tt class="docutils literal"><span class="pre">NAXIS</span></tt> keyword</li>
<li><tt class="docutils literal"><span class="pre">WCSAXESa</span></tt> keyword</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>
</ul>
</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>The number of axes, which is set as the <tt class="xref py py-obj docutils literal"><span class="pre">naxis</span></tt> member, may
differ for different coordinate representations of the same
image.</p>
</li>
<li><p class="first">When the header includes duplicate keywords, in most cases the
last encountered is used.</p>
</li>
</ol>
<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.wcs.WCS.naxis1" title="astropy.wcs.wcs.WCS.naxis1"><tt class="xref py py-obj docutils literal"><span class="pre">naxis1</span></tt></a></td>
<td><p class="deprecated">
<span class="versionmodified">Deprecated since version 0.2.</span></p>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.naxis2" title="astropy.wcs.wcs.WCS.naxis2"><tt class="xref py py-obj docutils literal"><span class="pre">naxis2</span></tt></a></td>
<td><p class="deprecated">
<span class="versionmodified">Deprecated since version 0.2.</span></p>
</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.wcs.WCS.all_pix2sky" title="astropy.wcs.wcs.WCS.all_pix2sky"><tt class="xref py py-obj docutils literal"><span class="pre">all_pix2sky</span></tt></a>(*args,&nbsp;**kwargs)</td>
<td><p class="deprecated">
<span class="versionmodified">Deprecated since version 0.0.</span></p>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.all_pix2world" title="astropy.wcs.wcs.WCS.all_pix2world"><tt class="xref py py-obj docutils literal"><span class="pre">all_pix2world</span></tt></a>(*args,&nbsp;**kwargs)</td>
<td>Transforms pixel coordinates to world coordinates.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.calcFootprint" title="astropy.wcs.wcs.WCS.calcFootprint"><tt class="xref py py-obj docutils literal"><span class="pre">calcFootprint</span></tt></a>([header,&nbsp;undistort,&nbsp;axes])</td>
<td>Calculates the footprint of the image on the sky.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.copy" title="astropy.wcs.wcs.WCS.copy"><tt class="xref py py-obj docutils literal"><span class="pre">copy</span></tt></a>()</td>
<td>Return a shallow copy of the object.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.deepcopy" title="astropy.wcs.wcs.WCS.deepcopy"><tt class="xref py py-obj docutils literal"><span class="pre">deepcopy</span></tt></a>()</td>
<td>Return a deep copy of the object.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.det2im" title="astropy.wcs.wcs.WCS.det2im"><tt class="xref py py-obj docutils literal"><span class="pre">det2im</span></tt></a>(*args)</td>
<td>Convert detector coordinates to image plane coordinates using <a class="reference external" href="http://www.atnf.csiro.au/people/mcalabre/WCS/index.html">Paper IV</a> table-lookup distortion correction.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.footprint_to_file" title="astropy.wcs.wcs.WCS.footprint_to_file"><tt class="xref py py-obj docutils literal"><span class="pre">footprint_to_file</span></tt></a>([filename,&nbsp;color,&nbsp;width])</td>
<td>Writes out a <a class="reference external" href="http://hea-www.harvard.edu/RD/ds9/">ds9</a> style regions file.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.get_axis_types" title="astropy.wcs.wcs.WCS.get_axis_types"><tt class="xref py py-obj docutils literal"><span class="pre">get_axis_types</span></tt></a>()</td>
<td>Similar to <tt class="xref py py-obj docutils literal"><span class="pre">self.wcsprm.axis_types</span></tt> but provides the information in a more Python-friendly format.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.get_naxis" title="astropy.wcs.wcs.WCS.get_naxis"><tt class="xref py py-obj docutils literal"><span class="pre">get_naxis</span></tt></a>(*args,&nbsp;**kwargs)</td>
<td><p class="deprecated">
<span class="versionmodified">Deprecated since version 0.2.</span></p>
</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.p4_pix2foc" title="astropy.wcs.wcs.WCS.p4_pix2foc"><tt class="xref py py-obj docutils literal"><span class="pre">p4_pix2foc</span></tt></a>(*args)</td>
<td>Convert pixel coordinates to focal plane coordinates using <a class="reference external" href="http://www.atnf.csiro.au/people/mcalabre/WCS/index.html">Paper IV</a> table-lookup distortion correction.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.pix2foc" title="astropy.wcs.wcs.WCS.pix2foc"><tt class="xref py py-obj docutils literal"><span class="pre">pix2foc</span></tt></a>(*args)</td>
<td>Convert pixel coordinates to focal plane coordinates using the <a class="reference external" href="http://irsa.ipac.caltech.edu/data/SPITZER/docs/files/spitzer/shupeADASS.pdf">SIP</a> polynomial distortion convention and <a class="reference external" href="http://www.atnf.csiro.au/people/mcalabre/WCS/index.html">Paper IV</a> table-lookup distortion correction.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.printwcs" title="astropy.wcs.wcs.WCS.printwcs"><tt class="xref py py-obj docutils literal"><span class="pre">printwcs</span></tt></a>()</td>
<td>Temporary function for internal use.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.rotateCD" title="astropy.wcs.wcs.WCS.rotateCD"><tt class="xref py py-obj docutils literal"><span class="pre">rotateCD</span></tt></a>(theta)</td>
<td></td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.sip_foc2pix" title="astropy.wcs.wcs.WCS.sip_foc2pix"><tt class="xref py py-obj docutils literal"><span class="pre">sip_foc2pix</span></tt></a>(*args)</td>
<td>Convert focal plane coordinates to pixel coordinates using the <a class="reference external" href="http://irsa.ipac.caltech.edu/data/SPITZER/docs/files/spitzer/shupeADASS.pdf">SIP</a> polynomial distortion convention.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.sip_pix2foc" title="astropy.wcs.wcs.WCS.sip_pix2foc"><tt class="xref py py-obj docutils literal"><span class="pre">sip_pix2foc</span></tt></a>(*args)</td>
<td>Convert pixel coordinates to focal plane coordinates using the <a class="reference external" href="http://irsa.ipac.caltech.edu/data/SPITZER/docs/files/spitzer/shupeADASS.pdf">SIP</a> polynomial distortion convention.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.sub" title="astropy.wcs.wcs.WCS.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.wcs.WCS.to_fits" title="astropy.wcs.wcs.WCS.to_fits"><tt class="xref py py-obj docutils literal"><span class="pre">to_fits</span></tt></a>([relax])</td>
<td>Generate an <a class="reference internal" href="../io/fits/api/hdulists.html#astropy.io.fits.HDUList" title="astropy.io.fits.HDUList"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.io.fits.HDUList</span></tt></a> object with all of the information stored in this object.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.to_header" title="astropy.wcs.wcs.WCS.to_header"><tt class="xref py py-obj docutils literal"><span class="pre">to_header</span></tt></a>([relax])</td>
<td>Generate 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> object with the basic WCS and SIP information stored in this object.</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.to_header_string" title="astropy.wcs.wcs.WCS.to_header_string"><tt class="xref py py-obj docutils literal"><span class="pre">to_header_string</span></tt></a>([relax])</td>
<td>Identical to <a class="reference internal" href="#astropy.wcs.wcs.WCS.to_header" title="astropy.wcs.wcs.WCS.to_header"><tt class="xref py py-obj docutils literal"><span class="pre">to_header</span></tt></a>, but returns a string containing the header cards.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.wcs_pix2sky" title="astropy.wcs.wcs.WCS.wcs_pix2sky"><tt class="xref py py-obj docutils literal"><span class="pre">wcs_pix2sky</span></tt></a>(*args,&nbsp;**kwargs)</td>
<td><p class="deprecated">
<span class="versionmodified">Deprecated since version 0.0.</span></p>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.wcs_pix2world" title="astropy.wcs.wcs.WCS.wcs_pix2world"><tt class="xref py py-obj docutils literal"><span class="pre">wcs_pix2world</span></tt></a>(*args,&nbsp;**kwargs)</td>
<td>Transforms pixel coordinates to world coordinates by doing only the basic <a class="reference external" href="http://www.atnf.csiro.au/~mcalabre/WCS/">wcslib</a> transformation.</td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.wcs_sky2pix" title="astropy.wcs.wcs.WCS.wcs_sky2pix"><tt class="xref py py-obj docutils literal"><span class="pre">wcs_sky2pix</span></tt></a>(*args,&nbsp;**kwargs)</td>
<td><p class="deprecated">
<span class="versionmodified">Deprecated since version 0.0.</span></p>
</td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="#astropy.wcs.wcs.WCS.wcs_world2pix" title="astropy.wcs.wcs.WCS.wcs_world2pix"><tt class="xref py py-obj docutils literal"><span class="pre">wcs_world2pix</span></tt></a>(*args,&nbsp;**kwargs)</td>
<td>Transforms world coordinates to pixel coordinates, using only the basic <a class="reference external" href="http://www.atnf.csiro.au/~mcalabre/WCS/">wcslib</a> WCS transformation.</td>
</tr>
</tbody>
</table>
<p class="rubric">Attributes Documentation</p>
<dl class="attribute">
<dt id="astropy.wcs.wcs.WCS.naxis1">
<tt class="descname">naxis1</tt><a class="headerlink" href="#astropy.wcs.wcs.WCS.naxis1" title="Permalink to this definition">¶</a></dt>
<dd><p class="deprecated">
<span class="versionmodified">Deprecated since version 0.2: </span>The naxis1 attribute is deprecated and may be removed in a future version.</p>
<p></p>
</dd></dl>

<dl class="attribute">
<dt id="astropy.wcs.wcs.WCS.naxis2">
<tt class="descname">naxis2</tt><a class="headerlink" href="#astropy.wcs.wcs.WCS.naxis2" title="Permalink to this definition">¶</a></dt>
<dd><p class="deprecated">
<span class="versionmodified">Deprecated since version 0.2: </span>The naxis2 attribute is deprecated and may be removed in a future version.</p>
<p></p>
</dd></dl>

<p class="rubric">Methods Documentation</p>
<dl class="method">
<dt id="astropy.wcs.wcs.WCS.all_pix2sky">
<tt class="descname">all_pix2sky</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L380" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.all_pix2sky"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.all_pix2sky" title="Permalink to this definition">¶</a></dt>
<dd><p class="deprecated">
<span class="versionmodified">Deprecated since version 0.0: </span>Use all_pix2world instead.</p>
<p></p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.all_pix2world">
<tt class="descname">all_pix2world</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L896" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.all_pix2world"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.all_pix2world" title="Permalink to this definition">¶</a></dt>
<dd><p>Transforms pixel coordinates to world coordinates.</p>
<p>Performs all of the following in order:</p>
<blockquote>
<div><ul class="simple">
<li>Detector to image plane correction (optionally)</li>
<li><a class="reference external" href="http://irsa.ipac.caltech.edu/data/SPITZER/docs/files/spitzer/shupeADASS.pdf">SIP</a> distortion correction (optionally)</li>
<li><a class="reference external" href="http://www.atnf.csiro.au/people/mcalabre/WCS/index.html">Paper IV</a> table-lookup distortion correction (optionally)</li>
<li><a class="reference external" href="http://www.atnf.csiro.au/~mcalabre/WCS/">wcslib</a> WCS transformation</li>
</ul>
</div></blockquote>
<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>args</strong> : flexible</p>
<blockquote>
<div><p>There are two accepted forms for the positional arguments:</p>
<blockquote>
<div><ul class="simple">
<li>2 arguments: An <em>N</em> x <em>naxis</em> array of coordinates, and an
<em>origin</em>.</li>
<li>more than 2 arguments: An array for each axis, followed by
an <em>origin</em>.  These arrays must be broadcastable to one
another.</li>
</ul>
</div></blockquote>
<p>Here, <em>origin</em> is the coordinate in the upper left corner of the
image.  In FITS and Fortran standards, this is 1.  In Numpy and C
standards this is 0.</p>
<p>For a transformation that is not two-dimensional, the
two-argument form must be used.</p>
</div></blockquote>
<p><strong>ra_dec_order</strong> : bool, optional</p>
<blockquote>
<div><p>When <tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt> will ensure that world coordinates are always given
and returned in as (<em>ra</em>, <em>dec</em>) pairs, regardless of the order of
the axes specified by the in the <tt class="docutils literal"><span class="pre">CTYPE</span></tt> keywords.  Default is
<tt class="xref py py-obj docutils literal"><span class="pre">False</span></tt>.</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> : array</p>
<blockquote>
<div><p>Returns the sky coordinates, in degrees.  If the input was a single array and
origin, a single array is returned, otherwise a tuple of arrays is
returned.</p>
</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>Invalid coordinate transformation parameters.</p>
</div></blockquote>
<p><strong>ValueError</strong> :</p>
<blockquote>
<div><p>x- and y-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>
<p class="rubric">Notes</p>
<p>The order of the axes for the result is determined by the
<tt class="xref py py-obj docutils literal"><span class="pre">CTYPEia</span></tt> keywords in the FITS header, therefore it may not
always be of the form (<em>ra</em>, <em>dec</em>).  The
<a class="reference internal" href="astropy.wcs.Wcsprm.html#astropy.wcs.Wcsprm.lat" title="astropy.wcs.Wcsprm.lat"><tt class="xref py py-obj docutils literal"><span class="pre">lat</span></tt></a>, <a class="reference internal" href="astropy.wcs.Wcsprm.html#astropy.wcs.Wcsprm.lng" title="astropy.wcs.Wcsprm.lng"><tt class="xref py py-obj docutils literal"><span class="pre">lng</span></tt></a>,
<a class="reference internal" href="astropy.wcs.Wcsprm.html#astropy.wcs.Wcsprm.lattyp" title="astropy.wcs.Wcsprm.lattyp"><tt class="xref py py-obj docutils literal"><span class="pre">lattyp</span></tt></a> and <a class="reference internal" href="astropy.wcs.Wcsprm.html#astropy.wcs.Wcsprm.lngtyp" title="astropy.wcs.Wcsprm.lngtyp"><tt class="xref py py-obj docutils literal"><span class="pre">lngtyp</span></tt></a>
members can be used to determine the order of the axes.</p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.calcFootprint">
<tt class="descname">calcFootprint</tt><big>(</big><em>header=None</em>, <em>undistort=True</em>, <em>axes=None</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L418" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.calcFootprint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.calcFootprint" title="Permalink to this definition">¶</a></dt>
<dd><p>Calculates the footprint of the image on the sky.</p>
<p>A footprint is defined as the positions of the corners of the
image on the sky after all available distortions have been
applied.</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> : astropy.io.fits header object, optional</p>
<p><strong>undistort</strong> : bool, optional</p>
<blockquote>
<div><p>If <tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt>, take SIP and distortion lookup table into
account</p>
</div></blockquote>
<p><strong>axes</strong> : length 2 sequence ints, optional</p>
<blockquote>
<div><p>If provided, use the given sequence as the shape of the
image.  Otherwise, use the <tt class="docutils literal"><span class="pre">NAXIS1</span></tt> and <tt class="docutils literal"><span class="pre">NAXIS2</span></tt>
keywords from the header that was used to create this
<a class="reference internal" href="#astropy.wcs.wcs.WCS" title="astropy.wcs.wcs.WCS"><tt class="xref py py-obj docutils literal"><span class="pre">WCS</span></tt></a> object.</p>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns :</th><td class="field-body"><p class="first last"><strong>coord</strong> : (4, 2) array of (<em>x</em>, <em>y</em>) coordinates.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.copy">
<tt class="descname">copy</tt><big>(</big><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L392" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.copy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.copy" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a shallow copy of the object.</p>
<p>Convenience method so user doesn&#8217;t have to import the
<tt class="xref py py-mod docutils literal"><span class="pre">copy</span></tt> stdlib module.</p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.deepcopy">
<tt class="descname">deepcopy</tt><big>(</big><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L401" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.deepcopy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.deepcopy" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a deep copy of the object.</p>
<p>Convenience method so user doesn&#8217;t have to import the
<tt class="xref py py-mod docutils literal"><span class="pre">copy</span></tt> stdlib module.</p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.det2im">
<tt class="descname">det2im</tt><big>(</big><em>*args</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L1161" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.det2im"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.det2im" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert detector coordinates to image plane coordinates using
<a class="reference external" href="http://www.atnf.csiro.au/people/mcalabre/WCS/index.html">Paper IV</a> table-lookup distortion correction.</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>args</strong> : flexible</p>
<blockquote>
<div><p>There are two accepted forms for the positional arguments:</p>
<blockquote>
<div><ul class="simple">
<li>2 arguments: An <em>N</em> x <em>2</em> array of coordinates, and an
<em>origin</em>.</li>
<li>more than 2 arguments: An array for each axis, followed by
an <em>origin</em>.  These arrays must be broadcastable to one
another.</li>
</ul>
</div></blockquote>
<p>Here, <em>origin</em> is the coordinate in the upper left corner of the
image.  In FITS and Fortran standards, this is 1.  In Numpy and C
standards this is 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> : array</p>
<blockquote>
<div><p>Returns the pixel coordinates.  If the input was a single array and
origin, a single array is returned, otherwise a tuple of arrays is
returned.</p>
</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>ValueError</strong> :</p>
<blockquote class="last">
<div><p>Invalid coordinate transformation parameters.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.footprint_to_file">
<tt class="descname">footprint_to_file</tt><big>(</big><em>filename=None</em>, <em>color='green'</em>, <em>width=2</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L1391" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.footprint_to_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.footprint_to_file" title="Permalink to this definition">¶</a></dt>
<dd><p>Writes out a <a class="reference external" href="http://hea-www.harvard.edu/RD/ds9/">ds9</a> style regions file. It can be loaded
directly by <a class="reference external" href="http://hea-www.harvard.edu/RD/ds9/">ds9</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>filename</strong> : string, optional</p>
<blockquote>
<div><p>Output file name - default is <tt class="docutils literal"><span class="pre">'footprint.reg'</span></tt></p>
</div></blockquote>
<p><strong>color</strong> : string, optional</p>
<blockquote>
<div><p>Color to use when plotting the line.</p>
</div></blockquote>
<p><strong>width</strong> : int, optional</p>
<blockquote class="last">
<div><p>Width of the region line.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.get_axis_types">
<tt class="descname">get_axis_types</tt><big>(</big><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L1461" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.get_axis_types"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.get_axis_types" title="Permalink to this definition">¶</a></dt>
<dd><p>Similar to <tt class="xref py py-obj docutils literal"><span class="pre">self.wcsprm.axis_types</span></tt>
but provides the information in a more Python-friendly format.</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>result</strong> : list of dicts</p>
<blockquote class="last">
<div><p>Returns a list of dictionaries, one for each axis, each
containing attributes about the type of that axis.</p>
<p>Each dictionary has the following keys:</p>
<ul class="simple">
<li>&#8216;coordinate_type&#8217;:<ul>
<li>None: Non-specific coordinate type.</li>
<li>&#8216;stokes&#8217;: Stokes coordinate.</li>
<li>&#8216;celestial&#8217;: Celestial coordinate (including <tt class="docutils literal"><span class="pre">CUBEFACE</span></tt>).</li>
<li>&#8216;spectral&#8217;: Spectral coordinate.</li>
</ul>
</li>
<li>&#8216;scale&#8217;:<ul>
<li>&#8216;linear&#8217;: Linear axis.</li>
<li>&#8216;quantized&#8217;: Quantized axis (<tt class="docutils literal"><span class="pre">STOKES</span></tt>, <tt class="docutils literal"><span class="pre">CUBEFACE</span></tt>).</li>
<li>&#8216;non-linear celestial&#8217;: Non-linear celestial axis.</li>
<li>&#8216;non-linear spectral&#8217;: Non-linear spectral axis.</li>
<li>&#8216;logarithmic&#8217;: Logarithmic axis.</li>
<li>&#8216;tabular&#8217;: Tabular axis.</li>
</ul>
</li>
<li>&#8216;group&#8217;<ul>
<li>Group number, e.g. lookup table number</li>
</ul>
</li>
<li>&#8216;number&#8217;<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:<ul>
<li>the axis number in a multidimensional table.</li>
</ul>
</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
generate an error.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.get_naxis">
<tt class="descname">get_naxis</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L380" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.get_naxis"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.get_naxis" title="Permalink to this definition">¶</a></dt>
<dd><p class="deprecated">
<span class="versionmodified">Deprecated since version 0.2: </span>This method should not be public</p>
<p></p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.p4_pix2foc">
<tt class="descname">p4_pix2foc</tt><big>(</big><em>*args</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L1135" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.p4_pix2foc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.p4_pix2foc" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert pixel coordinates to focal plane coordinates using
<a class="reference external" href="http://www.atnf.csiro.au/people/mcalabre/WCS/index.html">Paper IV</a> table-lookup distortion correction.</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>args</strong> : flexible</p>
<blockquote>
<div><p>There are two accepted forms for the positional arguments:</p>
<blockquote>
<div><ul class="simple">
<li>2 arguments: An <em>N</em> x <em>2</em> array of coordinates, and an
<em>origin</em>.</li>
<li>more than 2 arguments: An array for each axis, followed by
an <em>origin</em>.  These arrays must be broadcastable to one
another.</li>
</ul>
</div></blockquote>
<p>Here, <em>origin</em> is the coordinate in the upper left corner of the
image.  In FITS and Fortran standards, this is 1.  In Numpy and C
standards this is 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> : array</p>
<blockquote>
<div><p>Returns the focal coordinates.  If the input was a single array and
origin, a single array is returned, otherwise a tuple of arrays is
returned.</p>
</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>ValueError</strong> :</p>
<blockquote class="last">
<div><p>Invalid coordinate transformation parameters.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.pix2foc">
<tt class="descname">pix2foc</tt><big>(</big><em>*args</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L1108" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.pix2foc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.pix2foc" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert pixel coordinates to focal plane coordinates using the
<a class="reference external" href="http://irsa.ipac.caltech.edu/data/SPITZER/docs/files/spitzer/shupeADASS.pdf">SIP</a> polynomial distortion convention and <a class="reference external" href="http://www.atnf.csiro.au/people/mcalabre/WCS/index.html">Paper IV</a>
table-lookup distortion correction.</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>args</strong> : flexible</p>
<blockquote>
<div><p>There are two accepted forms for the positional arguments:</p>
<blockquote>
<div><ul class="simple">
<li>2 arguments: An <em>N</em> x <em>2</em> array of coordinates, and an
<em>origin</em>.</li>
<li>more than 2 arguments: An array for each axis, followed by
an <em>origin</em>.  These arrays must be broadcastable to one
another.</li>
</ul>
</div></blockquote>
<p>Here, <em>origin</em> is the coordinate in the upper left corner of the
image.  In FITS and Fortran standards, this is 1.  In Numpy and C
standards this is 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> : array</p>
<blockquote>
<div><p>Returns the focal coordinates.  If the input was a single array and
origin, a single array is returned, otherwise a tuple of arrays is
returned.</p>
</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>ValueError</strong> :</p>
<blockquote class="last">
<div><p>Invalid coordinate transformation parameters.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.printwcs">
<tt class="descname">printwcs</tt><big>(</big><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L1444" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.printwcs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.printwcs" title="Permalink to this definition">¶</a></dt>
<dd><p>Temporary function for internal use.</p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.rotateCD">
<tt class="descname">rotateCD</tt><big>(</big><em>theta</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L1436" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.rotateCD"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.rotateCD" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.sip_foc2pix">
<tt class="descname">sip_foc2pix</tt><big>(</big><em>*args</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L1226" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.sip_foc2pix"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.sip_foc2pix" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert focal plane coordinates to pixel coordinates using the
<a class="reference external" href="http://irsa.ipac.caltech.edu/data/SPITZER/docs/files/spitzer/shupeADASS.pdf">SIP</a> polynomial distortion convention.</p>
<p><a class="reference external" href="http://www.atnf.csiro.au/people/mcalabre/WCS/index.html">Paper IV</a> table lookup distortion correction is not applied,
even if that information existed in the FITS file that
initialized this <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>args</strong> : flexible</p>
<blockquote>
<div><p>There are two accepted forms for the positional arguments:</p>
<blockquote>
<div><ul class="simple">
<li>2 arguments: An <em>N</em> x <em>2</em> array of coordinates, and an
<em>origin</em>.</li>
<li>more than 2 arguments: An array for each axis, followed by
an <em>origin</em>.  These arrays must be broadcastable to one
another.</li>
</ul>
</div></blockquote>
<p>Here, <em>origin</em> is the coordinate in the upper left corner of the
image.  In FITS and Fortran standards, this is 1.  In Numpy and C
standards this is 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> : array</p>
<blockquote>
<div><p>Returns the pixel coordinates.  If the input was a single array and
origin, a single array is returned, otherwise a tuple of arrays is
returned.</p>
</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>ValueError</strong> :</p>
<blockquote class="last">
<div><p>Invalid coordinate transformation parameters.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.sip_pix2foc">
<tt class="descname">sip_pix2foc</tt><big>(</big><em>*args</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L1187" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.sip_pix2foc"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.sip_pix2foc" title="Permalink to this definition">¶</a></dt>
<dd><p>Convert pixel coordinates to focal plane coordinates using the
<a class="reference external" href="http://irsa.ipac.caltech.edu/data/SPITZER/docs/files/spitzer/shupeADASS.pdf">SIP</a> polynomial distortion convention.</p>
<p><a class="reference external" href="http://www.atnf.csiro.au/people/mcalabre/WCS/index.html">Paper IV</a> table lookup distortion correction is not applied,
even if that information existed in the FITS file that
initialized this <tt class="xref py py-class docutils literal"><span class="pre">WCS</span></tt> object.  To correct
for that, use <tt class="xref py py-obj docutils literal"><span class="pre">pix2foc</span></tt> or
<tt class="xref py py-obj docutils literal"><span class="pre">p4_pix2foc</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">Parameters :</th><td class="field-body"><p class="first"><strong>args</strong> : flexible</p>
<blockquote>
<div><p>There are two accepted forms for the positional arguments:</p>
<blockquote>
<div><ul class="simple">
<li>2 arguments: An <em>N</em> x <em>2</em> array of coordinates, and an
<em>origin</em>.</li>
<li>more than 2 arguments: An array for each axis, followed by
an <em>origin</em>.  These arrays must be broadcastable to one
another.</li>
</ul>
</div></blockquote>
<p>Here, <em>origin</em> is the coordinate in the upper left corner of the
image.  In FITS and Fortran standards, this is 1.  In Numpy and C
standards this is 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> : array</p>
<blockquote>
<div><p>Returns the focal coordinates.  If the input was a single array and
origin, a single array is returned, otherwise a tuple of arrays is
returned.</p>
</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>ValueError</strong> :</p>
<blockquote class="last">
<div><p>Invalid coordinate transformation parameters.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.sub">
<tt class="descname">sub</tt><big>(</big><em>axes</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L410" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.sub"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.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.wcs.WCS.sub" title="astropy.wcs.wcs.WCS.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 <tt class="xref py py-obj docutils literal"><span class="pre">set</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">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.wcs.WCS.to_fits">
<tt class="descname">to_fits</tt><big>(</big><em>relax=False</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L1263" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.to_fits"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.to_fits" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate an <a class="reference internal" href="../io/fits/api/hdulists.html#astropy.io.fits.HDUList" title="astropy.io.fits.HDUList"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.io.fits.HDUList</span></tt></a> object with all of the
information stored in this object.  This should be logically identical
to the input FITS file, but it will be normalized in a number of ways.</p>
<p>See <a class="reference internal" href="#astropy.wcs.wcs.WCS.to_header" title="astropy.wcs.wcs.WCS.to_header"><tt class="xref py py-obj docutils literal"><span class="pre">to_header</span></tt></a> for some warnings about the output produced.</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, 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> (default): Write all extensions that are
considered to be safe and recommended.</li>
<li><tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt>: Write 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 last"><strong>hdulist</strong> : <a class="reference internal" href="../io/fits/api/hdulists.html#astropy.io.fits.HDUList" title="astropy.io.fits.HDUList"><tt class="xref py py-obj docutils literal"><span class="pre">astropy.io.fits.HDUList</span></tt></a></p>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.to_header">
<tt class="descname">to_header</tt><big>(</big><em>relax=False</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L1301" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.to_header"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.to_header" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate 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> object with the basic WCS and SIP
information stored in this object.  This should be logically
identical to the input FITS file, but it will be normalized in
a number of ways.</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">This function does not write out Paper IV distortion
information, since that requires multiple FITS header data
units.  To get a full representation of everything in this
object, use <a class="reference internal" href="#astropy.wcs.wcs.WCS.to_fits" title="astropy.wcs.wcs.WCS.to_fits"><tt class="xref py py-obj docutils literal"><span class="pre">to_fits</span></tt></a>.</p>
</div>
<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, 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> (default): Write all extensions that are
considered to be safe and recommended.</li>
<li><tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt>: Write 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 last"><strong>header</strong> : <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></p>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Notes</p>
<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 <tt class="xref py py-obj docutils literal"><span class="pre">fix</span></tt> 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.wcs.WCS.to_header" title="astropy.wcs.wcs.WCS.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>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.to_header_string">
<tt class="descname">to_header_string</tt><big>(</big><em>relax=False</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L1384" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.to_header_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.to_header_string" title="Permalink to this definition">¶</a></dt>
<dd><p>Identical to <a class="reference internal" href="#astropy.wcs.wcs.WCS.to_header" title="astropy.wcs.wcs.WCS.to_header"><tt class="xref py py-obj docutils literal"><span class="pre">to_header</span></tt></a>, but returns a string containing the
header cards.</p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.wcs_pix2sky">
<tt class="descname">wcs_pix2sky</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L380" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.wcs_pix2sky"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.wcs_pix2sky" title="Permalink to this definition">¶</a></dt>
<dd><p class="deprecated">
<span class="versionmodified">Deprecated since version 0.0: </span>Use wcs_pix2world instead.</p>
<p></p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.wcs_pix2world">
<tt class="descname">wcs_pix2world</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L968" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.wcs_pix2world"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.wcs_pix2world" title="Permalink to this definition">¶</a></dt>
<dd><p>Transforms pixel coordinates to world coordinates by doing
only the basic <a class="reference external" href="http://www.atnf.csiro.au/~mcalabre/WCS/">wcslib</a> transformation.</p>
<p>No <a class="reference external" href="http://irsa.ipac.caltech.edu/data/SPITZER/docs/files/spitzer/shupeADASS.pdf">SIP</a> or <a class="reference external" href="http://www.atnf.csiro.au/people/mcalabre/WCS/index.html">Paper IV</a> table lookup distortion correction is
applied.  To perform distortion correction, see
<tt class="xref py py-obj docutils literal"><span class="pre">all_pix2world</span></tt>,
<tt class="xref py py-obj docutils literal"><span class="pre">sip_pix2foc</span></tt>, <tt class="xref py py-obj docutils literal"><span class="pre">p4_pix2foc</span></tt>,
or <tt class="xref py py-obj docutils literal"><span class="pre">pix2foc</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">Parameters :</th><td class="field-body"><p class="first"><strong>args</strong> : flexible</p>
<blockquote>
<div><p>There are two accepted forms for the positional arguments:</p>
<blockquote>
<div><ul class="simple">
<li>2 arguments: An <em>N</em> x <em>naxis</em> array of coordinates, and an
<em>origin</em>.</li>
<li>more than 2 arguments: An array for each axis, followed by
an <em>origin</em>.  These arrays must be broadcastable to one
another.</li>
</ul>
</div></blockquote>
<p>Here, <em>origin</em> is the coordinate in the upper left corner of the
image.  In FITS and Fortran standards, this is 1.  In Numpy and C
standards this is 0.</p>
<p>For a transformation that is not two-dimensional, the
two-argument form must be used.</p>
</div></blockquote>
<p><strong>ra_dec_order</strong> : bool, optional</p>
<blockquote>
<div><p>When <tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt> will ensure that world coordinates are always given
and returned in as (<em>ra</em>, <em>dec</em>) pairs, regardless of the order of
the axes specified by the in the <tt class="docutils literal"><span class="pre">CTYPE</span></tt> keywords.  Default is
<tt class="xref py py-obj docutils literal"><span class="pre">False</span></tt>.</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> : array</p>
<blockquote>
<div><p>Returns the world coordinates, in degrees.  If the input was a single array and
origin, a single array is returned, otherwise a tuple of arrays is
returned.</p>
</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>Invalid coordinate transformation parameters.</p>
</div></blockquote>
<p><strong>ValueError</strong> :</p>
<blockquote>
<div><p>x- and y-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>
<p class="rubric">Notes</p>
<p>The order of the axes for the result is determined by the
<tt class="xref py py-obj docutils literal"><span class="pre">CTYPEia</span></tt> keywords in the FITS header, therefore it may not
always be of the form (<em>ra</em>, <em>dec</em>).  The
<a class="reference internal" href="astropy.wcs.Wcsprm.html#astropy.wcs.Wcsprm.lat" title="astropy.wcs.Wcsprm.lat"><tt class="xref py py-obj docutils literal"><span class="pre">lat</span></tt></a>, <a class="reference internal" href="astropy.wcs.Wcsprm.html#astropy.wcs.Wcsprm.lng" title="astropy.wcs.Wcsprm.lng"><tt class="xref py py-obj docutils literal"><span class="pre">lng</span></tt></a>,
<a class="reference internal" href="astropy.wcs.Wcsprm.html#astropy.wcs.Wcsprm.lattyp" title="astropy.wcs.Wcsprm.lattyp"><tt class="xref py py-obj docutils literal"><span class="pre">lattyp</span></tt></a> and <a class="reference internal" href="astropy.wcs.Wcsprm.html#astropy.wcs.Wcsprm.lngtyp" title="astropy.wcs.Wcsprm.lngtyp"><tt class="xref py py-obj docutils literal"><span class="pre">lngtyp</span></tt></a>
members can be used to determine the order of the axes.</p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.wcs_sky2pix">
<tt class="descname">wcs_sky2pix</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L380" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.wcs_sky2pix"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.wcs_sky2pix" title="Permalink to this definition">¶</a></dt>
<dd><p class="deprecated">
<span class="versionmodified">Deprecated since version 0.0: </span>Use wcs_world2pix instead.</p>
<p></p>
</dd></dl>

<dl class="method">
<dt id="astropy.wcs.wcs.WCS.wcs_world2pix">
<tt class="descname">wcs_world2pix</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference external" href="http://github.com/astropy/astropy/tree/v0.2.4/astropy/wcs/wcs.py#L1041" title="Push the Edit button on the next page"><span class="edit-on-github viewcode-link">&nbsp;[edit on github]</span></a><a class="reference internal" href="../_modules/astropy/wcs/wcs.html#WCS.wcs_world2pix"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#astropy.wcs.wcs.WCS.wcs_world2pix" title="Permalink to this definition">¶</a></dt>
<dd><p>Transforms world coordinates to pixel coordinates, using only
the basic <a class="reference external" href="http://www.atnf.csiro.au/~mcalabre/WCS/">wcslib</a> WCS transformation.  No <a class="reference external" href="http://irsa.ipac.caltech.edu/data/SPITZER/docs/files/spitzer/shupeADASS.pdf">SIP</a> or <a class="reference external" href="http://www.atnf.csiro.au/people/mcalabre/WCS/index.html">Paper
IV</a> table lookup distortion is applied.</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>args</strong> : flexible</p>
<blockquote>
<div><p>There are two accepted forms for the positional arguments:</p>
<blockquote>
<div><ul class="simple">
<li>2 arguments: An <em>N</em> x <em>naxis</em> array of coordinates, and an
<em>origin</em>.</li>
<li>more than 2 arguments: An array for each axis, followed by
an <em>origin</em>.  These arrays must be broadcastable to one
another.</li>
</ul>
</div></blockquote>
<p>Here, <em>origin</em> is the coordinate in the upper left corner of the
image.  In FITS and Fortran standards, this is 1.  In Numpy and C
standards this is 0.</p>
<p>For a transformation that is not two-dimensional, the
two-argument form must be used.</p>
</div></blockquote>
<p><strong>ra_dec_order</strong> : bool, optional</p>
<blockquote>
<div><p>When <tt class="xref py py-obj docutils literal"><span class="pre">True</span></tt> will ensure that world coordinates are always given
and returned in as (<em>ra</em>, <em>dec</em>) pairs, regardless of the order of
the axes specified by the in the <tt class="docutils literal"><span class="pre">CTYPE</span></tt> keywords.  Default is
<tt class="xref py py-obj docutils literal"><span class="pre">False</span></tt>.</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> : array</p>
<blockquote>
<div><p>Returns the pixel coordinates.  If the input was a single array and
origin, a single array is returned, otherwise a tuple of arrays is
returned.</p>
</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>Invalid coordinate transformation parameters.</p>
</div></blockquote>
<p><strong>ValueError</strong> :</p>
<blockquote>
<div><p>x- and y-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>
<p class="rubric">Notes</p>
<p>The order of the axes for the input world array is determined by
the <tt class="xref py py-obj docutils literal"><span class="pre">CTYPEia</span></tt> keywords in the FITS header, therefore it may
not always be of the form (<em>ra</em>, <em>dec</em>).  The
<a class="reference internal" href="astropy.wcs.Wcsprm.html#astropy.wcs.Wcsprm.lat" title="astropy.wcs.Wcsprm.lat"><tt class="xref py py-obj docutils literal"><span class="pre">lat</span></tt></a>, <a class="reference internal" href="astropy.wcs.Wcsprm.html#astropy.wcs.Wcsprm.lng" title="astropy.wcs.Wcsprm.lng"><tt class="xref py py-obj docutils literal"><span class="pre">lng</span></tt></a>,
<a class="reference internal" href="astropy.wcs.Wcsprm.html#astropy.wcs.Wcsprm.lattyp" title="astropy.wcs.Wcsprm.lattyp"><tt class="xref py py-obj docutils literal"><span class="pre">lattyp</span></tt></a> and <a class="reference internal" href="astropy.wcs.Wcsprm.html#astropy.wcs.Wcsprm.lngtyp" title="astropy.wcs.Wcsprm.lngtyp"><tt class="xref py py-obj docutils literal"><span class="pre">lngtyp</span></tt></a>
members can be used to determine the order of the axes.</p>
</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="#">WCS</a></li>
</ul>


        </div>
      </div>
      <div class="clearer"></div>
    </div>
<footer class="footer">
  <p class="pull-right">
    <a href="../_sources/_generated/astropy.wcs.wcs.WCS.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>