wcslib (8.2.2)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>WCSLIB: 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="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.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 id="projectrow">
<td id="projectalign">
<div id="projectname">WCSLIB<span id="projectnumber"> 8.2.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</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> |
<a href="#define-members">Macros</a> |
<a href="#enum-members">Enumerations</a> |
<a href="#func-members">Functions</a> |
<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 "<a class="el" href="lin_8h_source.html">lin.h</a>"</code><br />
<code>#include "<a class="el" href="cel_8h_source.html">cel.h</a>"</code><br />
<code>#include "<a class="el" href="spc_8h_source.html">spc.h</a>"</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 id="nested-classes" name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structpvcard.html">pvcard</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </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"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structpscard.html">pscard</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </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"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structauxprm.html">auxprm</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Additional auxiliary parameters. <a href="structauxprm.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structwcsprm.html">wcsprm</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </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"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a0653c98b8a1bee5755740ae3f4854094" id="r_a0653c98b8a1bee5755740ae3f4854094"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a0653c98b8a1bee5755740ae3f4854094">WCSSUB_LONGITUDE</a>   0x1001</td></tr>
<tr class="memdesc:a0653c98b8a1bee5755740ae3f4854094"><td class="mdescLeft"> </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>. <br /></td></tr>
<tr class="separator:a0653c98b8a1bee5755740ae3f4854094"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a5d377c202850ee0eaf44b3e989d0736e" id="r_a5d377c202850ee0eaf44b3e989d0736e"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a5d377c202850ee0eaf44b3e989d0736e">WCSSUB_LATITUDE</a>   0x1002</td></tr>
<tr class="memdesc:a5d377c202850ee0eaf44b3e989d0736e"><td class="mdescLeft"> </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>. <br /></td></tr>
<tr class="separator:a5d377c202850ee0eaf44b3e989d0736e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a22bbac394b025c4cfc7bd73b6d6e3962" id="r_a22bbac394b025c4cfc7bd73b6d6e3962"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a22bbac394b025c4cfc7bd73b6d6e3962">WCSSUB_CUBEFACE</a>   0x1004</td></tr>
<tr class="memdesc:a22bbac394b025c4cfc7bd73b6d6e3962"><td class="mdescLeft"> </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>. <br /></td></tr>
<tr class="separator:a22bbac394b025c4cfc7bd73b6d6e3962"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab9885b02031ff7aa7b094f4a1edee2cd" id="r_ab9885b02031ff7aa7b094f4a1edee2cd"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#ab9885b02031ff7aa7b094f4a1edee2cd">WCSSUB_CELESTIAL</a>   0x1007</td></tr>
<tr class="memdesc:ab9885b02031ff7aa7b094f4a1edee2cd"><td class="mdescLeft"> </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>. <br /></td></tr>
<tr class="separator:ab9885b02031ff7aa7b094f4a1edee2cd"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4b2dfca2e80fe80ba85dc830cd9c377b" id="r_a4b2dfca2e80fe80ba85dc830cd9c377b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a4b2dfca2e80fe80ba85dc830cd9c377b">WCSSUB_SPECTRAL</a>   0x1008</td></tr>
<tr class="memdesc:a4b2dfca2e80fe80ba85dc830cd9c377b"><td class="mdescLeft"> </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>. <br /></td></tr>
<tr class="separator:a4b2dfca2e80fe80ba85dc830cd9c377b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6ba6d2640572b12a11e3558fa75a01ed" id="r_a6ba6d2640572b12a11e3558fa75a01ed"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a6ba6d2640572b12a11e3558fa75a01ed">WCSSUB_STOKES</a>   0x1010</td></tr>
<tr class="memdesc:a6ba6d2640572b12a11e3558fa75a01ed"><td class="mdescLeft"> </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>. <br /></td></tr>
<tr class="separator:a6ba6d2640572b12a11e3558fa75a01ed"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aac7a03c3bcf06926891a1badaa1e52e8" id="r_aac7a03c3bcf06926891a1badaa1e52e8"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#aac7a03c3bcf06926891a1badaa1e52e8">WCSSUB_TIME</a>   0x1020</td></tr>
<tr class="separator:aac7a03c3bcf06926891a1badaa1e52e8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a232a0e8d0de3d599955e6eaef74067bc" id="r_a232a0e8d0de3d599955e6eaef74067bc"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a232a0e8d0de3d599955e6eaef74067bc">WCSCOMPARE_ANCILLARY</a>   0x0001</td></tr>
<tr class="separator:a232a0e8d0de3d599955e6eaef74067bc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a22cc4f926c4cd495e45dfb773a6498d3" id="r_a22cc4f926c4cd495e45dfb773a6498d3"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a22cc4f926c4cd495e45dfb773a6498d3">WCSCOMPARE_TILING</a>   0x0002</td></tr>
<tr class="separator:a22cc4f926c4cd495e45dfb773a6498d3"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a49672bfc5329d584fae143b6ddb6dc1d" id="r_a49672bfc5329d584fae143b6ddb6dc1d"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a49672bfc5329d584fae143b6ddb6dc1d">WCSCOMPARE_CRPIX</a>   0x0004</td></tr>
<tr class="separator:a49672bfc5329d584fae143b6ddb6dc1d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1566e29507c2ebab2367e00b2411a3ec" id="r_a1566e29507c2ebab2367e00b2411a3ec"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a1566e29507c2ebab2367e00b2411a3ec">PVLEN</a>   (sizeof(struct <a class="el" href="structpvcard.html">pvcard</a>)/sizeof(int))</td></tr>
<tr class="separator:a1566e29507c2ebab2367e00b2411a3ec"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a62456c216a0945640783a5c3c68a4777" id="r_a62456c216a0945640783a5c3c68a4777"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a62456c216a0945640783a5c3c68a4777">PSLEN</a>   (sizeof(struct <a class="el" href="structpscard.html">pscard</a>)/sizeof(int))</td></tr>
<tr class="separator:a62456c216a0945640783a5c3c68a4777"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:afdf336f35dd8793657bcd63fd1e53836" id="r_afdf336f35dd8793657bcd63fd1e53836"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#afdf336f35dd8793657bcd63fd1e53836">AUXLEN</a>   (sizeof(struct <a class="el" href="structauxprm.html">auxprm</a>)/sizeof(int))</td></tr>
<tr class="separator:afdf336f35dd8793657bcd63fd1e53836"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a6852f6dd2883c82296f1108b897d337e" id="r_a6852f6dd2883c82296f1108b897d337e"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a6852f6dd2883c82296f1108b897d337e">WCSLEN</a>   (sizeof(struct <a class="el" href="structwcsprm.html">wcsprm</a>)/sizeof(int))</td></tr>
<tr class="memdesc:a6852f6dd2883c82296f1108b897d337e"><td class="mdescLeft"> </td><td class="mdescRight">Size of the wcsprm struct in int units. <br /></td></tr>
<tr class="separator:a6852f6dd2883c82296f1108b897d337e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac55946dadc53ac592cb686275902ae7b" id="r_ac55946dadc53ac592cb686275902ae7b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#ac55946dadc53ac592cb686275902ae7b">wcscopy</a>(alloc, wcssrc, wcsdst)   <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64">wcssub</a>(alloc, wcssrc, 0x0, 0x0, wcsdst)</td></tr>
<tr class="memdesc:ac55946dadc53ac592cb686275902ae7b"><td class="mdescLeft"> </td><td class="mdescRight">Copy routine for the wcsprm struct. <br /></td></tr>
<tr class="separator:ac55946dadc53ac592cb686275902ae7b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1bcf49cfe1ed1bb2bc4c930f98d808fa" id="r_a1bcf49cfe1ed1bb2bc4c930f98d808fa"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a1bcf49cfe1ed1bb2bc4c930f98d808fa">wcsini_errmsg</a>   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td></tr>
<tr class="memdesc:a1bcf49cfe1ed1bb2bc4c930f98d808fa"><td class="mdescLeft"> </td><td class="mdescRight">Deprecated. <br /></td></tr>
<tr class="separator:a1bcf49cfe1ed1bb2bc4c930f98d808fa"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a465ef3c77aaf546324dae0692e6de7fe" id="r_a465ef3c77aaf546324dae0692e6de7fe"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a465ef3c77aaf546324dae0692e6de7fe">wcssub_errmsg</a>   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td></tr>
<tr class="memdesc:a465ef3c77aaf546324dae0692e6de7fe"><td class="mdescLeft"> </td><td class="mdescRight">Deprecated. <br /></td></tr>
<tr class="separator:a465ef3c77aaf546324dae0692e6de7fe"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae1738854472218541bda531653ef2709" id="r_ae1738854472218541bda531653ef2709"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#ae1738854472218541bda531653ef2709">wcscopy_errmsg</a>   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td></tr>
<tr class="memdesc:ae1738854472218541bda531653ef2709"><td class="mdescLeft"> </td><td class="mdescRight">Deprecated. <br /></td></tr>
<tr class="separator:ae1738854472218541bda531653ef2709"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3d64b57cec404114c75bd25a562e8053" id="r_a3d64b57cec404114c75bd25a562e8053"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a3d64b57cec404114c75bd25a562e8053">wcsfree_errmsg</a>   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td></tr>
<tr class="memdesc:a3d64b57cec404114c75bd25a562e8053"><td class="mdescLeft"> </td><td class="mdescRight">Deprecated. <br /></td></tr>
<tr class="separator:a3d64b57cec404114c75bd25a562e8053"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8f5c31a6983b17abbe2fead61550d55c" id="r_a8f5c31a6983b17abbe2fead61550d55c"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a8f5c31a6983b17abbe2fead61550d55c">wcsprt_errmsg</a>   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td></tr>
<tr class="memdesc:a8f5c31a6983b17abbe2fead61550d55c"><td class="mdescLeft"> </td><td class="mdescRight">Deprecated. <br /></td></tr>
<tr class="separator:a8f5c31a6983b17abbe2fead61550d55c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a84a67c964e212bbf004c264b3ca70fee" id="r_a84a67c964e212bbf004c264b3ca70fee"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a84a67c964e212bbf004c264b3ca70fee">wcsset_errmsg</a>   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td></tr>
<tr class="memdesc:a84a67c964e212bbf004c264b3ca70fee"><td class="mdescLeft"> </td><td class="mdescRight">Deprecated. <br /></td></tr>
<tr class="separator:a84a67c964e212bbf004c264b3ca70fee"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ade3959355dc9d0987e7ccc4070795c38" id="r_ade3959355dc9d0987e7ccc4070795c38"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#ade3959355dc9d0987e7ccc4070795c38">wcsp2s_errmsg</a>   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td></tr>
<tr class="memdesc:ade3959355dc9d0987e7ccc4070795c38"><td class="mdescLeft"> </td><td class="mdescRight">Deprecated. <br /></td></tr>
<tr class="separator:ade3959355dc9d0987e7ccc4070795c38"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a37c4884cf58baf25b2984ec3bccb80a5" id="r_a37c4884cf58baf25b2984ec3bccb80a5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a37c4884cf58baf25b2984ec3bccb80a5">wcss2p_errmsg</a>   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td></tr>
<tr class="memdesc:a37c4884cf58baf25b2984ec3bccb80a5"><td class="mdescLeft"> </td><td class="mdescRight">Deprecated. <br /></td></tr>
<tr class="separator:a37c4884cf58baf25b2984ec3bccb80a5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:acfbadc770489b6b5186b95eaa35467f1" id="r_acfbadc770489b6b5186b95eaa35467f1"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#acfbadc770489b6b5186b95eaa35467f1">wcsmix_errmsg</a>   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td></tr>
<tr class="memdesc:acfbadc770489b6b5186b95eaa35467f1"><td class="mdescLeft"> </td><td class="mdescRight">Deprecated. <br /></td></tr>
<tr class="separator:acfbadc770489b6b5186b95eaa35467f1"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="enum-members" name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:a158615aa1622d8feedd228795ff9a25f" id="r_a158615aa1622d8feedd228795ff9a25f"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25f">wcs_errmsg_enum</a> { <br />
  <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 />
  <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 />
  <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 />
  <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
, <a class="el" href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25fab4762a0c9a51284be7259a14ab63496b">WCSERR_UNSET</a> = 14
<br />
}</td></tr>
<tr class="separator:a158615aa1622d8feedd228795ff9a25f"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a42b2578d76ace7ca6114d82b7ae46a89" id="r_a42b2578d76ace7ca6114d82b7ae46a89"><td class="memItemLeft" align="right" valign="top">int </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"> </td><td class="mdescRight">Memory allocation for <code><b>PV</b>i<b>_</b>ma</code>. <br /></td></tr>
<tr class="separator:a42b2578d76ace7ca6114d82b7ae46a89"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae790c9ce6c9b7a4845cf1c3c97b1e97a" id="r_ae790c9ce6c9b7a4845cf1c3c97b1e97a"><td class="memItemLeft" align="right" valign="top">int </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"> </td><td class="mdescRight">Memory allocation for <code><b>PS</b>i<b>_</b>ma</code>. <br /></td></tr>
<tr class="separator:ae790c9ce6c9b7a4845cf1c3c97b1e97a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2afc8255fde0965dddaa374463666d45" id="r_a2afc8255fde0965dddaa374463666d45"><td class="memItemLeft" align="right" valign="top">int </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"> </td><td class="mdescRight">Default constructor for the wcsprm struct. <br /></td></tr>
<tr class="separator:a2afc8255fde0965dddaa374463666d45"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aab11243b60b10065fc85347bb3efa912" id="r_aab11243b60b10065fc85347bb3efa912"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#aab11243b60b10065fc85347bb3efa912">wcsinit</a> (int alloc, int naxis, struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs, int npvmax, int npsmax, int ndpmax)</td></tr>
<tr class="memdesc:aab11243b60b10065fc85347bb3efa912"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor for the wcsprm struct. <br /></td></tr>
<tr class="separator:aab11243b60b10065fc85347bb3efa912"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa5ab4a67a8bcdad28a07b02d0c3b3c6a" id="r_aa5ab4a67a8bcdad28a07b02d0c3b3c6a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#aa5ab4a67a8bcdad28a07b02d0c3b3c6a">wcsauxi</a> (int alloc, struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs)</td></tr>
<tr class="memdesc:aa5ab4a67a8bcdad28a07b02d0c3b3c6a"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor for the auxprm struct. <br /></td></tr>
<tr class="separator:aa5ab4a67a8bcdad28a07b02d0c3b3c6a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a864c99fef9f3eee29085ce42d0ee0d64" id="r_a864c99fef9f3eee29085ce42d0ee0d64"><td class="memItemLeft" align="right" valign="top">int </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"> </td><td class="mdescRight">Subimage extraction routine for the wcsprm struct. <br /></td></tr>
<tr class="separator:a864c99fef9f3eee29085ce42d0ee0d64"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a78d5d27f74218723acde6d3aa232c4a5" id="r_a78d5d27f74218723acde6d3aa232c4a5"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a78d5d27f74218723acde6d3aa232c4a5">wcscompare</a> (int cmp, double tol, const struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs1, const struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs2, int *equal)</td></tr>
<tr class="memdesc:a78d5d27f74218723acde6d3aa232c4a5"><td class="mdescLeft"> </td><td class="mdescRight">Compare two wcsprm structs for equality. <br /></td></tr>
<tr class="separator:a78d5d27f74218723acde6d3aa232c4a5"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4ab38bc642c4656f62c43acf84a849f1" id="r_a4ab38bc642c4656f62c43acf84a849f1"><td class="memItemLeft" align="right" valign="top">int </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"> </td><td class="mdescRight">Destructor for the wcsprm struct. <br /></td></tr>
<tr class="separator:a4ab38bc642c4656f62c43acf84a849f1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aabfe985b365a14d529d43fc6a4c6fe9b" id="r_aabfe985b365a14d529d43fc6a4c6fe9b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#aabfe985b365a14d529d43fc6a4c6fe9b">wcstrim</a> (struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs)</td></tr>
<tr class="memdesc:aabfe985b365a14d529d43fc6a4c6fe9b"><td class="mdescLeft"> </td><td class="mdescRight">Free unused arrays in the wcsprm struct. <br /></td></tr>
<tr class="separator:aabfe985b365a14d529d43fc6a4c6fe9b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a3a0875a1f9479f6929ad129b0200d09b" id="r_a3a0875a1f9479f6929ad129b0200d09b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a3a0875a1f9479f6929ad129b0200d09b">wcssize</a> (const struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs, int sizes[2])</td></tr>
<tr class="memdesc:a3a0875a1f9479f6929ad129b0200d09b"><td class="mdescLeft"> </td><td class="mdescRight">Compute the size of a wcsprm struct. <br /></td></tr>
<tr class="separator:a3a0875a1f9479f6929ad129b0200d09b"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4c84e6786212077fbecc0fc883656dcb" id="r_a4c84e6786212077fbecc0fc883656dcb"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a4c84e6786212077fbecc0fc883656dcb">auxsize</a> (const struct <a class="el" href="structauxprm.html">auxprm</a> *aux, int sizes[2])</td></tr>
<tr class="memdesc:a4c84e6786212077fbecc0fc883656dcb"><td class="mdescLeft"> </td><td class="mdescRight">Compute the size of a auxprm struct. <br /></td></tr>
<tr class="separator:a4c84e6786212077fbecc0fc883656dcb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab9aeb8cf1afb1bfb22e989580d90fca8" id="r_ab9aeb8cf1afb1bfb22e989580d90fca8"><td class="memItemLeft" align="right" valign="top">int </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"> </td><td class="mdescRight">Print routine for the wcsprm struct. <br /></td></tr>
<tr class="separator:ab9aeb8cf1afb1bfb22e989580d90fca8"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a8fe5dcd9927240dc0348b850ee662367" id="r_a8fe5dcd9927240dc0348b850ee662367"><td class="memItemLeft" align="right" valign="top">int </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"> </td><td class="mdescRight">Print error messages from a wcsprm struct. <br /></td></tr>
<tr class="separator:a8fe5dcd9927240dc0348b850ee662367"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:af226d8537fbc578d63f1ba5601078398" id="r_af226d8537fbc578d63f1ba5601078398"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#af226d8537fbc578d63f1ba5601078398">wcsbchk</a> (struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs, int bounds)</td></tr>
<tr class="memdesc:af226d8537fbc578d63f1ba5601078398"><td class="mdescLeft"> </td><td class="mdescRight">Enable/disable bounds checking. <br /></td></tr>
<tr class="separator:af226d8537fbc578d63f1ba5601078398"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ae5cc3f5d249755583403cdf54d2ebb91" id="r_ae5cc3f5d249755583403cdf54d2ebb91"><td class="memItemLeft" align="right" valign="top">int </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"> </td><td class="mdescRight">Setup routine for the wcsprm struct. <br /></td></tr>
<tr class="separator:ae5cc3f5d249755583403cdf54d2ebb91"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a27d3dd209db3e76cf4c50f48c01ba986" id="r_a27d3dd209db3e76cf4c50f48c01ba986"><td class="memItemLeft" align="right" valign="top">int </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"> </td><td class="mdescRight">Pixel-to-world transformation. <br /></td></tr>
<tr class="separator:a27d3dd209db3e76cf4c50f48c01ba986"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a60673d05a3513659ac848a9cb3d0cb07" id="r_a60673d05a3513659ac848a9cb3d0cb07"><td class="memItemLeft" align="right" valign="top">int </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"> </td><td class="mdescRight">World-to-pixel transformation. <br /></td></tr>
<tr class="separator:a60673d05a3513659ac848a9cb3d0cb07"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1c1971f6d8e8667a1f5acb4bebd65c6f" id="r_a1c1971f6d8e8667a1f5acb4bebd65c6f"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a1c1971f6d8e8667a1f5acb4bebd65c6f">wcsmix</a> (struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs, int mixpix, int mixcel, const double vspan[2], double vstep, int viter, double world[], double phi[], double theta[], double imgcrd[], double pixcrd[])</td></tr>
<tr class="memdesc:a1c1971f6d8e8667a1f5acb4bebd65c6f"><td class="mdescLeft"> </td><td class="mdescRight">Hybrid coordinate transformation. <br /></td></tr>
<tr class="separator:a1c1971f6d8e8667a1f5acb4bebd65c6f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a7b788938019a60c322d5cb82df7068d4" id="r_a7b788938019a60c322d5cb82df7068d4"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a7b788938019a60c322d5cb82df7068d4">wcsccs</a> (struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs, double lng2p1, double lat2p1, double lng1p2, const char *clng, const char *clat, const char *radesys, double equinox, const char *alt)</td></tr>
<tr class="memdesc:a7b788938019a60c322d5cb82df7068d4"><td class="mdescLeft"> </td><td class="mdescRight">Change celestial coordinate system. <br /></td></tr>
<tr class="separator:a7b788938019a60c322d5cb82df7068d4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a57975833fe0588eb7c7b6d79f13a7693" id="r_a57975833fe0588eb7c7b6d79f13a7693"><td class="memItemLeft" align="right" valign="top">int </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"> </td><td class="mdescRight">Spectral axis translation. <br /></td></tr>
<tr class="separator:a57975833fe0588eb7c7b6d79f13a7693"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad875ce4317d85c893f64afe10ab1630e" id="r_ad875ce4317d85c893f64afe10ab1630e"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#ad875ce4317d85c893f64afe10ab1630e">wcslib_version</a> (int vers[3])</td></tr>
<tr class="separator:ad875ce4317d85c893f64afe10ab1630e"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a819013c42cbcb3c00603539c1d2aae2b" id="r_a819013c42cbcb3c00603539c1d2aae2b"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a> []</td></tr>
<tr class="separator:a819013c42cbcb3c00603539c1d2aae2b"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Routines in this suite 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. The standard, and proposed extensions for handling distortions, are described in </p><div class="fragment"><div class="line"><span class="stringliteral">"Representations of world coordinates in FITS"</span>,</div>
<div class="line">Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I)</div>
<div class="line"> </div>
<div class="line"><span class="stringliteral">"Representations of celestial coordinates in FITS"</span>,</div>
<div class="line">Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (WCS Paper II)</div>
<div class="line"> </div>
<div class="line"><span class="stringliteral">"Representations of spectral coordinates in FITS"</span>,</div>
<div class="line">Greisen, E.W., Calabretta, M.R., Valdes, F.G., & Allen, S.L.</div>
<div class="line">2006, A&A, 446, 747 (WCS Paper III)</div>
<div class="line"> </div>
<div class="line"><span class="stringliteral">"Representations of distortions in FITS world coordinate systems"</span>,</div>
<div class="line">Calabretta, M.R. et al. (WCS Paper IV, draft dated 2004/04/22),</div>
<div class="line">available from http:<span class="comment">//www.atnf.csiro.au/people/Mark.Calabretta</span></div>
<div class="line"> </div>
<div class="line"><span class="stringliteral">"Mapping on the HEALPix grid"</span>,</div>
<div class="line">Calabretta, M.R., & Roukema, B.F. 2007, MNRAS, 381, 865 (WCS Paper V)</div>
<div class="line"> </div>
<div class="line"><span class="stringliteral">"Representing the 'Butterfly' Projection in FITS -- Projection Code XPH"</span>,</div>
<div class="line">Calabretta, M.R., & Lowe, S.R. 2013, PASA, 30, e050 (WCS Paper VI)</div>
<div class="line"> </div>
<div class="line"><span class="stringliteral">"Representations of time coordinates in FITS -</span></div>
<div class="line"><span class="stringliteral"> Time and relative dimension in space"</span>,</div>
<div class="line">Rots, A.H., Bunclark, P.S., Calabretta, M.R., Allen, S.L.,</div>
<div class="line">Manchester, R.N., & Thompson, W.T. 2015, A&A, 574, A36 (WCS Paper VII)</div>
</div><!-- fragment --><p>These routines 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><a class="el" href="wcs_8h.html#a42b2578d76ace7ca6114d82b7ae46a89" title="Memory allocation for PVi_ma.">wcsnpv()</a>, <a class="el" href="wcs_8h.html#ae790c9ce6c9b7a4845cf1c3c97b1e97a" title="Memory allocation for PSi_ma.">wcsnps()</a>, <a class="el" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct.">wcsini()</a>, <a class="el" href="wcs_8h.html#aab11243b60b10065fc85347bb3efa912" title="Default constructor for the wcsprm struct.">wcsinit()</a>, <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct.">wcssub()</a>, <a class="el" href="wcs_8h.html#a4ab38bc642c4656f62c43acf84a849f1" title="Destructor for the wcsprm struct.">wcsfree()</a>, and <a class="el" href="wcs_8h.html#aabfe985b365a14d529d43fc6a4c6fe9b" title="Free unused arrays in the wcsprm struct.">wcstrim()</a>, are provided to manage the wcsprm struct, <a class="el" href="wcs_8h.html#a3a0875a1f9479f6929ad129b0200d09b" title="Compute the size of a wcsprm struct.">wcssize()</a> computes its total size including allocated memory, and <a class="el" href="wcs_8h.html#ab9aeb8cf1afb1bfb22e989580d90fca8" title="Print routine for the wcsprm struct.">wcsprt()</a> 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#a1c1971f6d8e8667a1f5acb4bebd65c6f" title="Hybrid coordinate transformation.">wcsmix()</a>, iteratively solves for the unknown elements.</p>
<p><a class="el" href="wcs_8h.html#a7b788938019a60c322d5cb82df7068d4" title="Change celestial coordinate system.">wcsccs()</a> changes the celestial coordinate system of a wcsprm struct, for example, from equatorial to galactic, and <a class="el" href="wcs_8h.html#a57975833fe0588eb7c7b6d79f13a7693" title="Spectral axis translation.">wcssptr()</a> translates the spectral axis. For example, a '<code><b>FREQ</b></code>' axis may be translated into <code><b>'ZOPT-F2W'</b></code> and vice versa.</p>
<p><a class="el" href="wcs_8h.html#ad875ce4317d85c893f64afe10ab1630e">wcslib_version()</a> returns the WCSLIB version number.</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 id="a0653c98b8a1bee5755740ae3f4854094" name="a0653c98b8a1bee5755740ae3f4854094"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0653c98b8a1bee5755740ae3f4854094">◆ </a></span>WCSSUB_LONGITUDE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSSUB_LONGITUDE   0x1001</td>
</tr>
</table>
</div><div class="memdoc">
<p>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>. </p>
<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 id="a5d377c202850ee0eaf44b3e989d0736e" name="a5d377c202850ee0eaf44b3e989d0736e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d377c202850ee0eaf44b3e989d0736e">◆ </a></span>WCSSUB_LATITUDE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSSUB_LATITUDE   0x1002</td>
</tr>
</table>
</div><div class="memdoc">
<p>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>. </p>
<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 id="a22bbac394b025c4cfc7bd73b6d6e3962" name="a22bbac394b025c4cfc7bd73b6d6e3962"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a22bbac394b025c4cfc7bd73b6d6e3962">◆ </a></span>WCSSUB_CUBEFACE</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSSUB_CUBEFACE   0x1004</td>
</tr>
</table>
</div><div class="memdoc">
<p>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>. </p>
<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 id="ab9885b02031ff7aa7b094f4a1edee2cd" name="ab9885b02031ff7aa7b094f4a1edee2cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9885b02031ff7aa7b094f4a1edee2cd">◆ </a></span>WCSSUB_CELESTIAL</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSSUB_CELESTIAL   0x1007</td>
</tr>
</table>
</div><div class="memdoc">
<p>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>. </p>
<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 id="a4b2dfca2e80fe80ba85dc830cd9c377b" name="a4b2dfca2e80fe80ba85dc830cd9c377b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4b2dfca2e80fe80ba85dc830cd9c377b">◆ </a></span>WCSSUB_SPECTRAL</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSSUB_SPECTRAL   0x1008</td>
</tr>
</table>
</div><div class="memdoc">
<p>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>. </p>
<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 id="a6ba6d2640572b12a11e3558fa75a01ed" name="a6ba6d2640572b12a11e3558fa75a01ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ba6d2640572b12a11e3558fa75a01ed">◆ </a></span>WCSSUB_STOKES</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSSUB_STOKES   0x1010</td>
</tr>
</table>
</div><div class="memdoc">
<p>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>. </p>
<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 id="aac7a03c3bcf06926891a1badaa1e52e8" name="aac7a03c3bcf06926891a1badaa1e52e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac7a03c3bcf06926891a1badaa1e52e8">◆ </a></span>WCSSUB_TIME</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSSUB_TIME   0x1020</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a232a0e8d0de3d599955e6eaef74067bc" name="a232a0e8d0de3d599955e6eaef74067bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a232a0e8d0de3d599955e6eaef74067bc">◆ </a></span>WCSCOMPARE_ANCILLARY</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSCOMPARE_ANCILLARY   0x0001</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a22cc4f926c4cd495e45dfb773a6498d3" name="a22cc4f926c4cd495e45dfb773a6498d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a22cc4f926c4cd495e45dfb773a6498d3">◆ </a></span>WCSCOMPARE_TILING</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSCOMPARE_TILING   0x0002</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a49672bfc5329d584fae143b6ddb6dc1d" name="a49672bfc5329d584fae143b6ddb6dc1d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49672bfc5329d584fae143b6ddb6dc1d">◆ </a></span>WCSCOMPARE_CRPIX</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSCOMPARE_CRPIX   0x0004</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a1566e29507c2ebab2367e00b2411a3ec" name="a1566e29507c2ebab2367e00b2411a3ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1566e29507c2ebab2367e00b2411a3ec">◆ </a></span>PVLEN</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define PVLEN   (sizeof(struct <a class="el" href="structpvcard.html">pvcard</a>)/sizeof(int))</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a62456c216a0945640783a5c3c68a4777" name="a62456c216a0945640783a5c3c68a4777"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a62456c216a0945640783a5c3c68a4777">◆ </a></span>PSLEN</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define PSLEN   (sizeof(struct <a class="el" href="structpscard.html">pscard</a>)/sizeof(int))</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="afdf336f35dd8793657bcd63fd1e53836" name="afdf336f35dd8793657bcd63fd1e53836"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afdf336f35dd8793657bcd63fd1e53836">◆ </a></span>AUXLEN</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define AUXLEN   (sizeof(struct <a class="el" href="structauxprm.html">auxprm</a>)/sizeof(int))</td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a6852f6dd2883c82296f1108b897d337e" name="a6852f6dd2883c82296f1108b897d337e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6852f6dd2883c82296f1108b897d337e">◆ </a></span>WCSLEN</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define WCSLEN   (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 int units. </p>
<p>Size of the wcsprm struct in <em>int</em> units, used by the Fortran wrappers. </p>
</div>
</div>
<a id="ac55946dadc53ac592cb686275902ae7b" name="ac55946dadc53ac592cb686275902ae7b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac55946dadc53ac592cb686275902ae7b">◆ </a></span>wcscopy</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define wcscopy</td>
<td>(</td>
<td class="paramtype"> </td>
<td class="paramname">alloc, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname">wcssrc, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"> </td>
<td class="paramname">wcsdst </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td>   <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64">wcssub</a>(alloc, wcssrc, 0x0, 0x0, wcsdst)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Copy routine for the wcsprm struct. </p>
<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 id="a1bcf49cfe1ed1bb2bc4c930f98d808fa" name="a1bcf49cfe1ed1bb2bc4c930f98d808fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1bcf49cfe1ed1bb2bc4c930f98d808fa">◆ </a></span>wcsini_errmsg</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define wcsini_errmsg   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deprecated. </p>
<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#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a> directly now instead. </dd></dl>
</div>
</div>
<a id="a465ef3c77aaf546324dae0692e6de7fe" name="a465ef3c77aaf546324dae0692e6de7fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a465ef3c77aaf546324dae0692e6de7fe">◆ </a></span>wcssub_errmsg</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define wcssub_errmsg   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deprecated. </p>
<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#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a> directly now instead. </dd></dl>
</div>
</div>
<a id="ae1738854472218541bda531653ef2709" name="ae1738854472218541bda531653ef2709"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1738854472218541bda531653ef2709">◆ </a></span>wcscopy_errmsg</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define wcscopy_errmsg   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deprecated. </p>
<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#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a> directly now instead. </dd></dl>
</div>
</div>
<a id="a3d64b57cec404114c75bd25a562e8053" name="a3d64b57cec404114c75bd25a562e8053"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d64b57cec404114c75bd25a562e8053">◆ </a></span>wcsfree_errmsg</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define wcsfree_errmsg   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deprecated. </p>
<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#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a> directly now instead. </dd></dl>
</div>
</div>
<a id="a8f5c31a6983b17abbe2fead61550d55c" name="a8f5c31a6983b17abbe2fead61550d55c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8f5c31a6983b17abbe2fead61550d55c">◆ </a></span>wcsprt_errmsg</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define wcsprt_errmsg   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deprecated. </p>
<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#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a> directly now instead. </dd></dl>
</div>
</div>
<a id="a84a67c964e212bbf004c264b3ca70fee" name="a84a67c964e212bbf004c264b3ca70fee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a84a67c964e212bbf004c264b3ca70fee">◆ </a></span>wcsset_errmsg</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define wcsset_errmsg   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deprecated. </p>
<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#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a> directly now instead. </dd></dl>
</div>
</div>
<a id="ade3959355dc9d0987e7ccc4070795c38" name="ade3959355dc9d0987e7ccc4070795c38"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade3959355dc9d0987e7ccc4070795c38">◆ </a></span>wcsp2s_errmsg</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define wcsp2s_errmsg   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deprecated. </p>
<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#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a> directly now instead. </dd></dl>
</div>
</div>
<a id="a37c4884cf58baf25b2984ec3bccb80a5" name="a37c4884cf58baf25b2984ec3bccb80a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a37c4884cf58baf25b2984ec3bccb80a5">◆ </a></span>wcss2p_errmsg</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define wcss2p_errmsg   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deprecated. </p>
<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#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a> directly now instead. </dd></dl>
</div>
</div>
<a id="acfbadc770489b6b5186b95eaa35467f1" name="acfbadc770489b6b5186b95eaa35467f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acfbadc770489b6b5186b95eaa35467f1">◆ </a></span>wcsmix_errmsg</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">#define wcsmix_errmsg   <a class="el" href="wcs_8h.html#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Deprecated. </p>
<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#a819013c42cbcb3c00603539c1d2aae2b">wcs_errmsg</a> directly now instead. </dd></dl>
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="a158615aa1622d8feedd228795ff9a25f" name="a158615aa1622d8feedd228795ff9a25f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a158615aa1622d8feedd228795ff9a25f">◆ </a></span>wcs_errmsg_enum</h2>
<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"><a id="a158615aa1622d8feedd228795ff9a25fa8b87c21d4a2cab41d4eea0a95378fca8" name="a158615aa1622d8feedd228795ff9a25fa8b87c21d4a2cab41d4eea0a95378fca8"></a>WCSERR_SUCCESS </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a158615aa1622d8feedd228795ff9a25fac51c733d8a719dd698f9e96e9a4fa83f" name="a158615aa1622d8feedd228795ff9a25fac51c733d8a719dd698f9e96e9a4fa83f"></a>WCSERR_NULL_POINTER </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a158615aa1622d8feedd228795ff9a25fa5c58d5530bc7577a70185376c15180af" name="a158615aa1622d8feedd228795ff9a25fa5c58d5530bc7577a70185376c15180af"></a>WCSERR_MEMORY </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a158615aa1622d8feedd228795ff9a25fa2904278d916c820236347783312a7ce0" name="a158615aa1622d8feedd228795ff9a25fa2904278d916c820236347783312a7ce0"></a>WCSERR_SINGULAR_MTX </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a158615aa1622d8feedd228795ff9a25fa598db0fcc4961aa3c5e0a296bec2b313" name="a158615aa1622d8feedd228795ff9a25fa598db0fcc4961aa3c5e0a296bec2b313"></a>WCSERR_BAD_CTYPE </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a158615aa1622d8feedd228795ff9a25fafe9ed842ea8f525c7b8fed2f60015dd9" name="a158615aa1622d8feedd228795ff9a25fafe9ed842ea8f525c7b8fed2f60015dd9"></a>WCSERR_BAD_PARAM </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a158615aa1622d8feedd228795ff9a25fa71cb7eaa633d9e0f560555a016f1f007" name="a158615aa1622d8feedd228795ff9a25fa71cb7eaa633d9e0f560555a016f1f007"></a>WCSERR_BAD_COORD_TRANS </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a158615aa1622d8feedd228795ff9a25fadfa2a8cf8021827378091315b8e0a020" name="a158615aa1622d8feedd228795ff9a25fadfa2a8cf8021827378091315b8e0a020"></a>WCSERR_ILL_COORD_TRANS </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a158615aa1622d8feedd228795ff9a25fa08306533cf0c7555dad662e82e8a4a69" name="a158615aa1622d8feedd228795ff9a25fa08306533cf0c7555dad662e82e8a4a69"></a>WCSERR_BAD_PIX </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a158615aa1622d8feedd228795ff9a25fa03824b7b5c22e5f0cc91363eb695a804" name="a158615aa1622d8feedd228795ff9a25fa03824b7b5c22e5f0cc91363eb695a804"></a>WCSERR_BAD_WORLD </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a158615aa1622d8feedd228795ff9a25fa5d662102c172495df1f9bb03cedd701d" name="a158615aa1622d8feedd228795ff9a25fa5d662102c172495df1f9bb03cedd701d"></a>WCSERR_BAD_WORLD_COORD </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a158615aa1622d8feedd228795ff9a25fa832122bb304560f92df91e391d55948a" name="a158615aa1622d8feedd228795ff9a25fa832122bb304560f92df91e391d55948a"></a>WCSERR_NO_SOLUTION </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a158615aa1622d8feedd228795ff9a25fa88e600163f719a759d3569bf1548109e" name="a158615aa1622d8feedd228795ff9a25fa88e600163f719a759d3569bf1548109e"></a>WCSERR_BAD_SUBIMAGE </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a158615aa1622d8feedd228795ff9a25fa37c8aa0aedc12c63df08f39cb7177ff7" name="a158615aa1622d8feedd228795ff9a25fa37c8aa0aedc12c63df08f39cb7177ff7"></a>WCSERR_NON_SEPARABLE </td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="a158615aa1622d8feedd228795ff9a25fab4762a0c9a51284be7259a14ab63496b" name="a158615aa1622d8feedd228795ff9a25fab4762a0c9a51284be7259a14ab63496b"></a>WCSERR_UNSET </td><td class="fielddoc"></td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a42b2578d76ace7ca6114d82b7ae46a89" name="a42b2578d76ace7ca6114d82b7ae46a89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a42b2578d76ace7ca6114d82b7ae46a89">◆ </a></span>wcsnpv()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcsnpv </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>n</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Memory allocation for <code><b>PV</b>i<b>_</b>ma</code>. </p>
<p><b>wcsnpv</b>() sets or gets the value of NPVMAX (default 64). This global variable controls the number of pvcard structs, for holding <code><b>PV</b>i<b>_</b>ma</code> keyvalues, that <a class="el" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct.">wcsini()</a> should allocate space for. It is also used by <a class="el" href="wcs_8h.html#aab11243b60b10065fc85347bb3efa912" title="Default constructor for the wcsprm struct.">wcsinit()</a> as the default value of npvmax.</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 < 0. Use a value less than zero to get the current value.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Current value of NPVMAX. </dd></dl>
</div>
</div>
<a id="ae790c9ce6c9b7a4845cf1c3c97b1e97a" name="ae790c9ce6c9b7a4845cf1c3c97b1e97a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae790c9ce6c9b7a4845cf1c3c97b1e97a">◆ </a></span>wcsnps()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcsnps </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>n</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Memory allocation for <code><b>PS</b>i<b>_</b>ma</code>. </p>
<p><b>wcsnps</b>() sets or gets the value of NPSMAX (default 8). This global variable controls the number of pscard structs, for holding <code><b>PS</b>i<b>_</b>ma</code> keyvalues, that <a class="el" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct.">wcsini()</a> should allocate space for. It is also used by <a class="el" href="wcs_8h.html#aab11243b60b10065fc85347bb3efa912" title="Default constructor for the wcsprm struct.">wcsinit()</a> as the default value of npsmax.</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 < 0. Use a value less than zero to get the current value.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Current value of NPSMAX. </dd></dl>
</div>
</div>
<a id="a2afc8255fde0965dddaa374463666d45" name="a2afc8255fde0965dddaa374463666d45"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2afc8255fde0965dddaa374463666d45">◆ </a></span>wcsini()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcsini </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>alloc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </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> * </td>
<td class="paramname"><em>wcs</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor for the wcsprm struct. </p>
<p><b>wcsini</b>() is a thin wrapper on <b>wcsinit</b>(). It invokes it with npvmax, npsmax, and ndpmax set to -1 which causes it to use the values of the global variables NDPMAX, NPSMAX, and NDPMAX. It is thereby potentially thread-unsafe if these variables are altered dynamically via <a class="el" href="wcs_8h.html#a42b2578d76ace7ca6114d82b7ae46a89" title="Memory allocation for PVi_ma.">wcsnpv()</a>, <a class="el" href="wcs_8h.html#ae790c9ce6c9b7a4845cf1c3c97b1e97a" title="Memory allocation for PSi_ma.">wcsnps()</a>, and <a class="el" href="dis_8h.html#aa5486b870327544f7423ad2751fb4120" title="Memory allocation for DPja and DQia.">disndp()</a>. Use <b>wcsinit</b>() for a thread-safe alternative in this case. </p>
</div>
</div>
<a id="aab11243b60b10065fc85347bb3efa912" name="aab11243b60b10065fc85347bb3efa912"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aab11243b60b10065fc85347bb3efa912">◆ </a></span>wcsinit()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcsinit </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>alloc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </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> * </td>
<td class="paramname"><em>wcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>npvmax</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>npsmax</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>ndpmax</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor for the wcsprm struct. </p>
<p><b>wcsinit</b>() optionally allocates memory for arrays in a wcsprm struct and sets all members of the struct to default values.</p>
<p><b>PLEASE NOTE:</b> every wcsprm struct should be initialized by <b>wcsinit</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>wcsinit</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. Please note that memory is never allocated by <b>wcsinit</b>() for the auxprm, tabprm, nor wtbarr structs. <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>
<tr><td class="paramdir">[in]</td><td class="paramname">npvmax</td><td>The number of <code><b>PV</b>i<b>_</b>ma</code> keywords to allocate space for. If set to -1, the value of the global variable NPVMAX will be used. This is potentially thread-unsafe if <a class="el" href="wcs_8h.html#a42b2578d76ace7ca6114d82b7ae46a89" title="Memory allocation for PVi_ma.">wcsnpv()</a> is being used dynamically to alter its value. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">npsmax</td><td>The number of <code><b>PS</b>i<b>_</b>ma</code> keywords to allocate space for. If set to -1, the value of the global variable NPSMAX will be used. This is potentially thread-unsafe if <a class="el" href="wcs_8h.html#ae790c9ce6c9b7a4845cf1c3c97b1e97a" title="Memory allocation for PSi_ma.">wcsnps()</a> is being used dynamically to alter its value. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ndpmax</td><td>The number of DPja or DQia keywords to allocate space for. If set to -1, the value of the global variable NDPMAX will be used. This is potentially thread-unsafe if <a class="el" href="dis_8h.html#aa5486b870327544f7423ad2751fb4120" title="Memory allocation for DPja and DQia.">disndp()</a> is being used dynamically to alter its value.</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 > 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 id="aa5ab4a67a8bcdad28a07b02d0c3b3c6a" name="aa5ab4a67a8bcdad28a07b02d0c3b3c6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5ab4a67a8bcdad28a07b02d0c3b3c6a">◆ </a></span>wcsauxi()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcsauxi </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>alloc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> * </td>
<td class="paramname"><em>wcs</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor for the auxprm struct. </p>
<p><b>wcsauxi</b>() optionally allocates memory for an auxprm struct, attaches it to wcsprm, and sets all members of the struct to default values.</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 auxprm struct. <br />
If false, it is assumed that <a class="el" href="structwcsprm.html#a37e8287a522df0f03c4c051f7a11d402">wcsprm::aux</a> has already been set to point to an auxprm struct, in which case the user is responsible for managing that memory. However, if <a class="el" href="structwcsprm.html#a37e8287a522df0f03c4c051f7a11d402">wcsprm::aux</a> is a null pointer, memory will be allocated regardless. (In other words, setting alloc true saves having to initalize the pointer to zero.)</td></tr>
<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>
</ul>
</dd></dl>
</div>
</div>
<a id="a864c99fef9f3eee29085ce42d0ee0d64" name="a864c99fef9f3eee29085ce42d0ee0d64"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a864c99fef9f3eee29085ce42d0ee0d64">◆ </a></span>wcssub()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcssub </td>
<td>(</td>
<td class="paramtype">int </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> * </td>
<td class="paramname"><em>wcssrc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"><em>nsub</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </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> * </td>
<td class="paramname"><em>wcsdst</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Subimage extraction routine for the wcsprm struct. </p>
<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#aab11243b60b10065fc85347bb3efa912" title="Default constructor for the wcsprm struct.">wcsinit()</a> to allocate memory for its arrays if required. Only the "information to be provided" part of the struct is extracted. Consequently, <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct.">wcsset()</a> need not have been, and won't be invoked on the struct from which the subimage 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 subimage struct.</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 linear transformation 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. Likewise, if any distortions are associated with the subimage axes, they must not depend on any of the axes that are not being extracted.</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#aab11243b60b10065fc85347bb3efa912" title="Default constructor for the wcsprm struct.">wcsinit()</a> which produce a simple, unnamed, linear axis with world coordinate equal to the pixel coordinate. These default values can be changed afterwards, 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#aab11243b60b10065fc85347bb3efa912" title="Default constructor for the wcsprm struct.">wcsinit()</a>. They can be changed later. <br />
nsub (the pointer) may be set to zero, and so also may *nsub, which is interpreted to mean all 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 (or *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>
<li>WCSSUB_TIME: Time axis.</li>
</ul>
Refer to the notes (below) for further usage examples. <br />
On return, *nsub will be set to 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 > 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 />
</p><ol>
<li>
<p class="startli">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 hl_define" href="wcs_8h.html#a0653c98b8a1bee5755740ae3f4854094">WCSSUB_LONGITUDE</a> | <a class="code hl_define" href="wcs_8h.html#a5d377c202850ee0eaf44b3e989d0736e">WCSSUB_LATITUDE</a> | <a class="code hl_define" href="wcs_8h.html#a4b2dfca2e80fe80ba85dc830cd9c377b">WCSSUB_SPECTRAL</a>;</div>
<div class="ttc" id="awcs_8h_html_a0653c98b8a1bee5755740ae3f4854094"><div class="ttname"><a href="wcs_8h.html#a0653c98b8a1bee5755740ae3f4854094">WCSSUB_LONGITUDE</a></div><div class="ttdeci">#define WCSSUB_LONGITUDE</div><div class="ttdoc">Mask for extraction of longitude axis by wcssub().</div><div class="ttdef"><b>Definition</b> wcs.h:2003</div></div>
<div class="ttc" id="awcs_8h_html_a4b2dfca2e80fe80ba85dc830cd9c377b"><div class="ttname"><a href="wcs_8h.html#a4b2dfca2e80fe80ba85dc830cd9c377b">WCSSUB_SPECTRAL</a></div><div class="ttdeci">#define WCSSUB_SPECTRAL</div><div class="ttdoc">Mask for extraction of spectral axis by wcssub().</div><div class="ttdef"><b>Definition</b> wcs.h:2007</div></div>
<div class="ttc" id="awcs_8h_html_a5d377c202850ee0eaf44b3e989d0736e"><div class="ttname"><a href="wcs_8h.html#a5d377c202850ee0eaf44b3e989d0736e">WCSSUB_LATITUDE</a></div><div class="ttdeci">#define WCSSUB_LATITUDE</div><div class="ttdoc">Mask for extraction of latitude axis by wcssub().</div><div class="ttdef"><b>Definition</b> wcs.h:2004</div></div>
</div><!-- fragment --><p class="interli">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 class="interli">For convenience, WCSSUB_CELESTIAL is defined as the combination WCSSUB_LONGITUDE | WCSSUB_LATITUDE | WCSSUB_CUBEFACE.</p>
<p class="interli">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 hl_define" href="wcs_8h.html#a0653c98b8a1bee5755740ae3f4854094">WCSSUB_LONGITUDE</a>;</div>
<div class="line">axes[1] = <a class="code hl_define" href="wcs_8h.html#a5d377c202850ee0eaf44b3e989d0736e">WCSSUB_LATITUDE</a>;</div>
<div class="line">axes[2] = <a class="code hl_define" href="wcs_8h.html#a22bbac394b025c4cfc7bd73b6d6e3962">WCSSUB_CUBEFACE</a>;</div>
<div class="line">axes[3] = -(<a class="code hl_define" href="wcs_8h.html#a4b2dfca2e80fe80ba85dc830cd9c377b">WCSSUB_SPECTRAL</a> | <a class="code hl_define" href="wcs_8h.html#a6ba6d2640572b12a11e3558fa75a01ed">WCSSUB_STOKES</a>);</div>
<div class="ttc" id="awcs_8h_html_a22bbac394b025c4cfc7bd73b6d6e3962"><div class="ttname"><a href="wcs_8h.html#a22bbac394b025c4cfc7bd73b6d6e3962">WCSSUB_CUBEFACE</a></div><div class="ttdeci">#define WCSSUB_CUBEFACE</div><div class="ttdoc">Mask for extraction of CUBEFACE axis by wcssub().</div><div class="ttdef"><b>Definition</b> wcs.h:2005</div></div>
<div class="ttc" id="awcs_8h_html_a6ba6d2640572b12a11e3558fa75a01ed"><div class="ttname"><a href="wcs_8h.html#a6ba6d2640572b12a11e3558fa75a01ed">WCSSUB_STOKES</a></div><div class="ttdeci">#define WCSSUB_STOKES</div><div class="ttdoc">Mask for extraction of STOKES axis by wcssub().</div><div class="ttdef"><b>Definition</b> wcs.h:2008</div></div>
</div><!-- fragment --><p class="interli">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 class="endli">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>
</li>
</ol>
</div>
</div>
<a id="a78d5d27f74218723acde6d3aa232c4a5" name="a78d5d27f74218723acde6d3aa232c4a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a78d5d27f74218723acde6d3aa232c4a5">◆ </a></span>wcscompare()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcscompare </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>cmp</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>tol</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const struct <a class="el" href="structwcsprm.html">wcsprm</a> * </td>
<td class="paramname"><em>wcs1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const struct <a class="el" href="structwcsprm.html">wcsprm</a> * </td>
<td class="paramname"><em>wcs2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"><em>equal</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Compare two wcsprm structs for equality. </p>
<p><b>wcscompare</b>() compares two wcsprm structs for equality.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">cmp</td><td>A bit field controlling the strictness of the comparison. When 0, all fields must be identical. <br />
The following constants may be or'ed together to relax the comparison:<ul>
<li>W<code><b>CSC</b></code>OMPARE_ANCILLARY: Ignore ancillary keywords that don't change the WCS transformation, such as <code><b>DATE-OBS</b></code> or EQUINOX.</li>
<li>W<code><b>CSC</b></code>OMPARE_TILING: Ignore integral differences in <code><b>CRPIX</b>ja</code>. This is the 'tiling' condition, where two WCSes cover different regions of the same map projection and align on the same map grid.</li>
<li>W<code><b>CSC</b></code>OMPARE_CRPIX: Ignore any differences at all in <code><b>CRPIX</b>ja</code>. The two WCSes cover different regions of the same map projection but may not align on the same map grid. Overrides W<code><b>CSC</b></code>OMPARE_TILING. </li>
</ul>
</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">tol</td><td>Tolerance for comparison of floating-point values. For example, for tol == 1e-6, all floating-point values in the structs must be equal to the first 6 decimal places. A value of 0 implies exact equality. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">wcs1</td><td>The first wcsprm struct to compare. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">wcs2</td><td>The second wcsprm struct to compare.</td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">equal</td><td>Non-zero when the given structs are equal.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null pointer passed. </li>
</ul>
</dd></dl>
</div>
</div>
<a id="a4ab38bc642c4656f62c43acf84a849f1" name="a4ab38bc642c4656f62c43acf84a849f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ab38bc642c4656f62c43acf84a849f1">◆ </a></span>wcsfree()</h2>
<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> * </td>
<td class="paramname"><em>wcs</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor for the wcsprm struct. </p>
<p><b>wcsfree</b>() frees memory allocated for the wcsprm arrays by <a class="el" href="wcs_8h.html#aab11243b60b10065fc85347bb3efa912" title="Default constructor for the wcsprm struct.">wcsinit()</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#aab11243b60b10065fc85347bb3efa912" title="Default constructor for the wcsprm struct.">wcsinit()</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#aab11243b60b10065fc85347bb3efa912" title="Default constructor for the wcsprm struct.">wcsinit()</a>.</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>
</ul>
</dd></dl>
</div>
</div>
<a id="aabfe985b365a14d529d43fc6a4c6fe9b" name="aabfe985b365a14d529d43fc6a4c6fe9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aabfe985b365a14d529d43fc6a4c6fe9b">◆ </a></span>wcstrim()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcstrim </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> * </td>
<td class="paramname"><em>wcs</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Free unused arrays in the wcsprm struct. </p>
<p><b>wcstrim</b>() frees memory allocated by <a class="el" href="wcs_8h.html#aab11243b60b10065fc85347bb3efa912" title="Default constructor for the wcsprm struct.">wcsinit()</a> for arrays in the wcsprm struct that remains unused after it has been set up by <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct.">wcsset()</a>.</p>
<p>The free'd array members are associated with FITS WCS keyrecords that are rarely used and usually just bloat the struct: <a class="el" href="structwcsprm.html#af124a4259475ea355ced38e73a05363a">wcsprm::crota</a>, <a class="el" href="structwcsprm.html#a7320fc64e7705cc7495eba07482b5c55">wcsprm::colax</a>, <a class="el" href="structwcsprm.html#a922f0f57b8c35cad3d01ceedeba01d4b">wcsprm::cname</a>, <a class="el" href="structwcsprm.html#a49eee6450b1a646d3fe01b8965a63af4">wcsprm::crder</a>, <a class="el" href="structwcsprm.html#a15485177ea8bbacefc29a5a5cba98c8f">wcsprm::csyer</a>, <a class="el" href="structwcsprm.html#a09002a13836c82c58d8faa06188f692b">wcsprm::czphs</a>, and <a class="el" href="structwcsprm.html#a17fd7510a626a8b4b3d2985c9f270ac6">wcsprm::cperi</a>. If unused, <a class="el" href="structwcsprm.html#a04fbd6ed1b338e225f2291523e64be2c">wcsprm::pv</a>, <a class="el" href="structwcsprm.html#a9eca2fcc30058310d020181ae16bf256">wcsprm::ps</a>, and <a class="el" href="structwcsprm.html#afd2f31d782b3becce4ca2f9b495ec0b1">wcsprm::cd</a> are also freed.</p>
<p>Once these arrays have been freed, a test such as </p><div class="fragment"><div class="line"><span class="keywordflow">if</span> (!<a class="code hl_define" href="wcsmath_8h.html#adea646bef24ac88b544d7094860127ff">undefined</a>(wcs->cname[i])) {...}</div>
<div class="ttc" id="awcsmath_8h_html_adea646bef24ac88b544d7094860127ff"><div class="ttname"><a href="wcsmath_8h.html#adea646bef24ac88b544d7094860127ff">undefined</a></div><div class="ttdeci">#define undefined(value)</div><div class="ttdoc">Macro used to test for an undefined quantity.</div><div class="ttdef"><b>Definition</b> wcsmath.h:70</div></div>
</div><!-- fragment --><p> must be protected as follows </p><div class="fragment"><div class="line"><span class="keywordflow">if</span> (wcs->cname && !<a class="code hl_define" href="wcsmath_8h.html#adea646bef24ac88b544d7094860127ff">undefined</a>(wcs->cname[i])) {...}</div>
</div><!-- fragment --><p> In addition, if <a class="el" href="structwcsprm.html#a0e31f1eef036258c2957da9b985945dd">wcsprm::npv</a> is non-zero but less than <a class="el" href="structwcsprm.html#a912eed291f15134e8cfb8750acc6c4bc">wcsprm::npvmax</a>, then the unused space in <a class="el" href="structwcsprm.html#a04fbd6ed1b338e225f2291523e64be2c">wcsprm::pv</a> will be recovered (using realloc()). Likewise for <a class="el" href="structwcsprm.html#a9eca2fcc30058310d020181ae16bf256">wcsprm::ps</a>.</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>14: wcsprm struct is unset. </li>
</ul>
</dd></dl>
</div>
</div>
<a id="a3a0875a1f9479f6929ad129b0200d09b" name="a3a0875a1f9479f6929ad129b0200d09b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a0875a1f9479f6929ad129b0200d09b">◆ </a></span>wcssize()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcssize </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="structwcsprm.html">wcsprm</a> * </td>
<td class="paramname"><em>wcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>sizes</em>[2] </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute the size of a wcsprm struct. </p>
<p><b>wcssize</b>() computes the full size of a wcsprm struct, including allocated memory.</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. <br />
If NULL, the base size of the struct and the allocated size are both set to zero.</td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">sizes</td><td>The first element is the base size of the struct as returned by sizeof(struct wcsprm). The second element is the total allocated size, in bytes, assuming that the allocation was done by <a class="el" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct.">wcsini()</a>. This figure includes memory allocated for members of constituent structs, such as <a class="el" href="structwcsprm.html#a3224bd06f8f4d2d7d398533eb44a49e8">wcsprm::lin</a>. <br />
It is not an error for the struct not to have been set up via <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct.">wcsset()</a>, which normally results in additional memory allocation.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success. </li>
</ul>
</dd></dl>
</div>
</div>
<a id="a4c84e6786212077fbecc0fc883656dcb" name="a4c84e6786212077fbecc0fc883656dcb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c84e6786212077fbecc0fc883656dcb">◆ </a></span>auxsize()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int auxsize </td>
<td>(</td>
<td class="paramtype">const struct <a class="el" href="structauxprm.html">auxprm</a> * </td>
<td class="paramname"><em>aux</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>sizes</em>[2] </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Compute the size of a auxprm struct. </p>
<p><b>auxsize</b>() computes the full size of an auxprm struct, including allocated memory.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">aux</td><td>Auxiliary coordinate information. <br />
If NULL, the base size of the struct and the allocated size are both set to zero.</td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">sizes</td><td>The first element is the base size of the struct as returned by sizeof(struct auxprm). The second element is the total allocated size, in bytes, currently zero.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success. </li>
</ul>
</dd></dl>
</div>
</div>
<a id="ab9aeb8cf1afb1bfb22e989580d90fca8" name="ab9aeb8cf1afb1bfb22e989580d90fca8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9aeb8cf1afb1bfb22e989580d90fca8">◆ </a></span>wcsprt()</h2>
<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> * </td>
<td class="paramname"><em>wcs</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Print routine for the wcsprm struct. </p>
<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 id="a8fe5dcd9927240dc0348b850ee662367" name="a8fe5dcd9927240dc0348b850ee662367"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8fe5dcd9927240dc0348b850ee662367">◆ </a></span>wcsperr()</h2>
<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> * </td>
<td class="paramname"><em>wcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>prefix</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Print error messages from a wcsprm struct. </p>
<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 id="af226d8537fbc578d63f1ba5601078398" name="af226d8537fbc578d63f1ba5601078398"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af226d8537fbc578d63f1ba5601078398">◆ </a></span>wcsbchk()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcsbchk </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> * </td>
<td class="paramname"><em>wcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>bounds</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enable/disable bounds checking. </p>
<p><b>wcsbchk</b>() is used to control bounds checking in the projection routines. Note that <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct.">wcsset()</a> always enables bounds checking. <b>wcsbchk</b>() will invoke <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct.">wcsset()</a> on the wcsprm struct beforehand if necessary.</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">bounds</td><td>If bounds&1 then enable strict bounds checking for the spherical-to-Cartesian (s2x) transformation for the AZP, SZP, TAN, <code><b>SIN</b></code>, ZPN, and COP projections. <br />
If bounds&2 then enable strict bounds checking for the Cartesian-to-spherical (x2s) transformation for the HPX and XPH projections. <br />
If bounds&4 then enable bounds checking on the native coordinates returned by the Cartesian-to-spherical (x2s) transformations using prjchk(). <br />
Zero it to disable all checking.</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 id="ae5cc3f5d249755583403cdf54d2ebb91" name="ae5cc3f5d249755583403cdf54d2ebb91"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae5cc3f5d249755583403cdf54d2ebb91">◆ </a></span>wcsset()</h2>
<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> * </td>
<td class="paramname"><em>wcs</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Setup routine for the wcsprm struct. </p>
<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 > 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 />
</p><ol>
<li>
<b>wcsset</b>() always enables strict bounds checking in the projection routines (via a call to <a class="el" href="prj_8h.html#ad994cb23871c51b20754973bef180f8a" title="Default constructor for the prjprm struct.">prjini()</a>). Use <a class="el" href="wcs_8h.html#af226d8537fbc578d63f1ba5601078398" title="Enable/disable bounds checking.">wcsbchk()</a> to modify bounds-checking after <b>wcsset</b>() is invoked. </li>
</ol>
</div>
</div>
<a id="a27d3dd209db3e76cf4c50f48c01ba986" name="a27d3dd209db3e76cf4c50f48c01ba986"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a27d3dd209db3e76cf4c50f48c01ba986">◆ </a></span>wcsp2s()</h2>
<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> * </td>
<td class="paramname"><em>wcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>ncoord</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>nelem</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double </td>
<td class="paramname"><em>pixcrd</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>imgcrd</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>phi</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>theta</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>world</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>stat</em>[] </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Pixel-to-world transformation. </p>
<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 <picture><source srcset="form_32_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$x$" src="form_32.png" width="8" height="6"/></picture>-, and <picture><source srcset="form_33_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$y$" src="form_33.png" width="8" height="9"/></picture>-coordinates in pseudo "degrees". For spectral axes, imgcrd[][wcs.spec] is the intermediate spectral coordinate, in SI units. For time axes, imgcrd[][wcs.time] is the intermediate time coordinate. </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, world[][wcs.spec] is the spectral coordinate, in SI units. For time axes, world[][wcs.time] is the time coordinate. </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>
</ul>
1+: A bit mask indicating invalid pixel coordinate element(s).</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 > 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 id="a60673d05a3513659ac848a9cb3d0cb07" name="a60673d05a3513659ac848a9cb3d0cb07"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60673d05a3513659ac848a9cb3d0cb07">◆ </a></span>wcss2p()</h2>
<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> * </td>
<td class="paramname"><em>wcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>ncoord</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>nelem</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double </td>
<td class="paramname"><em>world</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>phi</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>theta</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>imgcrd</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>pixcrd</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>stat</em>[] </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>World-to-pixel transformation. </p>
<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. For time axes, world[][wcs.time] is the time coordinate.</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 <picture><source srcset="form_32_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$x$" src="form_32.png" width="8" height="6"/></picture>-, and <picture><source srcset="form_33_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$y$" src="form_33.png" width="8" height="9"/></picture>-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. For time axes, imgcrd[][wcs.time] is the intermediate time coordinate. </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>
</ul>
1+: A bit mask indicating invalid world coordinate element(s).</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 > 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 id="a1c1971f6d8e8667a1f5acb4bebd65c6f" name="a1c1971f6d8e8667a1f5acb4bebd65c6f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c1971f6d8e8667a1f5acb4bebd65c6f">◆ </a></span>wcsmix()</h2>
<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> * </td>
<td class="paramname"><em>wcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>mixpix</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>mixcel</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const double </td>
<td class="paramname"><em>vspan</em>[2], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>vstep</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>viter</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>world</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>phi</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>theta</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>imgcrd</em>[], </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>pixcrd</em>[] </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Hybrid coordinate transformation. </p>
<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 <picture><source srcset="form_32_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$x$" src="form_32.png" width="8" height="6"/></picture>-, and <picture><source srcset="form_33_dark.png" media="(prefers-color-scheme: dark)"/><img class="formulaInl" alt="$y$" src="form_33.png" width="8" height="9"/></picture>-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 > 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 />
</p><ol>
<li>
<p class="startli">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 class="interli">Once one solution has been determined others may be found by subsequent invokations of <b>wcsmix</b>() with suitably restricted solution intervals.</p>
<p class="interli">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 class="endli">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>
</li>
</ol>
</div>
</div>
<a id="a7b788938019a60c322d5cb82df7068d4" name="a7b788938019a60c322d5cb82df7068d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b788938019a60c322d5cb82df7068d4">◆ </a></span>wcsccs()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int wcsccs </td>
<td>(</td>
<td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> * </td>
<td class="paramname"><em>wcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>lng2p1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>lat2p1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>lng1p2</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>clng</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>clat</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>radesys</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">double </td>
<td class="paramname"><em>equinox</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char * </td>
<td class="paramname"><em>alt</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change celestial coordinate system. </p>
<p><b>wcsccs</b>() changes the celestial coordinate system of a wcsprm struct. For example, from equatorial to galactic coordinates.</p>
<p>Parameters that define the spherical coordinate transformation, essentially being three Euler angles, must be provided. Thereby <b>wcsccs</b>() does not need prior knowledge of specific celestial coordinate systems. It also has the advantage of making it completely general.</p>
<p>Auxiliary members of the wcsprm struct relating to equatorial celestial coordinate systems may also be changed.</p>
<p>Only orthodox spherical coordinate systems are supported. That is, they must be right-handed, with latitude increasing from zero at the equator to +90 degrees at the pole. This precludes systems such as aziumuth and zenith distance, which, however, could be handled as negative azimuth and elevation.</p>
<p><b>PLEASE NOTE:</b> Information in the wcsprm struct relating to the original coordinate system will be overwritten and therefore lost. If this is undesirable, invoke <b>wcsccs</b>() on a copy of the struct made with <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct.">wcssub()</a>. The wcsprm struct is reset on return with an explicit call to <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,out]</td><td class="paramname">wcs</td><td>Coordinate transformation parameters. Particular "values to be given" elements of the wcsprm struct are modified.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">lng2p1,lat2p1</td><td>Longitude and latitude in the new celestial coordinate system of the pole (i.e. latitude +90) of the original system [deg]. See notes 1 and 2 below. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">lng1p2</td><td>Longitude in the original celestial coordinate system of the pole (i.e. latitude +90) of the new system [deg]. See note 1 below. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">clng,clat</td><td>Longitude and latitude identifiers of the new <code><b>CTYPE</b>ia</code> celestial axis codes, without trailing dashes. For example, "RA" and "DEC" or "GLON" and "GLAT". Up to four characters are used, longer strings need not be null-terminated. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">radesys</td><td>Used when transforming to equatorial coordinates, identified by clng == "RA" and clat = "DEC". May be set to the null pointer to preserve the current value. Up to 71 characters are used, longer strings need not be null-terminated. <br />
If the new coordinate system is anything other than equatorial, then <a class="el" href="structwcsprm.html#a65801f93622504672ee3faf8f2110e48">wcsprm::radesys</a> will be cleared. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">equinox</td><td>Used when transforming to equatorial coordinates. May be set to zero to preserve the current value. <br />
If the new coordinate system is not equatorial, then <a class="el" href="structwcsprm.html#a88b55f6c8d122f3ff63532de85698864">wcsprm::equinox</a> will be marked as undefined. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">alt</td><td>Character code for alternate coordinate descriptions (i.e. the '<b>a</b>' in keyword names such as <code><b>CTYPE</b>ia</code>). This is blank for the primary coordinate description, or one of the 26 upper-case letters, A-Z. May be set to the null pointer, or null string if no change is required.</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>12: Invalid subimage specification (no celestial axes).</li>
</ul>
</dd></dl>
<p><b>Notes:</b> <br />
</p><ol>
<li>
<p class="startli">Follows the prescription given in WCS Paper II, Sect. 2.7 for changing celestial coordinates.</p>
<p class="interli">The implementation takes account of indeterminacies that arise in that prescription in the particular cases where one of the poles of the new system is at the fiducial point, or one of them is at the native pole.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">If lat2p1 == +90, i.e. where the poles of the two coordinate systems coincide, then the spherical coordinate transformation becomes a simple change in origin of longitude given by lng2 = lng1 + (lng2p1 - lng1p2 - 180), and lat2 = lat1, where (lng2,lat2) are coordinates in the new system, and (lng1,lat1) are coordinates in the original system.</p>
<p class="interli">Likewise, if lat2p1 == -90, then lng2 = -lng1 + (lng2p1 + lng1p2), and lat2 = -lat1.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">For example, if the original coordinate system is B1950 equatorial and the desired new coordinate system is galactic, then</p>
<ul>
<li>
<p class="startli">(lng2p1,lat2p1) are the galactic coordinates of the B1950 celestial pole, defined by the IAU to be (123.0,+27.4), and lng1p2 is the B1950 right ascension of the galactic pole, defined as 192.25. Clearly these coordinates are fixed for a particular coordinate transformation.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">(clng,clat) would be '<code><b>GLON</b></code>' and '<code><b>GLAT</b></code>', these being the FITS standard identifiers for galactic coordinates.</p>
<p class="endli"></p>
</li>
<li>
Since the new coordinate system is not equatorial, <a class="el" href="structwcsprm.html#a65801f93622504672ee3faf8f2110e48">wcsprm::radesys</a> and <a class="el" href="structwcsprm.html#a88b55f6c8d122f3ff63532de85698864">wcsprm::equinox</a> will be cleared. </li>
</ul>
</li>
</ol>
<p>4. The coordinates required for some common transformations (obtained from <a href="https://ned.ipac.caltech.edu/coordinate_calculator">https://ned.ipac.caltech.edu/coordinate_calculator</a>) are as follows: </p><div class="fragment"><div class="line">(123.0000,+27.4000) galactic coordinates of B1950 celestial pole,</div>
<div class="line">(192.2500,+27.4000) B1950 equatorial coordinates of galactic pole.</div>
</div><!-- fragment --> <div class="fragment"><div class="line">(122.9319,+27.1283) galactic coordinates of J2000 celestial pole,</div>
<div class="line">(192.8595,+27.1283) J2000 equatorial coordinates of galactic pole.</div>
</div><!-- fragment --> <div class="fragment"><div class="line">(359.6774,+89.7217) B1950 equatorial coordinates of J2000 pole,</div>
<div class="line">(180.3162,+89.7217) J2000 equatorial coordinates of B1950 pole.</div>
</div><!-- fragment --> <div class="fragment"><div class="line">(270.0000,+66.5542) B1950 equatorial coordinates of B1950 ecliptic pole,</div>
<div class="line">( 90.0000,+66.5542) B1950 ecliptic coordinates of B1950 celestial pole.</div>
</div><!-- fragment --> <div class="fragment"><div class="line">(270.0000,+66.5607) J2000 equatorial coordinates of J2000 ecliptic pole,</div>
<div class="line">( 90.0000,+66.5607) J2000 ecliptic coordinates of J2000 celestial pole.</div>
</div><!-- fragment --> <div class="fragment"><div class="line">( 26.7315,+15.6441) supergalactic coordinates of B1950 celestial pole,</div>
<div class="line">(283.1894,+15.6441) B1950 equatorial coordinates of supergalactic pole.</div>
</div><!-- fragment --> <div class="fragment"><div class="line">( 26.4505,+15.7089) supergalactic coordinates of J2000 celestial pole,</div>
<div class="line">(283.7542,+15.7089) J2000 equatorial coordinates of supergalactic pole.</div>
</div><!-- fragment -->
</div>
</div>
<a id="a57975833fe0588eb7c7b6d79f13a7693" name="a57975833fe0588eb7c7b6d79f13a7693"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a57975833fe0588eb7c7b6d79f13a7693">◆ </a></span>wcssptr()</h2>
<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> * </td>
<td class="paramname"><em>wcs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int * </td>
<td class="paramname"><em>i</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char </td>
<td class="paramname"><em>ctype</em>[9] </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Spectral axis translation. </p>
<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>
<p><b>PLEASE NOTE:</b> Information in the wcsprm struct relating to the original coordinate system will be overwritten and therefore lost. If this is undesirable, invoke <b>wcssptr</b>() on a copy of the struct made with <a class="el" href="wcs_8h.html#a864c99fef9f3eee29085ce42d0ee0d64" title="Subimage extraction routine for the wcsprm struct.">wcssub()</a>. The wcsprm struct is reset on return with an explicit call to <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,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 < 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 > 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 id="ad875ce4317d85c893f64afe10ab1630e" name="ad875ce4317d85c893f64afe10ab1630e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad875ce4317d85c893f64afe10ab1630e">◆ </a></span>wcslib_version()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char * wcslib_version </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>vers</em>[3]</td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a id="a819013c42cbcb3c00603539c1d2aae2b" name="a819013c42cbcb3c00603539c1d2aae2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a819013c42cbcb3c00603539c1d2aae2b">◆ </a></span>wcs_errmsg</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const char* wcs_errmsg[]</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">extern</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Nov 29 2023 19:09:57 for WCSLIB by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>