Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > acb94a8b2a4b1c8c2a966ed9ee99ffe4 > files > 283

lib64wcs-devel-4.18-2.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/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>WCSLIB 4.18: wcs.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">WCSLIB 4.18
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_af99bb3c152a306abd27951285ad1127.html">C</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">wcs.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="lin_8h_source.html">lin.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="cel_8h_source.html">cel.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="spc_8h_source.html">spc.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="tab_8h_source.html">tab.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="wcserr_8h_source.html">wcserr.h</a>&quot;</code><br/>
</div>
<p><a href="wcs_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpvcard.html">pvcard</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Store for <code><b>PV</b>i<b>_</b>ma</code> keyrecords.  <a href="structpvcard.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structpscard.html">pscard</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Store for <code><b>PS</b>i<b>_</b>ma</code> keyrecords.  <a href="structpscard.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwtbarr.html">wtbarr</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Extraction of coordinate lookup tables from BINTABLE.  <a href="structwtbarr.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwcsprm.html">wcsprm</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Coordinate transformation parameters.  <a href="structwcsprm.html#details">More...</a><br/></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a0653c98b8a1bee5755740ae3f4854094"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a0653c98b8a1bee5755740ae3f4854094">WCSSUB_LONGITUDE</a>&#160;&#160;&#160;0x1001</td></tr>
<tr class="memdesc:a0653c98b8a1bee5755740ae3f4854094"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mask for extraction of longitude axis by <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct. ">wcssub()</a>.  <a href="#a0653c98b8a1bee5755740ae3f4854094">More...</a><br/></td></tr>
<tr class="separator:a0653c98b8a1bee5755740ae3f4854094"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d377c202850ee0eaf44b3e989d0736e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a5d377c202850ee0eaf44b3e989d0736e">WCSSUB_LATITUDE</a>&#160;&#160;&#160;0x1002</td></tr>
<tr class="memdesc:a5d377c202850ee0eaf44b3e989d0736e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mask for extraction of latitude axis by <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct. ">wcssub()</a>.  <a href="#a5d377c202850ee0eaf44b3e989d0736e">More...</a><br/></td></tr>
<tr class="separator:a5d377c202850ee0eaf44b3e989d0736e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22bbac394b025c4cfc7bd73b6d6e3962"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a22bbac394b025c4cfc7bd73b6d6e3962">WCSSUB_CUBEFACE</a>&#160;&#160;&#160;0x1004</td></tr>
<tr class="memdesc:a22bbac394b025c4cfc7bd73b6d6e3962"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mask for extraction of <b><code>CUBEFACE</code></b> axis by <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct. ">wcssub()</a>.  <a href="#a22bbac394b025c4cfc7bd73b6d6e3962">More...</a><br/></td></tr>
<tr class="separator:a22bbac394b025c4cfc7bd73b6d6e3962"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9885b02031ff7aa7b094f4a1edee2cd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#ab9885b02031ff7aa7b094f4a1edee2cd">WCSSUB_CELESTIAL</a>&#160;&#160;&#160;0x1007</td></tr>
<tr class="memdesc:ab9885b02031ff7aa7b094f4a1edee2cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mask for extraction of celestial axes by <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct. ">wcssub()</a>.  <a href="#ab9885b02031ff7aa7b094f4a1edee2cd">More...</a><br/></td></tr>
<tr class="separator:ab9885b02031ff7aa7b094f4a1edee2cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b2dfca2e80fe80ba85dc830cd9c377b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a4b2dfca2e80fe80ba85dc830cd9c377b">WCSSUB_SPECTRAL</a>&#160;&#160;&#160;0x1008</td></tr>
<tr class="memdesc:a4b2dfca2e80fe80ba85dc830cd9c377b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mask for extraction of spectral axis by <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct. ">wcssub()</a>.  <a href="#a4b2dfca2e80fe80ba85dc830cd9c377b">More...</a><br/></td></tr>
<tr class="separator:a4b2dfca2e80fe80ba85dc830cd9c377b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ba6d2640572b12a11e3558fa75a01ed"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a6ba6d2640572b12a11e3558fa75a01ed">WCSSUB_STOKES</a>&#160;&#160;&#160;0x1010</td></tr>
<tr class="memdesc:a6ba6d2640572b12a11e3558fa75a01ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mask for extraction of <b><code>STOKES</code></b> axis by <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct. ">wcssub()</a>.  <a href="#a6ba6d2640572b12a11e3558fa75a01ed">More...</a><br/></td></tr>
<tr class="separator:a6ba6d2640572b12a11e3558fa75a01ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6852f6dd2883c82296f1108b897d337e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a6852f6dd2883c82296f1108b897d337e">WCSLEN</a>&#160;&#160;&#160;(sizeof(struct <a class="el" href="structwcsprm.html">wcsprm</a>)/sizeof(int))</td></tr>
<tr class="memdesc:a6852f6dd2883c82296f1108b897d337e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size of the wcsprm struct in int units.  <a href="#a6852f6dd2883c82296f1108b897d337e">More...</a><br/></td></tr>
<tr class="separator:a6852f6dd2883c82296f1108b897d337e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac55946dadc53ac592cb686275902ae7b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#ac55946dadc53ac592cb686275902ae7b">wcscopy</a>(alloc, wcssrc, wcsdst)&#160;&#160;&#160;<a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64">wcssub</a>(alloc, wcssrc, 0x0, 0x0, wcsdst)</td></tr>
<tr class="memdesc:ac55946dadc53ac592cb686275902ae7b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy routine for the wcsprm struct.  <a href="#ac55946dadc53ac592cb686275902ae7b">More...</a><br/></td></tr>
<tr class="separator:ac55946dadc53ac592cb686275902ae7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1bcf49cfe1ed1bb2bc4c930f98d808fa"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a1bcf49cfe1ed1bb2bc4c930f98d808fa">wcsini_errmsg</a>&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td></tr>
<tr class="memdesc:a1bcf49cfe1ed1bb2bc4c930f98d808fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated.  <a href="#a1bcf49cfe1ed1bb2bc4c930f98d808fa">More...</a><br/></td></tr>
<tr class="separator:a1bcf49cfe1ed1bb2bc4c930f98d808fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a465ef3c77aaf546324dae0692e6de7fe"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a465ef3c77aaf546324dae0692e6de7fe">wcssub_errmsg</a>&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td></tr>
<tr class="memdesc:a465ef3c77aaf546324dae0692e6de7fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated.  <a href="#a465ef3c77aaf546324dae0692e6de7fe">More...</a><br/></td></tr>
<tr class="separator:a465ef3c77aaf546324dae0692e6de7fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1738854472218541bda531653ef2709"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#ae1738854472218541bda531653ef2709">wcscopy_errmsg</a>&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td></tr>
<tr class="memdesc:ae1738854472218541bda531653ef2709"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated.  <a href="#ae1738854472218541bda531653ef2709">More...</a><br/></td></tr>
<tr class="separator:ae1738854472218541bda531653ef2709"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d64b57cec404114c75bd25a562e8053"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a3d64b57cec404114c75bd25a562e8053">wcsfree_errmsg</a>&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td></tr>
<tr class="memdesc:a3d64b57cec404114c75bd25a562e8053"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated.  <a href="#a3d64b57cec404114c75bd25a562e8053">More...</a><br/></td></tr>
<tr class="separator:a3d64b57cec404114c75bd25a562e8053"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f5c31a6983b17abbe2fead61550d55c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a8f5c31a6983b17abbe2fead61550d55c">wcsprt_errmsg</a>&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td></tr>
<tr class="memdesc:a8f5c31a6983b17abbe2fead61550d55c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated.  <a href="#a8f5c31a6983b17abbe2fead61550d55c">More...</a><br/></td></tr>
<tr class="separator:a8f5c31a6983b17abbe2fead61550d55c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84a67c964e212bbf004c264b3ca70fee"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a84a67c964e212bbf004c264b3ca70fee">wcsset_errmsg</a>&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td></tr>
<tr class="memdesc:a84a67c964e212bbf004c264b3ca70fee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated.  <a href="#a84a67c964e212bbf004c264b3ca70fee">More...</a><br/></td></tr>
<tr class="separator:a84a67c964e212bbf004c264b3ca70fee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade3959355dc9d0987e7ccc4070795c38"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#ade3959355dc9d0987e7ccc4070795c38">wcsp2s_errmsg</a>&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td></tr>
<tr class="memdesc:ade3959355dc9d0987e7ccc4070795c38"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated.  <a href="#ade3959355dc9d0987e7ccc4070795c38">More...</a><br/></td></tr>
<tr class="separator:ade3959355dc9d0987e7ccc4070795c38"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37c4884cf58baf25b2984ec3bccb80a5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a37c4884cf58baf25b2984ec3bccb80a5">wcss2p_errmsg</a>&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td></tr>
<tr class="memdesc:a37c4884cf58baf25b2984ec3bccb80a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated.  <a href="#a37c4884cf58baf25b2984ec3bccb80a5">More...</a><br/></td></tr>
<tr class="separator:a37c4884cf58baf25b2984ec3bccb80a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfbadc770489b6b5186b95eaa35467f1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#acfbadc770489b6b5186b95eaa35467f1">wcsmix_errmsg</a>&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td></tr>
<tr class="memdesc:acfbadc770489b6b5186b95eaa35467f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deprecated.  <a href="#acfbadc770489b6b5186b95eaa35467f1">More...</a><br/></td></tr>
<tr class="separator:acfbadc770489b6b5186b95eaa35467f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a158615aa1622d8feedd228795ff9a25f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25f">wcs_errmsg_enum</a> { <br/>
&#160;&#160;<a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25fa8b87c21d4a2cab41d4eea0a95378fca8">WCSERR_SUCCESS</a> = 0, 
<a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25fac51c733d8a719dd698f9e96e9a4fa83f">WCSERR_NULL_POINTER</a> = 1, 
<a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25fa5c58d5530bc7577a70185376c15180af">WCSERR_MEMORY</a> = 2, 
<a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25fa2904278d916c820236347783312a7ce0">WCSERR_SINGULAR_MTX</a> = 3, 
<br/>
&#160;&#160;<a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25fa598db0fcc4961aa3c5e0a296bec2b313">WCSERR_BAD_CTYPE</a> = 4, 
<a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25fafe9ed842ea8f525c7b8fed2f60015dd9">WCSERR_BAD_PARAM</a> = 5, 
<a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25fa71cb7eaa633d9e0f560555a016f1f007">WCSERR_BAD_COORD_TRANS</a> = 6, 
<a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25fadfa2a8cf8021827378091315b8e0a020">WCSERR_ILL_COORD_TRANS</a> = 7, 
<br/>
&#160;&#160;<a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25fa08306533cf0c7555dad662e82e8a4a69">WCSERR_BAD_PIX</a> = 8, 
<a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25fa03824b7b5c22e5f0cc91363eb695a804">WCSERR_BAD_WORLD</a> = 9, 
<a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25fa5d662102c172495df1f9bb03cedd701d">WCSERR_BAD_WORLD_COORD</a> = 10, 
<a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25fa832122bb304560f92df91e391d55948a">WCSERR_NO_SOLUTION</a> = 11, 
<br/>
&#160;&#160;<a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25fa88e600163f719a759d3569bf1548109e">WCSERR_BAD_SUBIMAGE</a> = 12, 
<a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25fa37c8aa0aedc12c63df08f39cb7177ff7">WCSERR_NON_SEPARABLE</a> = 13
<br/>
 }</td></tr>
<tr class="separator:a158615aa1622d8feedd228795ff9a25f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a42b2578d76ace7ca6114d82b7ae46a89"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a42b2578d76ace7ca6114d82b7ae46a89">wcsnpv</a> (int n)</td></tr>
<tr class="memdesc:a42b2578d76ace7ca6114d82b7ae46a89"><td class="mdescLeft">&#160;</td><td class="mdescRight">Memory allocation for <code><b>PV</b>i<b>_</b>ma</code>.  <a href="#a42b2578d76ace7ca6114d82b7ae46a89">More...</a><br/></td></tr>
<tr class="separator:a42b2578d76ace7ca6114d82b7ae46a89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae790c9ce6c9b7a4845cf1c3c97b1e97a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#ae790c9ce6c9b7a4845cf1c3c97b1e97a">wcsnps</a> (int n)</td></tr>
<tr class="memdesc:ae790c9ce6c9b7a4845cf1c3c97b1e97a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Memory allocation for <code><b>PS</b>i<b>_</b>ma</code>.  <a href="#ae790c9ce6c9b7a4845cf1c3c97b1e97a">More...</a><br/></td></tr>
<tr class="separator:ae790c9ce6c9b7a4845cf1c3c97b1e97a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2afc8255fde0965dddaa374463666d45"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45">wcsini</a> (int alloc, int naxis, struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs)</td></tr>
<tr class="memdesc:a2afc8255fde0965dddaa374463666d45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor for the wcsprm struct.  <a href="#a2afc8255fde0965dddaa374463666d45">More...</a><br/></td></tr>
<tr class="separator:a2afc8255fde0965dddaa374463666d45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a864c99fef9f3eee29085ce42d0ee0d64"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64">wcssub</a> (int alloc, const struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcssrc, int *nsub, int axes[], struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcsdst)</td></tr>
<tr class="memdesc:a864c99fef9f3eee29085ce42d0ee0d64"><td class="mdescLeft">&#160;</td><td class="mdescRight">Subimage extraction routine for the wcsprm struct.  <a href="#a864c99fef9f3eee29085ce42d0ee0d64">More...</a><br/></td></tr>
<tr class="separator:a864c99fef9f3eee29085ce42d0ee0d64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ab38bc642c4656f62c43acf84a849f1"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a4ab38bc642c4656f62c43acf84a849f1">wcsfree</a> (struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs)</td></tr>
<tr class="memdesc:a4ab38bc642c4656f62c43acf84a849f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor for the wcsprm struct.  <a href="#a4ab38bc642c4656f62c43acf84a849f1">More...</a><br/></td></tr>
<tr class="separator:a4ab38bc642c4656f62c43acf84a849f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9aeb8cf1afb1bfb22e989580d90fca8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#ab9aeb8cf1afb1bfb22e989580d90fca8">wcsprt</a> (const struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs)</td></tr>
<tr class="memdesc:ab9aeb8cf1afb1bfb22e989580d90fca8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print routine for the wcsprm struct.  <a href="#ab9aeb8cf1afb1bfb22e989580d90fca8">More...</a><br/></td></tr>
<tr class="separator:ab9aeb8cf1afb1bfb22e989580d90fca8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8fe5dcd9927240dc0348b850ee662367"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a8fe5dcd9927240dc0348b850ee662367">wcsperr</a> (const struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs, const char *prefix)</td></tr>
<tr class="memdesc:a8fe5dcd9927240dc0348b850ee662367"><td class="mdescLeft">&#160;</td><td class="mdescRight">Print error messages from a wcsprm struct.  <a href="#a8fe5dcd9927240dc0348b850ee662367">More...</a><br/></td></tr>
<tr class="separator:a8fe5dcd9927240dc0348b850ee662367"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5cc3f5d249755583403cdf54d2ebb91"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91">wcsset</a> (struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs)</td></tr>
<tr class="memdesc:ae5cc3f5d249755583403cdf54d2ebb91"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setup routine for the wcsprm struct.  <a href="#ae5cc3f5d249755583403cdf54d2ebb91">More...</a><br/></td></tr>
<tr class="separator:ae5cc3f5d249755583403cdf54d2ebb91"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27d3dd209db3e76cf4c50f48c01ba986"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a27d3dd209db3e76cf4c50f48c01ba986">wcsp2s</a> (struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs, int ncoord, int nelem, const double pixcrd[], double imgcrd[], double phi[], double theta[], double world[], int stat[])</td></tr>
<tr class="memdesc:a27d3dd209db3e76cf4c50f48c01ba986"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pixel-to-world transformation.  <a href="#a27d3dd209db3e76cf4c50f48c01ba986">More...</a><br/></td></tr>
<tr class="separator:a27d3dd209db3e76cf4c50f48c01ba986"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60673d05a3513659ac848a9cb3d0cb07"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a60673d05a3513659ac848a9cb3d0cb07">wcss2p</a> (struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs, int ncoord, int nelem, const double world[], double phi[], double theta[], double imgcrd[], double pixcrd[], int stat[])</td></tr>
<tr class="memdesc:a60673d05a3513659ac848a9cb3d0cb07"><td class="mdescLeft">&#160;</td><td class="mdescRight">World-to-pixel transformation.  <a href="#a60673d05a3513659ac848a9cb3d0cb07">More...</a><br/></td></tr>
<tr class="separator:a60673d05a3513659ac848a9cb3d0cb07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3f00b876c8212d43f32a51feeadaa81"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#af3f00b876c8212d43f32a51feeadaa81">wcsmix</a> (struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs, int mixpix, int mixcel, const double vspan[], double vstep, int viter, double world[], double phi[], double theta[], double imgcrd[], double pixcrd[])</td></tr>
<tr class="memdesc:af3f00b876c8212d43f32a51feeadaa81"><td class="mdescLeft">&#160;</td><td class="mdescRight">Hybrid coordinate transformation.  <a href="#af3f00b876c8212d43f32a51feeadaa81">More...</a><br/></td></tr>
<tr class="separator:af3f00b876c8212d43f32a51feeadaa81"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57975833fe0588eb7c7b6d79f13a7693"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a57975833fe0588eb7c7b6d79f13a7693">wcssptr</a> (struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs, int *i, char ctype[9])</td></tr>
<tr class="memdesc:a57975833fe0588eb7c7b6d79f13a7693"><td class="mdescLeft">&#160;</td><td class="mdescRight">Spectral axis translation.  <a href="#a57975833fe0588eb7c7b6d79f13a7693">More...</a><br/></td></tr>
<tr class="separator:a57975833fe0588eb7c7b6d79f13a7693"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:ad16bd8db875ee05b014429efdc1f3471"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a> []</td></tr>
<tr class="memdesc:ad16bd8db875ee05b014429efdc1f3471"><td class="mdescLeft">&#160;</td><td class="mdescRight">Status return messages.  <a href="#ad16bd8db875ee05b014429efdc1f3471">More...</a><br/></td></tr>
<tr class="separator:ad16bd8db875ee05b014429efdc1f3471"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>These routines implement the FITS World Coordinate System (WCS) standard which defines methods to be used for computing world coordinates from image pixel coordinates, and vice versa. They are based on the wcsprm struct which contains all information needed for the computations. The struct contains some members that must be set by the user, and others that are maintained by these routines, somewhat like a C++ class but with no encapsulation.</p>
<p>Three routines, <a class="el" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct. ">wcsini()</a>, <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct. ">wcssub()</a>, and <a class="el" href="wcs_8h.html#a4ab38bc642c4656f62c43acf84a849f1" title="Destructor for the wcsprm struct. ">wcsfree()</a> are provided to manage the wcsprm struct and another, <a class="el" href="wcs_8h.html#ab9aeb8cf1afb1bfb22e989580d90fca8" title="Print routine for the wcsprm struct. ">wcsprt()</a>, to prints its contents. Refer to the description of the wcsprm struct for an explanation of the anticipated usage of these routines. <a class="el" href="wcs_8h.html#ac55946dadc53ac592cb686275902ae7b" title="Copy routine for the wcsprm struct. ">wcscopy()</a>, which does a deep copy of one wcsprm struct to another, is defined as a preprocessor macro function that invokes <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct. ">wcssub()</a>.</p>
<p><a class="el" href="wcs_8h.html#a8fe5dcd9927240dc0348b850ee662367" title="Print error messages from a wcsprm struct. ">wcsperr()</a> prints the error message(s) (if any) stored in a wcsprm struct, and the linprm, celprm, prjprm, spcprm, and tabprm structs that it contains.</p>
<p>A setup routine, <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct. ">wcsset()</a>, computes intermediate values in the wcsprm struct from parameters in it that were supplied by the user. The struct always needs to be set up by <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct. ">wcsset()</a> but this need not be called explicitly - refer to the explanation of <a class="el" href="structwcsprm.html#a35bff8de85e5a8892e1b68db69ca7a68">wcsprm::flag</a>.</p>
<p><a class="el" href="wcs_8h.html#a27d3dd209db3e76cf4c50f48c01ba986" title="Pixel-to-world transformation. ">wcsp2s()</a> and <a class="el" href="wcs_8h.html#a60673d05a3513659ac848a9cb3d0cb07" title="World-to-pixel transformation. ">wcss2p()</a> implement the WCS world coordinate transformations. In fact, they are high level driver routines for the WCS linear, logarithmic, celestial, spectral and tabular transformation routines described in <a class="el" href="lin_8h.html">lin.h</a>, <a class="el" href="log_8h.html">log.h</a>, <a class="el" href="cel_8h.html">cel.h</a>, <a class="el" href="spc_8h.html">spc.h</a> and <a class="el" href="tab_8h.html">tab.h</a>.</p>
<p>Given either the celestial longitude or latitude plus an element of the pixel coordinate a hybrid routine, <a class="el" href="wcs_8h.html#af3f00b876c8212d43f32a51feeadaa81" title="Hybrid coordinate transformation. ">wcsmix()</a>, iteratively solves for the unknown elements.</p>
<p><a class="el" href="wcs_8h.html#a57975833fe0588eb7c7b6d79f13a7693" title="Spectral axis translation. ">wcssptr()</a> translates the spectral axis in a wcsprm struct. For example, a '<code><b>FREQ</b></code>' axis may be translated into <code><b>'ZOPT-F2W'</b></code> and vice versa.</p>
<p><b>Quadcube projections:</b> <br/>
 The quadcube projections (<code><b>TSC</b></code>, <code><b>CSC</b></code>, <code><b>QSC</b></code>) may be represented in FITS in either of two ways:</p>
<p>a: The six faces may be laid out in one plane and numbered as follows: </p>
<div class="fragment"><div class="line">         0</div>
<div class="line"></div>
<div class="line">4  3  2  1  4  3  2</div>
<div class="line"></div>
<div class="line">         5</div>
</div><!-- fragment --><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>
<p>b: The "COBE" convention in which the six faces are stored in a three-dimensional structure using a <code><b>CUBEFACE</b></code> axis indexed from 0 to 5 as above.</p>
<p>These routines support both methods; <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct. ">wcsset()</a> determines which is being used by the presence or absence of a <code><b>CUBEFACE</b></code> axis in ctype[]. <a class="el" href="wcs_8h.html#a27d3dd209db3e76cf4c50f48c01ba986" title="Pixel-to-world transformation. ">wcsp2s()</a> and <a class="el" href="wcs_8h.html#a60673d05a3513659ac848a9cb3d0cb07" title="World-to-pixel transformation. ">wcss2p()</a> translate the <code><b>CUBEFACE</b></code> axis representation to the single plane representation understood by the lower-level WCSLIB projection routines. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a0653c98b8a1bee5755740ae3f4854094"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSSUB_LONGITUDE&#160;&#160;&#160;0x1001</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Mask to use for extracting the longitude axis when sub-imaging, refer to the <em>axes</em> argument of <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct. ">wcssub()</a>. </p>

</div>
</div>
<a class="anchor" id="a5d377c202850ee0eaf44b3e989d0736e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSSUB_LATITUDE&#160;&#160;&#160;0x1002</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Mask to use for extracting the latitude axis when sub-imaging, refer to the <em>axes</em> argument of <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct. ">wcssub()</a>. </p>

</div>
</div>
<a class="anchor" id="a22bbac394b025c4cfc7bd73b6d6e3962"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSSUB_CUBEFACE&#160;&#160;&#160;0x1004</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Mask to use for extracting the <b><code>CUBEFACE</code></b> axis when sub-imaging, refer to the <em>axes</em> argument of <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct. ">wcssub()</a>. </p>

</div>
</div>
<a class="anchor" id="ab9885b02031ff7aa7b094f4a1edee2cd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSSUB_CELESTIAL&#160;&#160;&#160;0x1007</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Mask to use for extracting the celestial axes (longitude, latitude and cubeface) when sub-imaging, refer to the <em>axes</em> argument of <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct. ">wcssub()</a>. </p>

</div>
</div>
<a class="anchor" id="a4b2dfca2e80fe80ba85dc830cd9c377b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSSUB_SPECTRAL&#160;&#160;&#160;0x1008</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Mask to use for extracting the spectral axis when sub-imaging, refer to the <em>axes</em> argument of <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct. ">wcssub()</a>. </p>

</div>
</div>
<a class="anchor" id="a6ba6d2640572b12a11e3558fa75a01ed"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSSUB_STOKES&#160;&#160;&#160;0x1010</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Mask to use for extracting the <b><code>STOKES</code></b> axis when sub-imaging, refer to the <em>axes</em> argument of <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct. ">wcssub()</a>. </p>

</div>
</div>
<a class="anchor" id="a6852f6dd2883c82296f1108b897d337e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSLEN&#160;&#160;&#160;(sizeof(struct <a class="el" href="structwcsprm.html">wcsprm</a>)/sizeof(int))</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Size of the wcsprm struct in <em>int</em> units, used by the Fortran wrappers. </p>

</div>
</div>
<a class="anchor" id="ac55946dadc53ac592cb686275902ae7b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wcscopy</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">alloc, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">wcssrc, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">wcsdst&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;<a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64">wcssub</a>(alloc, wcssrc, 0x0, 0x0, wcsdst)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcscopy</b>() does a deep copy of one wcsprm struct to another. As of WCSLIB 3.6, it is implemented as a preprocessor macro that invokes <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct. ">wcssub()</a> with the nsub and axes pointers both set to zero. </p>

</div>
</div>
<a class="anchor" id="a1bcf49cfe1ed1bb2bc4c930f98d808fa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wcsini_errmsg&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000031">Deprecated:</a></b></dt><dd>Added for backwards compatibility, use <a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471" title="Status return messages. ">wcs_errmsg</a> directly now instead. </dd></dl>

</div>
</div>
<a class="anchor" id="a465ef3c77aaf546324dae0692e6de7fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wcssub_errmsg&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000032">Deprecated:</a></b></dt><dd>Added for backwards compatibility, use <a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471" title="Status return messages. ">wcs_errmsg</a> directly now instead. </dd></dl>

</div>
</div>
<a class="anchor" id="ae1738854472218541bda531653ef2709"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wcscopy_errmsg&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000033">Deprecated:</a></b></dt><dd>Added for backwards compatibility, use <a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471" title="Status return messages. ">wcs_errmsg</a> directly now instead. </dd></dl>

</div>
</div>
<a class="anchor" id="a3d64b57cec404114c75bd25a562e8053"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wcsfree_errmsg&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000034">Deprecated:</a></b></dt><dd>Added for backwards compatibility, use <a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471" title="Status return messages. ">wcs_errmsg</a> directly now instead. </dd></dl>

</div>
</div>
<a class="anchor" id="a8f5c31a6983b17abbe2fead61550d55c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wcsprt_errmsg&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000035">Deprecated:</a></b></dt><dd>Added for backwards compatibility, use <a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471" title="Status return messages. ">wcs_errmsg</a> directly now instead. </dd></dl>

</div>
</div>
<a class="anchor" id="a84a67c964e212bbf004c264b3ca70fee"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wcsset_errmsg&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000036">Deprecated:</a></b></dt><dd>Added for backwards compatibility, use <a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471" title="Status return messages. ">wcs_errmsg</a> directly now instead. </dd></dl>

</div>
</div>
<a class="anchor" id="ade3959355dc9d0987e7ccc4070795c38"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wcsp2s_errmsg&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000037">Deprecated:</a></b></dt><dd>Added for backwards compatibility, use <a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471" title="Status return messages. ">wcs_errmsg</a> directly now instead. </dd></dl>

</div>
</div>
<a class="anchor" id="a37c4884cf58baf25b2984ec3bccb80a5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wcss2p_errmsg&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000038">Deprecated:</a></b></dt><dd>Added for backwards compatibility, use <a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471" title="Status return messages. ">wcs_errmsg</a> directly now instead. </dd></dl>

</div>
</div>
<a class="anchor" id="acfbadc770489b6b5186b95eaa35467f1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define wcsmix_errmsg&#160;&#160;&#160;<a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471">wcs_errmsg</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000039">Deprecated:</a></b></dt><dd>Added for backwards compatibility, use <a class="el" href="wcs_8h.html#ad16bd8db875ee05b014429efdc1f3471" title="Status return messages. ">wcs_errmsg</a> directly now instead. </dd></dl>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="a158615aa1622d8feedd228795ff9a25f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25f">wcs_errmsg_enum</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="a158615aa1622d8feedd228795ff9a25fa8b87c21d4a2cab41d4eea0a95378fca8"></a>WCSERR_SUCCESS</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a158615aa1622d8feedd228795ff9a25fac51c733d8a719dd698f9e96e9a4fa83f"></a>WCSERR_NULL_POINTER</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a158615aa1622d8feedd228795ff9a25fa5c58d5530bc7577a70185376c15180af"></a>WCSERR_MEMORY</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a158615aa1622d8feedd228795ff9a25fa2904278d916c820236347783312a7ce0"></a>WCSERR_SINGULAR_MTX</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a158615aa1622d8feedd228795ff9a25fa598db0fcc4961aa3c5e0a296bec2b313"></a>WCSERR_BAD_CTYPE</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a158615aa1622d8feedd228795ff9a25fafe9ed842ea8f525c7b8fed2f60015dd9"></a>WCSERR_BAD_PARAM</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a158615aa1622d8feedd228795ff9a25fa71cb7eaa633d9e0f560555a016f1f007"></a>WCSERR_BAD_COORD_TRANS</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a158615aa1622d8feedd228795ff9a25fadfa2a8cf8021827378091315b8e0a020"></a>WCSERR_ILL_COORD_TRANS</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a158615aa1622d8feedd228795ff9a25fa08306533cf0c7555dad662e82e8a4a69"></a>WCSERR_BAD_PIX</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a158615aa1622d8feedd228795ff9a25fa03824b7b5c22e5f0cc91363eb695a804"></a>WCSERR_BAD_WORLD</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a158615aa1622d8feedd228795ff9a25fa5d662102c172495df1f9bb03cedd701d"></a>WCSERR_BAD_WORLD_COORD</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a158615aa1622d8feedd228795ff9a25fa832122bb304560f92df91e391d55948a"></a>WCSERR_NO_SOLUTION</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a158615aa1622d8feedd228795ff9a25fa88e600163f719a759d3569bf1548109e"></a>WCSERR_BAD_SUBIMAGE</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="a158615aa1622d8feedd228795ff9a25fa37c8aa0aedc12c63df08f39cb7177ff7"></a>WCSERR_NON_SEPARABLE</em>&nbsp;</td><td class="fielddoc">
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a42b2578d76ace7ca6114d82b7ae46a89"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcsnpv </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcsnpv</b>() changes the value of NPVMAX (default 64). This global variable controls the number of <code><b>PV</b>i<b>_</b>ma</code> keywords that <a class="el" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct. ">wcsini()</a> should allocate space for.</p>
<p><b>PLEASE NOTE:</b> This function is not thread-safe.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Value of NPVMAX; ignored if &lt; 0.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Current value of NPVMAX. </dd></dl>

</div>
</div>
<a class="anchor" id="ae790c9ce6c9b7a4845cf1c3c97b1e97a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcsnps </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>n</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcsnps</b>() changes the values of NPSMAX (default 8). This global variable controls the number of <code><b>PS</b>i<b>_</b>ma</code> keywords that <a class="el" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct. ">wcsini()</a> should allocate space for.</p>
<p><b>PLEASE NOTE:</b> This function is not thread-safe.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>Value of NPSMAX; ignored if &lt; 0.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Current value of NPSMAX. </dd></dl>

</div>
</div>
<a class="anchor" id="a2afc8255fde0965dddaa374463666d45"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcsini </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>alloc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>naxis</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> *&#160;</td>
          <td class="paramname"><em>wcs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcsini</b>() optionally allocates memory for arrays in a wcsprm struct and sets all members of the struct to default values. Memory is allocated for up to NPVMAX <code><b>PV</b>i<b>_</b>ma</code> keywords or NPSMAX <code><b>PS</b>i<b>_</b>ma</code> keywords per WCS representation. These may be changed via <a class="el" href="wcs_8h.html#a42b2578d76ace7ca6114d82b7ae46a89" title="Memory allocation for PVi_ma. ">wcsnpv()</a> and <a class="el" href="wcs_8h.html#ae790c9ce6c9b7a4845cf1c3c97b1e97a" title="Memory allocation for PSi_ma. ">wcsnps()</a> before <b>wcsini</b>() is called.</p>
<p><b>PLEASE NOTE:</b> every wcsprm struct should be initialized by <b>wcsini</b>(), possibly repeatedly. On the first invokation, and only the first invokation, <a class="el" href="structwcsprm.html#a35bff8de85e5a8892e1b68db69ca7a68">wcsprm::flag</a> must be set to -1 to initialize memory management, regardless of whether <b>wcsini</b>() will actually be used to allocate memory.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">alloc</td><td>If true, allocate memory unconditionally for the crpix, etc. arrays. <br/>
 If false, it is assumed that pointers to these arrays have been set by the user except if they are null pointers in which case memory will be allocated for them regardless. (In other words, setting alloc true saves having to initalize these pointers to zero.) </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">naxis</td><td>The number of world coordinate axes. This is used to determine the length of the various wcsprm vectors and matrices and therefore the amount of memory to allocate for them.</td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">wcs</td><td>Coordinate transformation parameters. <br/>
 Note that, in order to initialize memory management, <a class="el" href="structwcsprm.html#a35bff8de85e5a8892e1b68db69ca7a68">wcsprm::flag</a> should be set to -1 when wcs is initialized for the first time (memory leaks may result if it had already been initialized).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null wcsprm pointer passed.</li>
<li>2: Memory allocation failed.</li>
</ul>
For returns &gt; 1, a detailed error message is set in <a class="el" href="structwcsprm.html#af54ce939604be183231f0ee006e2f8ed">wcsprm::err</a> if enabled, see <a class="el" href="wcserr_8h.html#a1691b8bd184d40ca6fda255be078fa53" title="Enable/disable error messaging. ">wcserr_enable()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a864c99fef9f3eee29085ce42d0ee0d64"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcssub </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>alloc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct <a class="el" href="structwcsprm.html">wcsprm</a> *&#160;</td>
          <td class="paramname"><em>wcssrc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>nsub</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>axes</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> *&#160;</td>
          <td class="paramname"><em>wcsdst</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcssub</b>() extracts the coordinate description for a subimage from a wcsprm struct. It does a deep copy, using <a class="el" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct. ">wcsini()</a> to allocate memory for its arrays if required. Only the "information to be provided" part of the struct is extracted; a call to <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct. ">wcsset()</a> is required to set up the remainder.</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 <code><b>PC</b>i<b>_</b>ja</code> 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>Note that while the required elements of the tabprm array are extracted, the wtbarr array is not. (Thus it is not appropriate to call <b>wcssub</b>() after <a class="el" href="wcshdr_8h.html#a6dd857f7b61a5b349cc8af5a4b6d8a1c" title="Tabular construction routine. ">wcstab()</a> but before filling the tabprm structs - refer to <a class="el" href="wcshdr_8h.html">wcshdr.h</a>.)</p>
<p><b>wcssub</b>() can also add axes to a wcsprm struct. The new axes will be created using the defaults set by <a class="el" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct. ">wcsini()</a> which produce a simple, unnamed, linear axis with world coordinate equal to the pixel coordinate. These default values can be changed in before invoking <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct. ">wcsset()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">alloc</td><td>If true, allocate memory for the crpix, etc. arrays in the destination. Otherwise, it is assumed that pointers to these arrays have been set by the user except if they are null pointers in which case memory will be allocated for them regardless. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">wcssrc</td><td>Struct to extract from.</td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">nsub</td><td></td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">axes</td><td>Vector of length *nsub containing the image axis numbers (1-relative) to extract. Order is significant; axes[0] is the axis number of the input image that corresponds to the first axis in the subimage, etc. <br/>
 Use an axis number of 0 to create a new axis using the defaults set by <a class="el" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct. ">wcsini()</a>. <br/>
 nsub (the pointer) may be set to zero, and so also may nsub, to indicate the number of axes in the input image; the number of axes will be returned if nsub != 0x0. axes itself (the pointer) may be set to zero to indicate the first *nsub axes in their original order. <br/>
 Set both nsub and axes to zero to do a deep copy of one wcsprm struct to another. <br/>
 Subimage extraction by coordinate axis type may be done by setting the elements of axes[] to the following special preprocessor macro values: <br/>
<ul>
<li>WCSSUB_LONGITUDE: Celestial longitude.</li>
<li>WCSSUB_LATITUDE: Celestial latitude.</li>
<li>WCSSUB_CUBEFACE: Quadcube <code><b>CUBEFACE</b></code> axis.</li>
<li>WCSSUB_SPECTRAL: Spectral axis.</li>
<li>WCSSUB_STOKES: Stokes axis.</li>
</ul>
Refer to the notes (below) for further usage examples. <br/>
 On return, *nsub will contain the number of axes in the subimage; this may be zero if there were no axes of the required type(s) (in which case no memory will be allocated). axes[] will contain the axis numbers that were extracted, or 0 for newly created axes. The vector length must be sufficient to contain all axis numbers. No checks are performed to verify that the coordinate axes are consistent, this is done by <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct. ">wcsset()</a>. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">wcsdst</td><td>Struct describing the subimage. <a class="el" href="structwcsprm.html#a35bff8de85e5a8892e1b68db69ca7a68">wcsprm::flag</a> should be set to -1 if wcsdst was not previously initialized (memory leaks may result if it was previously initialized).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null wcsprm pointer passed.</li>
<li>2: Memory allocation failed.</li>
<li>12: Invalid subimage specification.</li>
<li>13: Non-separable subimage coordinate system.</li>
</ul>
For returns &gt; 1, a detailed error message is set in <a class="el" href="structwcsprm.html#af54ce939604be183231f0ee006e2f8ed">wcsprm::err</a> if enabled, see <a class="el" href="wcserr_8h.html#a1691b8bd184d40ca6fda255be078fa53" title="Enable/disable error messaging. ">wcserr_enable()</a>.</dd></dl>
<p><b>Notes:</b> <br/>
 Combinations of subimage axes of particular types may be extracted in the same order as they occur in the input image by combining preprocessor codes, for example </p>
<div class="fragment"><div class="line"> nsub = 1;</div>
<div class="line">axes[0] = <a class="code" href="wcs_8h.html#a0653c98b8a1bee5755740ae3f4854094" title="Mask for extraction of longitude axis by wcssub(). ">WCSSUB_LONGITUDE</a> | <a class="code" href="wcs_8h.html#a5d377c202850ee0eaf44b3e989d0736e" title="Mask for extraction of latitude axis by wcssub(). ">WCSSUB_LATITUDE</a> | <a class="code" href="wcs_8h.html#a4b2dfca2e80fe80ba85dc830cd9c377b" title="Mask for extraction of spectral axis by wcssub(). ">WCSSUB_SPECTRAL</a>;</div>
</div><!-- fragment --><p>would extract the longitude, latitude, and spectral axes in the same order as the input image. If one of each were present, *nsub = 3 would be returned.</p>
<p>For convenience, WCSSUB_CELESTIAL is defined as the combination WCSSUB_LONGITUDE | WCSSUB_LATITUDE | WCSSUB_CUBEFACE.</p>
<p>The codes may also be negated to extract all but the types specified, for example </p>
<div class="fragment"><div class="line"> nsub = 4;</div>
<div class="line">axes[0] = <a class="code" href="wcs_8h.html#a0653c98b8a1bee5755740ae3f4854094" title="Mask for extraction of longitude axis by wcssub(). ">WCSSUB_LONGITUDE</a>;</div>
<div class="line">axes[1] = <a class="code" href="wcs_8h.html#a5d377c202850ee0eaf44b3e989d0736e" title="Mask for extraction of latitude axis by wcssub(). ">WCSSUB_LATITUDE</a>;</div>
<div class="line">axes[2] = <a class="code" href="wcs_8h.html#a22bbac394b025c4cfc7bd73b6d6e3962" title="Mask for extraction of CUBEFACE axis by wcssub(). ">WCSSUB_CUBEFACE</a>;</div>
<div class="line">axes[3] = -(<a class="code" href="wcs_8h.html#a4b2dfca2e80fe80ba85dc830cd9c377b" title="Mask for extraction of spectral axis by wcssub(). ">WCSSUB_SPECTRAL</a> | <a class="code" href="wcs_8h.html#a6ba6d2640572b12a11e3558fa75a01ed" title="Mask for extraction of STOKES axis by wcssub(). ">WCSSUB_STOKES</a>);</div>
</div><!-- fragment --><p>The last of these specifies all axis types other than spectral or Stokes. Extraction is done in the order specified by axes[] a longitude axis (if present) would be extracted first (via axes[0]) and not subsequently (via axes[3]). Likewise for the latitude and cubeface axes in this example.</p>
<p>From the foregoing, it is apparent that the value of *nsub returned may be less than or greater than that given. However, it will never exceed the number of axes in the input image (plus the number of newly-created axes if any were specified on input). </p>

</div>
</div>
<a class="anchor" id="a4ab38bc642c4656f62c43acf84a849f1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcsfree </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> *&#160;</td>
          <td class="paramname"><em>wcs</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcsfree</b>() frees memory allocated for the wcsprm arrays by <a class="el" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct. ">wcsini()</a> and/or <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct. ">wcsset()</a>. <a class="el" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct. ">wcsini()</a> records the memory it allocates and <b>wcsfree</b>() will only attempt to free this.</p>
<p><b>PLEASE NOTE:</b> <b>wcsfree</b>() must not be invoked on a wcsprm struct that was not initialized by <a class="el" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct. ">wcsini()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[out]</td><td class="paramname">wcs</td><td>Coordinate transformation parameters.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null wcsprm pointer passed. </li>
</ul>
</dd></dl>

</div>
</div>
<a class="anchor" id="ab9aeb8cf1afb1bfb22e989580d90fca8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcsprt </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structwcsprm.html">wcsprm</a> *&#160;</td>
          <td class="paramname"><em>wcs</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcsprt</b>() prints the contents of a wcsprm struct using <a class="el" href="wcsprintf_8h.html#a46950abaf5a27347da8160741f98f973" title="Print function used by WCSLIB diagnostic routines. ">wcsprintf()</a>. Mainly intended for diagnostic purposes.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">wcs</td><td>Coordinate transformation parameters.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null wcsprm pointer passed. </li>
</ul>
</dd></dl>

</div>
</div>
<a class="anchor" id="a8fe5dcd9927240dc0348b850ee662367"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcsperr </td>
          <td>(</td>
          <td class="paramtype">const struct <a class="el" href="structwcsprm.html">wcsprm</a> *&#160;</td>
          <td class="paramname"><em>wcs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>prefix</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcsperr</b>() prints the error message(s), if any, stored in a wcsprm struct, and the linprm, celprm, prjprm, spcprm, and tabprm structs that it contains. If there are no errors then nothing is printed. It uses <a class="el" href="wcserr_8h.html#a6585b9fc3a59b369e3336f3133dd1ca9" title="Print a wcserr struct. ">wcserr_prt()</a>, q.v.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">wcs</td><td>Coordinate transformation parameters. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">prefix</td><td>If non-NULL, each output line will be prefixed with this string.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null wcsprm pointer passed. </li>
</ul>
</dd></dl>

</div>
</div>
<a class="anchor" id="ae5cc3f5d249755583403cdf54d2ebb91"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcsset </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> *&#160;</td>
          <td class="paramname"><em>wcs</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcsset</b>() sets up a wcsprm struct according to information supplied within it (refer to the description of the wcsprm struct).</p>
<p><b>wcsset</b>() recognizes the <code><b>NCP</b></code> projection and converts it to the equivalent <code><b>SIN</b></code> projection and likewise translates <code><b>GLS</b></code> into <code><b>SFL</b></code>. It also translates the AIPS spectral types (<code><b>'FREQ-LSR'</b></code>, <code><b>'FELO-HEL'</b></code>, etc.), possibly changing the input header keywords <a class="el" href="structwcsprm.html#ae1f462606974e1324cd38f143eda691e">wcsprm::ctype</a> and/or <a class="el" href="structwcsprm.html#ac089e5d0e3191255ceaea7f8591b27ea">wcsprm::specsys</a> if necessary.</p>
<p>Note that this routine need not be called directly; it will be invoked by <a class="el" href="wcs_8h.html#a27d3dd209db3e76cf4c50f48c01ba986" title="Pixel-to-world transformation. ">wcsp2s()</a> and <a class="el" href="wcs_8h.html#a60673d05a3513659ac848a9cb3d0cb07" title="World-to-pixel transformation. ">wcss2p()</a> if the <a class="el" href="structwcsprm.html#a35bff8de85e5a8892e1b68db69ca7a68">wcsprm::flag</a> is anything other than a predefined magic value.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">wcs</td><td>Coordinate transformation parameters.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null wcsprm pointer passed.</li>
<li>2: Memory allocation failed.</li>
<li>3: Linear transformation matrix is singular.</li>
<li>4: Inconsistent or unrecognized coordinate axis types.</li>
<li>5: Invalid parameter value.</li>
<li>6: Invalid coordinate transformation parameters.</li>
<li>7: Ill-conditioned coordinate transformation parameters.</li>
</ul>
For returns &gt; 1, a detailed error message is set in <a class="el" href="structwcsprm.html#af54ce939604be183231f0ee006e2f8ed">wcsprm::err</a> if enabled, see <a class="el" href="wcserr_8h.html#a1691b8bd184d40ca6fda255be078fa53" title="Enable/disable error messaging. ">wcserr_enable()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a27d3dd209db3e76cf4c50f48c01ba986"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcsp2s </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> *&#160;</td>
          <td class="paramname"><em>wcs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ncoord</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nelem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double&#160;</td>
          <td class="paramname"><em>pixcrd</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>imgcrd</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>phi</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>theta</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>world</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>stat</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcsp2s</b>() transforms pixel coordinates to world coordinates.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">wcs</td><td>Coordinate transformation parameters.</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ncoord,nelem</td><td>The number of coordinates, each of vector length nelem but containing wcs.naxis coordinate elements. Thus nelem must equal or exceed the value of the <code><b>NAXIS</b></code> keyword unless ncoord == 1, in which case nelem is not used. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">pixcrd</td><td>Array of pixel coordinates.</td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">imgcrd</td><td>Array of intermediate world coordinates. For celestial axes, imgcrd[][wcs.lng] and imgcrd[][wcs.lat] are the projected <img class="formulaInl" alt="$x$" src="form_30.png"/>-, and <img class="formulaInl" alt="$y$" src="form_31.png"/>-coordinates in pseudo "degrees". For spectral axes, imgcrd[][wcs.spec] is the intermediate spectral coordinate, in SI units. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">phi,theta</td><td>Longitude and latitude in the native coordinate system of the projection [deg]. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">world</td><td>Array of world coordinates. For celestial axes, world[][wcs.lng] and world[][wcs.lat] are the celestial longitude and latitude [deg]. For spectral axes, imgcrd[][wcs.spec] is the intermediate spectral coordinate, in SI units. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">stat</td><td>Status return value for each coordinate:<ul>
<li>0: Success.</li>
<li>1+: A bit mask indicating invalid pixel coordinate element(s).</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null wcsprm pointer passed.</li>
<li>2: Memory allocation failed.</li>
<li>3: Linear transformation matrix is singular.</li>
<li>4: Inconsistent or unrecognized coordinate axis types.</li>
<li>5: Invalid parameter value.</li>
<li>6: Invalid coordinate transformation parameters.</li>
<li>7: Ill-conditioned coordinate transformation parameters.</li>
<li>8: One or more of the pixel coordinates were invalid, as indicated by the stat vector.</li>
</ul>
For returns &gt; 1, a detailed error message is set in <a class="el" href="structwcsprm.html#af54ce939604be183231f0ee006e2f8ed">wcsprm::err</a> if enabled, see <a class="el" href="wcserr_8h.html#a1691b8bd184d40ca6fda255be078fa53" title="Enable/disable error messaging. ">wcserr_enable()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a60673d05a3513659ac848a9cb3d0cb07"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcss2p </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> *&#160;</td>
          <td class="paramname"><em>wcs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ncoord</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nelem</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double&#160;</td>
          <td class="paramname"><em>world</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>phi</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>theta</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>imgcrd</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>pixcrd</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>stat</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcss2p</b>() transforms world coordinates to pixel coordinates.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">wcs</td><td>Coordinate transformation parameters.</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ncoord,nelem</td><td>The number of coordinates, each of vector length nelem but containing wcs.naxis coordinate elements. Thus nelem must equal or exceed the value of the <code><b>NAXIS</b></code> keyword unless ncoord == 1, in which case nelem is not used. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">world</td><td>Array of world coordinates. For celestial axes, world[][wcs.lng] and world[][wcs.lat] are the celestial longitude and latitude [deg]. For spectral axes, world[][wcs.spec] is the spectral coordinate, in SI units.</td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">phi,theta</td><td>Longitude and latitude in the native coordinate system of the projection [deg]. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">imgcrd</td><td>Array of intermediate world coordinates. For celestial axes, imgcrd[][wcs.lng] and imgcrd[][wcs.lat] are the projected <img class="formulaInl" alt="$x$" src="form_30.png"/>-, and <img class="formulaInl" alt="$y$" src="form_31.png"/>-coordinates in pseudo "degrees". For quadcube projections with a <code><b>CUBEFACE</b></code> axis the face number is also returned in imgcrd[][wcs.cubeface]. For spectral axes, imgcrd[][wcs.spec] is the intermediate spectral coordinate, in SI units. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">pixcrd</td><td>Array of pixel coordinates. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">stat</td><td>Status return value for each coordinate:<ul>
<li>0: Success.</li>
<li>1+: A bit mask indicating invalid world coordinate element(s).</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null wcsprm pointer passed.</li>
<li>2: Memory allocation failed.</li>
<li>3: Linear transformation matrix is singular.</li>
<li>4: Inconsistent or unrecognized coordinate axis types.</li>
<li>5: Invalid parameter value.</li>
<li>6: Invalid coordinate transformation parameters.</li>
<li>7: Ill-conditioned coordinate transformation parameters.</li>
<li>9: One or more of the world coordinates were invalid, as indicated by the stat vector.</li>
</ul>
For returns &gt; 1, a detailed error message is set in <a class="el" href="structwcsprm.html#af54ce939604be183231f0ee006e2f8ed">wcsprm::err</a> if enabled, see <a class="el" href="wcserr_8h.html#a1691b8bd184d40ca6fda255be078fa53" title="Enable/disable error messaging. ">wcserr_enable()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="af3f00b876c8212d43f32a51feeadaa81"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcsmix </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> *&#160;</td>
          <td class="paramname"><em>wcs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>mixpix</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>mixcel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double&#160;</td>
          <td class="paramname"><em>vspan</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>vstep</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>viter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>world</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>phi</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>theta</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>imgcrd</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>pixcrd</em>[]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcsmix</b>(), 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="el" href="wcs_8h.html#a60673d05a3513659ac848a9cb3d0cb07" title="World-to-pixel transformation. ">wcss2p()</a>. Refer also to the notes below.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">wcs</td><td>Indices for the celestial coordinates obtained by parsing the <a class="el" href="structwcsprm.html#ae1f462606974e1324cd38f143eda691e">wcsprm::ctype</a>[].</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">mixpix</td><td>Which element of the pixel coordinate is given. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">mixcel</td><td>Which element of the celestial coordinate is given:<ul>
<li>1: Celestial longitude is given in world[wcs.lng], latitude returned in world[wcs.lat].</li>
<li>2: Celestial latitude is given in world[wcs.lat], longitude returned in world[wcs.lng]. </li>
</ul>
</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">vspan</td><td>Solution interval for the celestial coordinate [deg]. The ordering of the two limits is irrelevant. Longitude ranges may be specified with any convenient normalization, for example [-120,+120] is the same as [240,480], except that the solution will be returned with the same normalization, i.e. lie within the interval specified. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">vstep</td><td>Step size for solution search [deg]. If zero, a sensible, although perhaps non-optimal default will be used. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">viter</td><td>If a solution is not found then the step size will be halved and the search recommenced. viter controls how many times the step size is halved. The allowed range is 5 - 10.</td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">world</td><td>World coordinate elements. world[wcs.lng] and world[wcs.lat] are the celestial longitude and latitude [deg]. Which is given and which returned depends on the value of mixcel. All other elements are given.</td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">phi,theta</td><td>Longitude and latitude in the native coordinate system of the projection [deg]. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">imgcrd</td><td>Image coordinate elements. imgcrd[wcs.lng] and imgcrd[wcs.lat] are the projected <img class="formulaInl" alt="$x$" src="form_30.png"/>-, and <img class="formulaInl" alt="$y$" src="form_31.png"/>-coordinates in pseudo "degrees".</td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">pixcrd</td><td>Pixel coordinate. The element indicated by mixpix is given and the remaining elements are returned.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null wcsprm pointer passed.</li>
<li>2: Memory allocation failed.</li>
<li>3: Linear transformation matrix is singular.</li>
<li>4: Inconsistent or unrecognized coordinate axis types.</li>
<li>5: Invalid parameter value.</li>
<li>6: Invalid coordinate transformation parameters.</li>
<li>7: Ill-conditioned coordinate transformation parameters.</li>
<li>10: Invalid world coordinate.</li>
<li>11: No solution found in the specified interval.</li>
</ul>
For returns &gt; 1, a detailed error message is set in <a class="el" href="structwcsprm.html#af54ce939604be183231f0ee006e2f8ed">wcsprm::err</a> if enabled, see <a class="el" href="wcserr_8h.html#a1691b8bd184d40ca6fda255be078fa53" title="Enable/disable error messaging. ">wcserr_enable()</a>.</dd></dl>
<p><b>Notes:</b> <br/>
 Initially the specified solution interval is checked to see if it's a "crossing" interval. If it isn'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 "regula falsi" division of the crossing interval. If no crossing interval was found within the specified solution interval then a search is made for a "non-crossing" 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 invokations of <b>wcsmix</b>() 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 <b>wcsmix</b>() only ever returns one.</p>
<p>Because of its generality <b>wcsmix</b>() 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>

</div>
</div>
<a class="anchor" id="a57975833fe0588eb7c7b6d79f13a7693"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcssptr </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> *&#160;</td>
          <td class="paramname"><em>wcs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>i</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>ctype</em>[9]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcssptr</b>() translates the spectral axis in a wcsprm struct. For example, a '<code><b>FREQ</b></code>' axis may be translated into <code><b>'ZOPT-F2W'</b></code> and vice versa.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">wcs</td><td>Coordinate transformation parameters. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">i</td><td>Index of the spectral axis (0-relative). If given &lt; 0 it will be set to the first spectral axis identified from the ctype[] keyvalues in the wcsprm struct. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">ctype</td><td>Desired spectral <code><b>CTYPE</b>ia</code>. Wildcarding may be used as for the ctypeS2 argument to <a class="el" href="spc_8h.html#a467e30a1edcf29d6a096f29f8710395b">spctrn()</a> as described in the prologue of <a class="el" href="spc_8h.html">spc.h</a>, i.e. if the final three characters are specified as "???", or if just the eighth character is specified as '?', the correct algorithm code will be substituted and returned.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null wcsprm pointer passed.</li>
<li>2: Memory allocation failed.</li>
<li>3: Linear transformation matrix is singular.</li>
<li>4: Inconsistent or unrecognized coordinate axis types.</li>
<li>5: Invalid parameter value.</li>
<li>6: Invalid coordinate transformation parameters.</li>
<li>7: Ill-conditioned coordinate transformation parameters.</li>
<li>12: Invalid subimage specification (no spectral axis).</li>
</ul>
For returns &gt; 1, a detailed error message is set in <a class="el" href="structwcsprm.html#af54ce939604be183231f0ee006e2f8ed">wcsprm::err</a> if enabled, see <a class="el" href="wcserr_8h.html#a1691b8bd184d40ca6fda255be078fa53" title="Enable/disable error messaging. ">wcserr_enable()</a>. </dd></dl>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="ad16bd8db875ee05b014429efdc1f3471"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char * wcs_errmsg[]</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Error messages to match the status value returned from each function. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sat Jul 13 2013 20:00:26 for WCSLIB 4.18 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>