Sophie

Sophie

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

lib64wcs-devel-4.18-2.mga4.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>WCSLIB 4.18: wcshdr.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">WCSLIB 4.18
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_af99bb3c152a306abd27951285ad1127.html">C</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">wcshdr.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="wcs_8h_source.html">wcs.h</a>&quot;</code><br/>
</div>
<p><a href="wcshdr_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a92a0007f672a5498ab1b6ccc6a4a002b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a92a0007f672a5498ab1b6ccc6a4a002b">WCSHDR_none</a>&#160;&#160;&#160;0x00000000</td></tr>
<tr class="memdesc:a92a0007f672a5498ab1b6ccc6a4a002b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - reject all extensions.  <a href="#a92a0007f672a5498ab1b6ccc6a4a002b">More...</a><br/></td></tr>
<tr class="separator:a92a0007f672a5498ab1b6ccc6a4a002b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b9b53e5cfd05653cbca75cf1aa8b2ed"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a0b9b53e5cfd05653cbca75cf1aa8b2ed">WCSHDR_all</a>&#160;&#160;&#160;0x000FFFFF</td></tr>
<tr class="memdesc:a0b9b53e5cfd05653cbca75cf1aa8b2ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept all extensions.  <a href="#a0b9b53e5cfd05653cbca75cf1aa8b2ed">More...</a><br/></td></tr>
<tr class="separator:a0b9b53e5cfd05653cbca75cf1aa8b2ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd6d52bed79bd48230f651ac48eb5ca6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#afd6d52bed79bd48230f651ac48eb5ca6">WCSHDR_reject</a>&#160;&#160;&#160;0x10000000</td></tr>
<tr class="memdesc:afd6d52bed79bd48230f651ac48eb5ca6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - reject non-standard keywords.  <a href="#afd6d52bed79bd48230f651ac48eb5ca6">More...</a><br/></td></tr>
<tr class="separator:afd6d52bed79bd48230f651ac48eb5ca6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a017f1e817bdb2114ba765e7a9ef73bac"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a017f1e817bdb2114ba765e7a9ef73bac">WCSHDR_CROTAia</a>&#160;&#160;&#160;0x00000001</td></tr>
<tr class="memdesc:a017f1e817bdb2114ba765e7a9ef73bac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>CROTA</b>ia</code>, <code>i<b>CROT</b>na</code>, <code><b>TCROT</b>na</code>.  <a href="#a017f1e817bdb2114ba765e7a9ef73bac">More...</a><br/></td></tr>
<tr class="separator:a017f1e817bdb2114ba765e7a9ef73bac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5feeef18919b1cbb79729bbfa75976ec"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a5feeef18919b1cbb79729bbfa75976ec">WCSHDR_EPOCHa</a>&#160;&#160;&#160;0x00000002</td></tr>
<tr class="memdesc:a5feeef18919b1cbb79729bbfa75976ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>EPOCH</b>a</code>.  <a href="#a5feeef18919b1cbb79729bbfa75976ec">More...</a><br/></td></tr>
<tr class="separator:a5feeef18919b1cbb79729bbfa75976ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc0a5a6b475a8e50b77d4be099790985"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#afc0a5a6b475a8e50b77d4be099790985">WCSHDR_VELREFa</a>&#160;&#160;&#160;0x00000004</td></tr>
<tr class="memdesc:afc0a5a6b475a8e50b77d4be099790985"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>VELREF</b>a</code>.  <a href="#afc0a5a6b475a8e50b77d4be099790985">More...</a><br/></td></tr>
<tr class="separator:afc0a5a6b475a8e50b77d4be099790985"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a63eb554461f3df5dc64a25f71891b9f1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a63eb554461f3df5dc64a25f71891b9f1">WCSHDR_CD00i00j</a>&#160;&#160;&#160;0x00000008</td></tr>
<tr class="memdesc:a63eb554461f3df5dc64a25f71891b9f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>CD00</b>i<b>00</b>j</code>.  <a href="#a63eb554461f3df5dc64a25f71891b9f1">More...</a><br/></td></tr>
<tr class="separator:a63eb554461f3df5dc64a25f71891b9f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3dea9d7548bdbc9a7cc8d0a04cdd46fb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a3dea9d7548bdbc9a7cc8d0a04cdd46fb">WCSHDR_PC00i00j</a>&#160;&#160;&#160;0x00000010</td></tr>
<tr class="memdesc:a3dea9d7548bdbc9a7cc8d0a04cdd46fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>PC00</b>i<b>00</b>j</code>.  <a href="#a3dea9d7548bdbc9a7cc8d0a04cdd46fb">More...</a><br/></td></tr>
<tr class="separator:a3dea9d7548bdbc9a7cc8d0a04cdd46fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee4fe41274945f9e34009d2eb309c922"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#aee4fe41274945f9e34009d2eb309c922">WCSHDR_PROJPn</a>&#160;&#160;&#160;0x00000020</td></tr>
<tr class="memdesc:aee4fe41274945f9e34009d2eb309c922"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>PROJP</b>n</code>.  <a href="#aee4fe41274945f9e34009d2eb309c922">More...</a><br/></td></tr>
<tr class="separator:aee4fe41274945f9e34009d2eb309c922"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d506ef2ad493a963426e0732a6328ca"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a1d506ef2ad493a963426e0732a6328ca">WCSHDR_RADECSYS</a>&#160;&#160;&#160;0x00000040</td></tr>
<tr class="memdesc:a1d506ef2ad493a963426e0732a6328ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>RADECSYS</b></code>.  <a href="#a1d506ef2ad493a963426e0732a6328ca">More...</a><br/></td></tr>
<tr class="separator:a1d506ef2ad493a963426e0732a6328ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b66d50d7f1927222a170bc88f9db51e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a1b66d50d7f1927222a170bc88f9db51e">WCSHDR_VSOURCE</a>&#160;&#160;&#160;0x00000080</td></tr>
<tr class="memdesc:a1b66d50d7f1927222a170bc88f9db51e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>VSOURCE</b>a</code>.  <a href="#a1b66d50d7f1927222a170bc88f9db51e">More...</a><br/></td></tr>
<tr class="separator:a1b66d50d7f1927222a170bc88f9db51e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adff9a101a373a634f3a1baab29e92534"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#adff9a101a373a634f3a1baab29e92534">WCSHDR_DOBSn</a>&#160;&#160;&#160;0x00000100</td></tr>
<tr class="memdesc:adff9a101a373a634f3a1baab29e92534"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>DOBS</b>n</code>.  <a href="#adff9a101a373a634f3a1baab29e92534">More...</a><br/></td></tr>
<tr class="separator:adff9a101a373a634f3a1baab29e92534"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8a768f544fe3ae81436b73dca3099fb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#ae8a768f544fe3ae81436b73dca3099fb">WCSHDR_LONGKEY</a>&#160;&#160;&#160;0x00000200</td></tr>
<tr class="memdesc:ae8a768f544fe3ae81436b73dca3099fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept long forms of the alternate binary table and pixel list WCS keywords.  <a href="#ae8a768f544fe3ae81436b73dca3099fb">More...</a><br/></td></tr>
<tr class="separator:ae8a768f544fe3ae81436b73dca3099fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf57a609a5c3f7288452cce86210260e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#adf57a609a5c3f7288452cce86210260e">WCSHDR_CNAMn</a>&#160;&#160;&#160;0x00000400</td></tr>
<tr class="memdesc:adf57a609a5c3f7288452cce86210260e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code>i<b>CNAM</b>n</code>, <code><b>TCNAM</b>n</code>, <code>i<b>CRDE</b>n</code>, <code><b>TCRDE</b>n</code>, <code>i<b>CSYE</b>n</code>, <code><b>TCSYE</b>n</code>.  <a href="#adf57a609a5c3f7288452cce86210260e">More...</a><br/></td></tr>
<tr class="separator:adf57a609a5c3f7288452cce86210260e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e8eb873389e9c15bd6079a96c41ad60"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a0e8eb873389e9c15bd6079a96c41ad60">WCSHDR_AUXIMG</a>&#160;&#160;&#160;0x00000800</td></tr>
<tr class="memdesc:a0e8eb873389e9c15bd6079a96c41ad60"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - allow the image-header form of an auxiliary WCS keyword to provide a default value for all images.  <a href="#a0e8eb873389e9c15bd6079a96c41ad60">More...</a><br/></td></tr>
<tr class="separator:a0e8eb873389e9c15bd6079a96c41ad60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33d67fd81c52448aead9e09f32ba9cca"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a33d67fd81c52448aead9e09f32ba9cca">WCSHDR_ALLIMG</a>&#160;&#160;&#160;0x00001000</td></tr>
<tr class="memdesc:a33d67fd81c52448aead9e09f32ba9cca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - allow the image-header form of <em>all</em> image header WCS keywords to provide a default value for all images.  <a href="#a33d67fd81c52448aead9e09f32ba9cca">More...</a><br/></td></tr>
<tr class="separator:a33d67fd81c52448aead9e09f32ba9cca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab65e929c7d525d735ae240046d4f0d9c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#ab65e929c7d525d735ae240046d4f0d9c">WCSHDR_IMGHEAD</a>&#160;&#160;&#160;0x00010000</td></tr>
<tr class="memdesc:ab65e929c7d525d735ae240046d4f0d9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - restrict to image header keywords only.  <a href="#ab65e929c7d525d735ae240046d4f0d9c">More...</a><br/></td></tr>
<tr class="separator:ab65e929c7d525d735ae240046d4f0d9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7c5021293b0db20ece0e82c3702a159"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#aa7c5021293b0db20ece0e82c3702a159">WCSHDR_BIMGARR</a>&#160;&#160;&#160;0x00020000</td></tr>
<tr class="memdesc:aa7c5021293b0db20ece0e82c3702a159"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - restrict to binary table image array keywords only.  <a href="#aa7c5021293b0db20ece0e82c3702a159">More...</a><br/></td></tr>
<tr class="separator:aa7c5021293b0db20ece0e82c3702a159"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7bf13ab87b23ecdbbb4b4847d4944070"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a7bf13ab87b23ecdbbb4b4847d4944070">WCSHDR_PIXLIST</a>&#160;&#160;&#160;0x00040000</td></tr>
<tr class="memdesc:a7bf13ab87b23ecdbbb4b4847d4944070"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - restrict to pixel list keywords only.  <a href="#a7bf13ab87b23ecdbbb4b4847d4944070">More...</a><br/></td></tr>
<tr class="separator:a7bf13ab87b23ecdbbb4b4847d4944070"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a54634ed49425e8842874e9e2b77899df"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a54634ed49425e8842874e9e2b77899df">WCSHDO_none</a>&#160;&#160;&#160;0x00</td></tr>
<tr class="memdesc:a54634ed49425e8842874e9e2b77899df"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - don't write any extensions.  <a href="#a54634ed49425e8842874e9e2b77899df">More...</a><br/></td></tr>
<tr class="separator:a54634ed49425e8842874e9e2b77899df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5592649ee4c25e118559c6d283c51930"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a5592649ee4c25e118559c6d283c51930">WCSHDO_all</a>&#160;&#160;&#160;0xFF</td></tr>
<tr class="memdesc:a5592649ee4c25e118559c6d283c51930"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - write all extensions.  <a href="#a5592649ee4c25e118559c6d283c51930">More...</a><br/></td></tr>
<tr class="separator:a5592649ee4c25e118559c6d283c51930"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a446914676e0b3f55ac6a080015a52b43"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a446914676e0b3f55ac6a080015a52b43">WCSHDO_safe</a>&#160;&#160;&#160;0x0F</td></tr>
<tr class="memdesc:a446914676e0b3f55ac6a080015a52b43"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - write safe extensions only.  <a href="#a446914676e0b3f55ac6a080015a52b43">More...</a><br/></td></tr>
<tr class="separator:a446914676e0b3f55ac6a080015a52b43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6779d48001260a0011b3dcffdcb64cb6"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a6779d48001260a0011b3dcffdcb64cb6">WCSHDO_DOBSn</a>&#160;&#160;&#160;0x01</td></tr>
<tr class="memdesc:a6779d48001260a0011b3dcffdcb64cb6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - write <code><b>DOBS</b>n</code>.  <a href="#a6779d48001260a0011b3dcffdcb64cb6">More...</a><br/></td></tr>
<tr class="separator:a6779d48001260a0011b3dcffdcb64cb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96b787f84207faa42599e50e6e078d21"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a96b787f84207faa42599e50e6e078d21">WCSHDO_TPCn_ka</a>&#160;&#160;&#160;0x02</td></tr>
<tr class="memdesc:a96b787f84207faa42599e50e6e078d21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - write <code><b>TPC</b>n<b>_</b>ka</code>.  <a href="#a96b787f84207faa42599e50e6e078d21">More...</a><br/></td></tr>
<tr class="separator:a96b787f84207faa42599e50e6e078d21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a222a5bd7659f3e1ea1a9ed21f54c50ef"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a222a5bd7659f3e1ea1a9ed21f54c50ef">WCSHDO_PVn_ma</a>&#160;&#160;&#160;0x04</td></tr>
<tr class="memdesc:a222a5bd7659f3e1ea1a9ed21f54c50ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - write <code>i<b>PV</b>n<b>_</b>ma</code>, <code><b>TPV</b>n<b>_</b>ma</code>, <code>i<b>PS</b>n<b>_</b>ma</code>, <code><b>TPS</b>n<b>_</b>ma</code>.  <a href="#a222a5bd7659f3e1ea1a9ed21f54c50ef">More...</a><br/></td></tr>
<tr class="separator:a222a5bd7659f3e1ea1a9ed21f54c50ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aace96fb8c1499616dd1333af3e8340b0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#aace96fb8c1499616dd1333af3e8340b0">WCSHDO_CRPXna</a>&#160;&#160;&#160;0x08</td></tr>
<tr class="memdesc:aace96fb8c1499616dd1333af3e8340b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - write <code>j<b>CRPX</b>na</code>, <code><b>TCRPX</b>na</code>, <code>i<b>CDLT</b>na</code>, <code><b>TCDLT</b>na</code>, <code>i<b>CUNI</b>na</code>, <code><b>TCUNI</b>na</code>, <code>i<b>CTYP</b>na</code>, <code><b>TCTYP</b>na</code>, <code>i<b>CRVL</b>na</code>, <code><b>TCRVL</b>na</code>.  <a href="#aace96fb8c1499616dd1333af3e8340b0">More...</a><br/></td></tr>
<tr class="separator:aace96fb8c1499616dd1333af3e8340b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a95325b53ebd8d7d0a371a65b27b3d04a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a95325b53ebd8d7d0a371a65b27b3d04a">WCSHDO_CNAMna</a>&#160;&#160;&#160;0x10</td></tr>
<tr class="memdesc:a95325b53ebd8d7d0a371a65b27b3d04a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - write <code>i<b>CNAM</b>na</code>, <code><b>TCNAM</b>na</code>, <code>i<b>CRDE</b>na</code>, <code><b>TCRDE</b>na</code>, <code>i<b>CSYE</b>na</code>, <code><b>TCSYE</b>na</code>.  <a href="#a95325b53ebd8d7d0a371a65b27b3d04a">More...</a><br/></td></tr>
<tr class="separator:a95325b53ebd8d7d0a371a65b27b3d04a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9a70ad2a355a9736711d8017535bf72b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a9a70ad2a355a9736711d8017535bf72b">WCSHDO_WCSNna</a>&#160;&#160;&#160;0x20</td></tr>
<tr class="memdesc:a9a70ad2a355a9736711d8017535bf72b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bit mask for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - write <code><b>WCSN</b>na</code> instead of <code><b>TWCS</b>na</code>  <a href="#a9a70ad2a355a9736711d8017535bf72b">More...</a><br/></td></tr>
<tr class="separator:a9a70ad2a355a9736711d8017535bf72b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ae2dfc36c150d3a16a5e83131d32ecdae"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#ae2dfc36c150d3a16a5e83131d32ecdae">wcshdr_errmsg_enum</a> { <br/>
&#160;&#160;<a class="el" href="wcshdr_8h.html#ae2dfc36c150d3a16a5e83131d32ecdaeabfe69dd9e4c486f856a5dc44b02e79a1">WCSHDRERR_SUCCESS</a> = 0, 
<a class="el" href="wcshdr_8h.html#ae2dfc36c150d3a16a5e83131d32ecdaea99dd31e274ec97542e650ff89357cded">WCSHDRERR_NULL_POINTER</a> = 1, 
<a class="el" href="wcshdr_8h.html#ae2dfc36c150d3a16a5e83131d32ecdaea0a858638ef0dd0dc9b529f98b14cc46f">WCSHDRERR_MEMORY</a> = 2, 
<a class="el" href="wcshdr_8h.html#ae2dfc36c150d3a16a5e83131d32ecdaea0c926e2cc98a8c39585aa0e212423459">WCSHDRERR_BAD_COLUMN</a> = 3, 
<br/>
&#160;&#160;<a class="el" href="wcshdr_8h.html#ae2dfc36c150d3a16a5e83131d32ecdaea218297c7a2a4d405c251e9ed239e615b">WCSHDRERR_PARSER</a> = 4, 
<a class="el" href="wcshdr_8h.html#ae2dfc36c150d3a16a5e83131d32ecdaeaeae58359638c0c631e6c7c573a343508">WCSHDRERR_BAD_TABULAR_PARAMS</a> = 5
<br/>
 }</td></tr>
<tr class="separator:ae2dfc36c150d3a16a5e83131d32ecdae"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ac75623ee805ab7d43b0bba684c719a60"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60">wcspih</a> (char *header, int nkeyrec, int relax, int ctrl, int *nreject, int *nwcs, struct <a class="el" href="structwcsprm.html">wcsprm</a> **wcs)</td></tr>
<tr class="memdesc:ac75623ee805ab7d43b0bba684c719a60"><td class="mdescLeft">&#160;</td><td class="mdescRight">FITS WCS parser routine for image headers.  <a href="#ac75623ee805ab7d43b0bba684c719a60">More...</a><br/></td></tr>
<tr class="separator:ac75623ee805ab7d43b0bba684c719a60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc053d80a9c4da454a52eed34e123633"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633">wcsbth</a> (char *header, int nkeyrec, int relax, int ctrl, int keysel, int *colsel, int *nreject, int *nwcs, struct <a class="el" href="structwcsprm.html">wcsprm</a> **wcs)</td></tr>
<tr class="memdesc:adc053d80a9c4da454a52eed34e123633"><td class="mdescLeft">&#160;</td><td class="mdescRight">FITS WCS parser routine for binary table and image headers.  <a href="#adc053d80a9c4da454a52eed34e123633">More...</a><br/></td></tr>
<tr class="separator:adc053d80a9c4da454a52eed34e123633"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6dd857f7b61a5b349cc8af5a4b6d8a1c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a6dd857f7b61a5b349cc8af5a4b6d8a1c">wcstab</a> (struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs)</td></tr>
<tr class="memdesc:a6dd857f7b61a5b349cc8af5a4b6d8a1c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tabular construction routine.  <a href="#a6dd857f7b61a5b349cc8af5a4b6d8a1c">More...</a><br/></td></tr>
<tr class="separator:a6dd857f7b61a5b349cc8af5a4b6d8a1c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6174a483baad91dae3fa1c30b0e4cde5"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a6174a483baad91dae3fa1c30b0e4cde5">wcsidx</a> (int nwcs, struct <a class="el" href="structwcsprm.html">wcsprm</a> **wcs, int alts[27])</td></tr>
<tr class="memdesc:a6174a483baad91dae3fa1c30b0e4cde5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Index alternate coordinate representations.  <a href="#a6174a483baad91dae3fa1c30b0e4cde5">More...</a><br/></td></tr>
<tr class="separator:a6174a483baad91dae3fa1c30b0e4cde5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16e35904c64fe6b0aab144bd022c722f"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a16e35904c64fe6b0aab144bd022c722f">wcsbdx</a> (int nwcs, struct <a class="el" href="structwcsprm.html">wcsprm</a> **wcs, int type, short alts[1000][28])</td></tr>
<tr class="memdesc:a16e35904c64fe6b0aab144bd022c722f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Index alternate coordinate representions.  <a href="#a16e35904c64fe6b0aab144bd022c722f">More...</a><br/></td></tr>
<tr class="separator:a16e35904c64fe6b0aab144bd022c722f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27465844aaeea0623133f8151ca4fd9b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a27465844aaeea0623133f8151ca4fd9b">wcsvfree</a> (int *nwcs, struct <a class="el" href="structwcsprm.html">wcsprm</a> **wcs)</td></tr>
<tr class="memdesc:a27465844aaeea0623133f8151ca4fd9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free the array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs.  <a href="#a27465844aaeea0623133f8151ca4fd9b">More...</a><br/></td></tr>
<tr class="separator:a27465844aaeea0623133f8151ca4fd9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b8372e555a2e2bcc63a11f3dc7a1bf6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6">wcshdo</a> (int relax, struct <a class="el" href="structwcsprm.html">wcsprm</a> *wcs, int *nkeyrec, char **header)</td></tr>
<tr class="memdesc:a0b8372e555a2e2bcc63a11f3dc7a1bf6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Write out a <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct as a FITS header.  <a href="#a0b8372e555a2e2bcc63a11f3dc7a1bf6">More...</a><br/></td></tr>
<tr class="separator:a0b8372e555a2e2bcc63a11f3dc7a1bf6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a06cd9297f8315235ba1cf13d1cc115e1"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="wcshdr_8h.html#a06cd9297f8315235ba1cf13d1cc115e1">wcshdr_errmsg</a> []</td></tr>
<tr class="memdesc:a06cd9297f8315235ba1cf13d1cc115e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Status return messages.  <a href="#a06cd9297f8315235ba1cf13d1cc115e1">More...</a><br/></td></tr>
<tr class="separator:a06cd9297f8315235ba1cf13d1cc115e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Routines in this suite are aimed at extracting WCS information from a FITS file. They provide the high-level interface between the FITS file and the WCS coordinate transformation routines.</p>
<p>Additionally, function <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> is provided to write out the contents of a <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct as a FITS header.</p>
<p>Briefly, the anticipated sequence of operations is as follows:</p>
<ul>
<li>
<p class="startli">1: Open the FITS file and read the image or binary table header, e.g. using CFITSIO routine <em>fits_hdr2str()</em>.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">2: Parse the header using <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> or <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a>; they will automatically interpret <code>'<b>TAB</b>'</code> header keywords using <a class="el" href="wcshdr_8h.html#a6dd857f7b61a5b349cc8af5a4b6d8a1c" title="Tabular construction routine. ">wcstab()</a>.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">3: Allocate memory for, and read <code>'<b>TAB</b>'</code> arrays from the binary table extension, e.g. using CFITSIO routine <a class="el" href="getwcstab_8h.html#a96c804d78d44901bc5d497b30e47b7ad" title="FITS &#39;TAB&#39; table reading routine. ">fits_read_wcstab()</a> - refer to the prologue of <a class="el" href="getwcstab_8h.html">getwcstab.h</a>. <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct. ">wcsset()</a> will automatically take control of this allocated memory, in particular causing it to be free'd by <a class="el" href="wcs_8h.html#a4ab38bc642c4656f62c43acf84a849f1" title="Destructor for the wcsprm struct. ">wcsfree()</a>.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">4: Translate non-standard WCS usage using <a class="el" href="wcsfix_8h.html#a89e1b5b4d2fa89af03f5d1143352b05f" title="Translate a non-standard WCS struct. ">wcsfix()</a>, see <a class="el" href="wcsfix_8h.html">wcsfix.h</a>.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">5: Initialize <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct(s) using <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct. ">wcsset()</a> and calculate coordinates using <a class="el" href="wcs_8h.html#a27d3dd209db3e76cf4c50f48c01ba986" title="Pixel-to-world transformation. ">wcsp2s()</a> and/or <a class="el" href="wcs_8h.html#a60673d05a3513659ac848a9cb3d0cb07" title="World-to-pixel transformation. ">wcss2p()</a>. Refer to the prologue of <a class="el" href="wcs_8h.html">wcs.h</a> for a description of these and other high-level WCS coordinate transformation routines.</p>
<p class="endli"></p>
</li>
<li>
6: Clean up by freeing memory with <a class="el" href="wcshdr_8h.html#a27465844aaeea0623133f8151ca4fd9b" title="Free the array of wcsprm structs. ">wcsvfree()</a>. </li>
</ul>
<p><b>In detail:</b> <br/>
</p>
<ul>
<li><a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> is a high-level FITS WCS routine that parses an image header. It returns an array of up to 27 <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs on each of which it invokes <a class="el" href="wcshdr_8h.html#a6dd857f7b61a5b349cc8af5a4b6d8a1c" title="Tabular construction routine. ">wcstab()</a>.</li>
<li><a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> is the analogue of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> for use with binary tables; it handles image array and pixel list keywords. As an extension of the FITS WCS standard, it also recognizes image header keywords which may be used to provide default values via an inheritance mechanism.</li>
<li><a class="el" href="wcshdr_8h.html#a6dd857f7b61a5b349cc8af5a4b6d8a1c" title="Tabular construction routine. ">wcstab()</a> assists in filling in members of the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct associated with coordinate lookup tables (<code>'<b>TAB</b>'</code>). These are based on arrays stored in a FITS binary table extension (BINTABLE) that are located by <code><b>PV</b>i<b>_</b>ma</code> keywords in the image header.</li>
<li><a class="el" href="wcshdr_8h.html#a6174a483baad91dae3fa1c30b0e4cde5" title="Index alternate coordinate representations. ">wcsidx()</a> and <a class="el" href="wcshdr_8h.html#a16e35904c64fe6b0aab144bd022c722f" title="Index alternate coordinate representions. ">wcsbdx()</a> are utility routines that return the index for a specified alternate coordinate descriptor in the array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs returned by <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> or <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a>.</li>
<li><a class="el" href="wcshdr_8h.html#a27465844aaeea0623133f8151ca4fd9b" title="Free the array of wcsprm structs. ">wcsvfree()</a> deallocates memory for an array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs, such as returned by <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> or <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a>.</li>
<li><a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> writes out a <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct as a FITS header. </li>
</ul>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a92a0007f672a5498ab1b6ccc6a4a002b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_none&#160;&#160;&#160;0x00000000</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - reject all extensions.</p>
<p>Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </p>

</div>
</div>
<a class="anchor" id="a0b9b53e5cfd05653cbca75cf1aa8b2ed"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_all&#160;&#160;&#160;0x000FFFFF</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept all extensions.</p>
<p>Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </p>

</div>
</div>
<a class="anchor" id="afd6d52bed79bd48230f651ac48eb5ca6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_reject&#160;&#160;&#160;0x10000000</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - reject non-standard keywords.</p>
<p>Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </p>

</div>
</div>
<a class="anchor" id="a017f1e817bdb2114ba765e7a9ef73bac"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_CROTAia&#160;&#160;&#160;0x00000001</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>CROTA</b>ia</code>, <code>i<b>CROT</b>na</code>, <code><b>TCROT</b>na</code>.</p>
<p>Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </p>

</div>
</div>
<a class="anchor" id="a5feeef18919b1cbb79729bbfa75976ec"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_EPOCHa&#160;&#160;&#160;0x00000002</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>EPOCH</b>a</code>.</p>
<p>Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </p>

</div>
</div>
<a class="anchor" id="afc0a5a6b475a8e50b77d4be099790985"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_VELREFa&#160;&#160;&#160;0x00000004</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>VELREF</b>a</code>.</p>
<p>Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </p>

</div>
</div>
<a class="anchor" id="a63eb554461f3df5dc64a25f71891b9f1"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_CD00i00j&#160;&#160;&#160;0x00000008</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>CD00</b>i<b>00</b>j</code>.</p>
<p>Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </p>

</div>
</div>
<a class="anchor" id="a3dea9d7548bdbc9a7cc8d0a04cdd46fb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_PC00i00j&#160;&#160;&#160;0x00000010</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>PC00</b>i<b>00</b>j</code>.</p>
<p>Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </p>

</div>
</div>
<a class="anchor" id="aee4fe41274945f9e34009d2eb309c922"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_PROJPn&#160;&#160;&#160;0x00000020</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>PROJP</b>n</code>.</p>
<p>Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </p>

</div>
</div>
<a class="anchor" id="a1d506ef2ad493a963426e0732a6328ca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_RADECSYS&#160;&#160;&#160;0x00000040</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>RADECSYS</b></code>.</p>
<p>Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </p>

</div>
</div>
<a class="anchor" id="a1b66d50d7f1927222a170bc88f9db51e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_VSOURCE&#160;&#160;&#160;0x00000080</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>VSOURCE</b>a</code>.</p>
<p>Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </p>

</div>
</div>
<a class="anchor" id="adff9a101a373a634f3a1baab29e92534"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_DOBSn&#160;&#160;&#160;0x00000100</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code><b>DOBS</b>n</code>.</p>
<p>Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </p>

</div>
</div>
<a class="anchor" id="ae8a768f544fe3ae81436b73dca3099fb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_LONGKEY&#160;&#160;&#160;0x00000200</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept long forms of the alternate binary table and pixel list WCS keywords.</p>
<p>Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </p>

</div>
</div>
<a class="anchor" id="adf57a609a5c3f7288452cce86210260e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_CNAMn&#160;&#160;&#160;0x00000400</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - accept <code>i<b>CNAM</b>n</code>, <code><b>TCNAM</b>n</code>, <code>i<b>CRDE</b>n</code>, <code><b>TCRDE</b>n</code>, <code>i<b>CSYE</b>n</code>, <code><b>TCSYE</b>n</code>.</p>
<p>Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </p>

</div>
</div>
<a class="anchor" id="a0e8eb873389e9c15bd6079a96c41ad60"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_AUXIMG&#160;&#160;&#160;0x00000800</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - allow the image-header form of an auxiliary WCS keyword with representation-wide scope to provide a default value for all images.</p>
<p>Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </p>

</div>
</div>
<a class="anchor" id="a33d67fd81c52448aead9e09f32ba9cca"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_ALLIMG&#160;&#160;&#160;0x00001000</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - allow the image-header form of <em>all</em> image header WCS keywords to provide a default value for all image arrays in a binary table (n.b. not pixel list).</p>
<p>Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </p>

</div>
</div>
<a class="anchor" id="ab65e929c7d525d735ae240046d4f0d9c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_IMGHEAD&#160;&#160;&#160;0x00010000</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>keysel</em> argument of <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - restrict keyword types considered to image header keywords only. </p>

</div>
</div>
<a class="anchor" id="aa7c5021293b0db20ece0e82c3702a159"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_BIMGARR&#160;&#160;&#160;0x00020000</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>keysel</em> argument of <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - restrict keyword types considered to binary table image array keywords only. </p>

</div>
</div>
<a class="anchor" id="a7bf13ab87b23ecdbbb4b4847d4944070"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDR_PIXLIST&#160;&#160;&#160;0x00040000</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>keysel</em> argument of <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> - restrict keyword types considered to pixel list keywords only. </p>

</div>
</div>
<a class="anchor" id="a54634ed49425e8842874e9e2b77899df"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDO_none&#160;&#160;&#160;0x00</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - don't write any extensions.</p>
<p>Refer to the notes for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a>. </p>

</div>
</div>
<a class="anchor" id="a5592649ee4c25e118559c6d283c51930"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDO_all&#160;&#160;&#160;0xFF</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - write all extensions.</p>
<p>Refer to the notes for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a>. </p>

</div>
</div>
<a class="anchor" id="a446914676e0b3f55ac6a080015a52b43"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDO_safe&#160;&#160;&#160;0x0F</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - write only extensions that are considered safe.</p>
<p>Refer to the notes for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a>. </p>

</div>
</div>
<a class="anchor" id="a6779d48001260a0011b3dcffdcb64cb6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDO_DOBSn&#160;&#160;&#160;0x01</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - write <code><b>DOBS</b>n</code>, the column-specific analogue of DATE-OBS for use in binary tables and pixel lists.</p>
<p>Refer to the notes for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a>. </p>

</div>
</div>
<a class="anchor" id="a96b787f84207faa42599e50e6e078d21"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDO_TPCn_ka&#160;&#160;&#160;0x02</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - write <code><b>TPC</b>n<b>_</b>ka</code> if less than eight characters instead of <code><b>TP</b>n<b>_</b>ka</code>.</p>
<p>Refer to the notes for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a>. </p>

</div>
</div>
<a class="anchor" id="a222a5bd7659f3e1ea1a9ed21f54c50ef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDO_PVn_ma&#160;&#160;&#160;0x04</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - write <code>i<b>PV</b>n<b>_</b>ma</code>, <code><b>TPV</b>n<b>_</b>ma</code>, <code>i<b>PS</b>n<b>_</b>ma</code>, <code><b>TPS</b>n<b>_</b>ma</code>, if less than eight characters instead of <code>i<b>V</b>n<b>_</b>ma</code>, <code><b>TV</b>n<b>_</b>ma</code>, <code>i<b>S</b>n<b>_</b>ma</code>, <code><b>TS</b>n<b>_</b>ma</code>.</p>
<p>Refer to the notes for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a>. </p>

</div>
</div>
<a class="anchor" id="aace96fb8c1499616dd1333af3e8340b0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDO_CRPXna&#160;&#160;&#160;0x08</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - write <code>j<b>CRPX</b>na</code>, <code><b>TCRPX</b>na</code>, <code>i<b>CDLT</b>na</code>, <code><b>TCDLT</b>na</code>, <code>i<b>CUNI</b>na</code>, <code><b>TCUNI</b>na</code>, <code>i<b>CTYP</b>na</code>, <code><b>TCTYP</b>na</code>, <code>i<b>CRVL</b>na</code>, <code><b>TCRVL</b>na</code>, if less than eight characters instead of <code>j<b>CRP</b>na</code>, <code><b>TCRP</b>na</code>, <code>i<b>CDE</b>na</code>, <code><b>TCDE</b>na</code>, <code>i<b>CUN</b>na</code>, <code><b>TCUN</b>na</code>, <code>i<b>CTY</b>na</code>, <code><b>TCTY</b>na</code>, <code>i<b>CRV</b>na</code>, <code><b>TCRV</b>na</code>.</p>
<p>Refer to the notes for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a>. </p>

</div>
</div>
<a class="anchor" id="a95325b53ebd8d7d0a371a65b27b3d04a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDO_CNAMna&#160;&#160;&#160;0x10</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - write <code>i<b>CNAM</b>na</code>, <code><b>TCNAM</b>na</code>, <code>i<b>CRDE</b>na</code>, <code><b>TCRDE</b>na</code>, <code>i<b>CSYE</b>na</code>, <code><b>TCSYE</b>na</code>, if less than eight characters instead of <code>i<b>CNA</b>na</code>, <code><b>TCNA</b>na</code>, <code>i<b>CRD</b>na</code>, <code><b>TCRD</b>na</code>, <code>i<b>CSY</b>na</code>, <code><b>TCSY</b>na</code>.</p>
<p>Refer to the notes for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a>. </p>

</div>
</div>
<a class="anchor" id="a9a70ad2a355a9736711d8017535bf72b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define WCSHDO_WCSNna&#160;&#160;&#160;0x20</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Bit mask for the <em>relax</em> argument of <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a> - write <code><b>WCSN</b>na</code> instead of <code><b>TWCS</b>na</code>.</p>
<p>Refer to the notes for <a class="el" href="wcshdr_8h.html#a0b8372e555a2e2bcc63a11f3dc7a1bf6" title="Write out a wcsprm struct as a FITS header. ">wcshdo()</a>. </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ae2dfc36c150d3a16a5e83131d32ecdae"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="wcshdr_8h.html#ae2dfc36c150d3a16a5e83131d32ecdae">wcshdr_errmsg_enum</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="ae2dfc36c150d3a16a5e83131d32ecdaeabfe69dd9e4c486f856a5dc44b02e79a1"></a>WCSHDRERR_SUCCESS</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ae2dfc36c150d3a16a5e83131d32ecdaea99dd31e274ec97542e650ff89357cded"></a>WCSHDRERR_NULL_POINTER</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ae2dfc36c150d3a16a5e83131d32ecdaea0a858638ef0dd0dc9b529f98b14cc46f"></a>WCSHDRERR_MEMORY</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ae2dfc36c150d3a16a5e83131d32ecdaea0c926e2cc98a8c39585aa0e212423459"></a>WCSHDRERR_BAD_COLUMN</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ae2dfc36c150d3a16a5e83131d32ecdaea218297c7a2a4d405c251e9ed239e615b"></a>WCSHDRERR_PARSER</em>&nbsp;</td><td class="fielddoc">
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="ae2dfc36c150d3a16a5e83131d32ecdaeaeae58359638c0c631e6c7c573a343508"></a>WCSHDRERR_BAD_TABULAR_PARAMS</em>&nbsp;</td><td class="fielddoc">
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ac75623ee805ab7d43b0bba684c719a60"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcspih </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>header</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nkeyrec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>relax</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ctrl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>nreject</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>nwcs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> **&#160;</td>
          <td class="paramname"><em>wcs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcspih</b>() is a high-level FITS WCS routine that parses an image header, either that of a primary HDU or of an image extension. All WCS keywords defined in Papers I, II, and III are recognized, and also those used by the AIPS convention and certain other keywords that existed in early drafts of the WCS papers as explained in <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5.</p>
<p>Given a character array containing a FITS image header, <b>wcspih</b>() identifies and reads all WCS keywords for the primary coordinate representation and up to 26 alternate representations. It returns this information as an array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs.</p>
<p><b>wcspih</b>() invokes <a class="el" href="wcshdr_8h.html#a6dd857f7b61a5b349cc8af5a4b6d8a1c" title="Tabular construction routine. ">wcstab()</a> on each of the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs that it returns.</p>
<p>Use <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> in preference to <b>wcspih</b>() for FITS headers of unknown type; <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> can parse image headers as well as binary table and pixel list headers.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">header</td><td>Character array containing the (entire) FITS image header from which to identify and construct the coordinate representations, for example, as might be obtained conveniently via the CFITSIO routine <em>fits_hdr2str()</em>. <br/>
 Each header "keyrecord" (formerly "card image") consists of exactly 80 7-bit ASCII printing characters in the range 0x20 to 0x7e (which excludes NUL, BS, TAB, LF, FF and CR) especially noting that the keyrecords are NOT null-terminated. <br/>
 For negative values of ctrl (see below), header[] is modified so that WCS keyrecords processed by <b>wcspih</b>() are removed from it.</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">nkeyrec</td><td>Number of keyrecords in header[]. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">relax</td><td>Degree of permissiveness:<ul>
<li>0: Recognize only FITS keywords defined by the published WCS standard.</li>
<li><a class="el" href="wcshdr_8h.html#a0b9b53e5cfd05653cbca75cf1aa8b2ed" title="Bit mask for wcspih() and wcsbth() - accept all extensions. ">WCSHDR_all</a>: Admit all recognized informal extensions of the WCS standard.</li>
</ul>
Fine-grained control of the degree of permissiveness is also possible as explained in <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ctrl</td><td>Error reporting and other control options for invalid WCS and other header keyrecords:<ul>
<li>0: Do not report any rejected header keyrecords.</li>
<li>1: Produce a one-line message stating the number of WCS keyrecords rejected (nreject).</li>
<li>2: Report each rejected keyrecord and the reason why it was rejected.</li>
<li>3: As above, but also report all non-WCS keyrecords that were discarded, and the number of coordinate representations (nwcs) found.</li>
</ul>
The report is written to stderr by default, or the stream set by <a class="el" href="wcsprintf_8h.html#a5c6f91916a0b8f8c2d85274c0ba130f6" title="Set output disposition for wcsprintf() and wcsfprintf(). ">wcsprintf_set()</a>. <br/>
 For ctrl &lt; 0, WCS keyrecords processed by <b>wcspih</b>() are removed from header[]:<ul>
<li>-1: Remove only valid WCS keyrecords whose values were successfully extracted, nothing is reported.</li>
<li>-2: Also remove WCS keyrecords that were rejected, reporting each one and the reason that it was rejected.</li>
<li>-3: As above, and also report the number of coordinate representations (nwcs) found.</li>
<li>-11: Same as -1 but preserving the basic keywords <code><b>'</b>{<b>DATE</b></code>,<code><b>MJD</b>}<b>-</b>{<b>OBS</b></code>,<code><b>AVG</b>}<b>'</b></code> and <code><b>'OBSGEO-</b>{<b>X</b></code>,<code><b>Y</b></code>,<code><b>Z</b>}<b>'</b></code>.</li>
</ul>
If any keyrecords are removed from header[] it will be null-terminated (NUL not being a legal FITS header character), otherwise it will contain its original complement of nkeyrec keyrecords and possibly not be null-terminated.</td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">nreject</td><td>Number of WCS keywords rejected for syntax errors, illegal values, etc. Keywords not recognized as WCS keywords are simply ignored. Refer also to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 5. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">nwcs</td><td>Number of coordinate representations found. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">wcs</td><td>Pointer to an array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs containing up to 27 coordinate representations. <br/>
 Memory for the array is allocated by <b>wcspih</b>() which also invokes <a class="el" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct. ">wcsini()</a> for each struct to allocate memory for internal arrays and initialize their members to default values. Refer also to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 8. Note that <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct. ">wcsset()</a> is not invoked on these structs. <br/>
 This allocated memory must be freed by the user, first by invoking <a class="el" href="wcs_8h.html#a4ab38bc642c4656f62c43acf84a849f1" title="Destructor for the wcsprm struct. ">wcsfree()</a> for each struct, and then by freeing the array itself. A routine, <a class="el" href="wcshdr_8h.html#a27465844aaeea0623133f8151ca4fd9b" title="Free the array of wcsprm structs. ">wcsvfree()</a>, is provided to do this (see below).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> pointer passed.</li>
<li>2: Memory allocation failed.</li>
<li>4: Fatal error returned by Flex parser.</li>
</ul>
</dd></dl>
<p><b>Notes:</b> <br/>
 Refer to <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> notes 1, 2, 3, 5, 7, and 8. </p>

</div>
</div>
<a class="anchor" id="adc053d80a9c4da454a52eed34e123633"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcsbth </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>header</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nkeyrec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>relax</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ctrl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>keysel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>colsel</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>nreject</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>nwcs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> **&#160;</td>
          <td class="paramname"><em>wcs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcsbth</b>() is a high-level FITS WCS routine that parses a binary table header. It handles image array and pixel list WCS keywords which may be present together in one header.</p>
<p>As an extension of the FITS WCS standard, <b>wcsbth</b>() also recognizes image header keywords in a binary table header. These may be used to provide default values via an inheritance mechanism discussed in note 5 (c.f. <a class="el" href="wcshdr_8h.html#a0e8eb873389e9c15bd6079a96c41ad60" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of an auxiliary WCS keyword to provi...">WCSHDR_AUXIMG</a> and <a class="el" href="wcshdr_8h.html#a33d67fd81c52448aead9e09f32ba9cca" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of all image header WCS keywords to ...">WCSHDR_ALLIMG</a>), or may instead result in <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs that are not associated with any particular column. Thus <b>wcsbth</b>() can handle primary image and image extension headers in addition to binary table headers (it ignores <code><b>NAXIS</b></code> and does not rely on the presence of the <code><b>TFIELDS</b></code> keyword).</p>
<p>All WCS keywords defined in Papers I, II, and III are recognized, and also those used by the AIPS convention and certain other keywords that existed in early drafts of the WCS papers as explained in note 5 below.</p>
<p><b>wcsbth</b>() sets the colnum or colax[] members of the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs that it returns with the column number of an image array or the column numbers associated with each pixel coordinate element in a pixel list. <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs that are not associated with any particular column, as may be derived from image header keywords, have colnum == 0.</p>
<p>Note 6 below discusses the number of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs returned by <b>wcsbth</b>(), and the circumstances in which image header keywords cause a struct to be created. See also note 9 concerning the number of separate images that may be stored in a pixel list.</p>
<p>The API to <b>wcsbth</b>() is similar to that of <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> except for the addition of extra arguments that may be used to restrict its operation. Like <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a>, <b>wcsbth</b>() invokes <a class="el" href="wcshdr_8h.html#a6dd857f7b61a5b349cc8af5a4b6d8a1c" title="Tabular construction routine. ">wcstab()</a> on each of the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs that it returns.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">header</td><td>Character array containing the (entire) FITS binary table, primary image, or image extension header from which to identify and construct the coordinate representations, for example, as might be obtained conveniently via the CFITSIO routine <em>fits_hdr2str()</em>. <br/>
 Each header "keyrecord" (formerly "card image") consists of exactly 80 7-bit ASCII printing characters in the range 0x20 to 0x7e (which excludes NUL, BS, TAB, LF, FF and CR) especially noting that the keyrecords are NOT null-terminated. <br/>
 For negative values of ctrl (see below), header[] is modified so that WCS keyrecords processed by <b>wcsbth</b>() are removed from it.</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">nkeyrec</td><td>Number of keyrecords in header[]. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">relax</td><td>Degree of permissiveness:<ul>
<li>0: Recognize only FITS keywords defined by the published WCS standard.</li>
<li><a class="el" href="wcshdr_8h.html#a0b9b53e5cfd05653cbca75cf1aa8b2ed" title="Bit mask for wcspih() and wcsbth() - accept all extensions. ">WCSHDR_all</a>: Admit all recognized informal extensions of the WCS standard.</li>
</ul>
Fine-grained control of the degree of permissiveness is also possible, as explained in note 5 below. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">ctrl</td><td>Error reporting and other control options for invalid WCS and other header keyrecords:<ul>
<li>0: Do not report any rejected header keyrecords.</li>
<li>1: Produce a one-line message stating the number of WCS keyrecords rejected (nreject).</li>
<li>2: Report each rejected keyrecord and the reason why it was rejected.</li>
<li>3: As above, but also report all non-WCS keyrecords that were discarded, and the number of coordinate representations (nwcs) found.</li>
</ul>
The report is written to stderr by default, or the stream set by <a class="el" href="wcsprintf_8h.html#a5c6f91916a0b8f8c2d85274c0ba130f6" title="Set output disposition for wcsprintf() and wcsfprintf(). ">wcsprintf_set()</a>. <br/>
 For ctrl &lt; 0, WCS keyrecords processed by <b>wcsbth</b>() are removed from header[]:<ul>
<li>-1: Remove only valid WCS keyrecords whose values were successfully extracted, nothing is reported.</li>
<li>-2: Also remove WCS keyrecords that were rejected, reporting each one and the reason that it was rejected.</li>
<li>-3: As above, and also report the number of coordinate representations (nwcs) found.</li>
<li>-11: Same as -1 but preserving the basic keywords <code><b>'</b>{<b>DATE</b></code>,<code><b>MJD</b>}<b>-</b>{<b>OBS</b></code>,<code><b>AVG</b>}<b>'</b></code> and <code><b>'OBSGEO-</b>{<b>X</b></code>,<code><b>Y</b></code>,<code><b>Z</b>}<b>'</b></code>.</li>
</ul>
If any keyrecords are removed from header[] it will be null-terminated (NUL not being a legal FITS header character), otherwise it will contain its original complement of nkeyrec keyrecords and possibly not be null-terminated. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">keysel</td><td>Vector of flag bits that may be used to restrict the keyword types considered:<ul>
<li><a class="el" href="wcshdr_8h.html#ab65e929c7d525d735ae240046d4f0d9c" title="Bit mask for wcsbth() - restrict to image header keywords only. ">WCSHDR_IMGHEAD</a>: Image header keywords.</li>
<li><a class="el" href="wcshdr_8h.html#aa7c5021293b0db20ece0e82c3702a159" title="Bit mask for wcsbth() - restrict to binary table image array keywords only. ">WCSHDR_BIMGARR</a>: Binary table image array.</li>
<li><a class="el" href="wcshdr_8h.html#a7bf13ab87b23ecdbbb4b4847d4944070" title="Bit mask for wcsbth() - restrict to pixel list keywords only. ">WCSHDR_PIXLIST</a>: Pixel list keywords.</li>
</ul>
If zero, there is no restriction. <br/>
 Keywords such as <code><b>EQUI</b>na</code> or <code><b>RFRQ</b>na</code> that are common to binary table image arrays and pixel lists (including <code><b>WCSN</b>na</code> and <code><b>TWCS</b>na</code>, as explained in note 4 below) are selected by both <a class="el" href="wcshdr_8h.html#aa7c5021293b0db20ece0e82c3702a159" title="Bit mask for wcsbth() - restrict to binary table image array keywords only. ">WCSHDR_BIMGARR</a> and <a class="el" href="wcshdr_8h.html#a7bf13ab87b23ecdbbb4b4847d4944070" title="Bit mask for wcsbth() - restrict to pixel list keywords only. ">WCSHDR_PIXLIST</a>. Thus if inheritance via <a class="el" href="wcshdr_8h.html#a33d67fd81c52448aead9e09f32ba9cca" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of all image header WCS keywords to ...">WCSHDR_ALLIMG</a> is enabled as discussed in note 5 and one of these shared keywords is present, then <a class="el" href="wcshdr_8h.html#ab65e929c7d525d735ae240046d4f0d9c" title="Bit mask for wcsbth() - restrict to image header keywords only. ">WCSHDR_IMGHEAD</a> and <a class="el" href="wcshdr_8h.html#a7bf13ab87b23ecdbbb4b4847d4944070" title="Bit mask for wcsbth() - restrict to pixel list keywords only. ">WCSHDR_PIXLIST</a> alone may be sufficient to cause the construction of coordinate descriptions for binary table image arrays. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">colsel</td><td>Pointer to an array of table column numbers used to restrict the keywords considered by <b>wcsbth</b>(). <br/>
 A null pointer may be specified to indicate that there is no restriction. Otherwise, the magnitude of cols[0] specifies the length of the array:<ul>
<li>cols[0] &gt; 0: the columns are included,</li>
<li>cols[0] &lt; 0: the columns are excluded.</li>
</ul>
For the pixel list keywords <code><b>TP</b>n<b>_</b>ka</code> and <code><b>TC</b>n<b>_</b>ka</code> (and <code><b>TPC</b>n<b>_</b>ka</code> and <code><b>TCD</b>n<b>_</b>ka</code> if <a class="el" href="wcshdr_8h.html#ae8a768f544fe3ae81436b73dca3099fb" title="Bit mask for wcspih() and wcsbth() - accept long forms of the alternate binary table and pixel list W...">WCSHDR_LONGKEY</a> is enabled), it is an error for one column to be selected but not the other. This is unlike the situation with invalid keyrecords, which are simply rejected, because the error is not intrinsic to the header itself but arises in the way that it is processed.</td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">nreject</td><td>Number of WCS keywords rejected for syntax errors, illegal values, etc. Keywords not recognized as WCS keywords are simply ignored, refer also to note 5 below. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">nwcs</td><td>Number of coordinate representations found. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">wcs</td><td>Pointer to an array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs containing up to 27027 coordinate representations, refer to note 6 below. <br/>
 Memory for the array is allocated by <b>wcsbth</b>() which also invokes <a class="el" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45" title="Default constructor for the wcsprm struct. ">wcsini()</a> for each struct to allocate memory for internal arrays and initialize their members to default values. Refer also to note 8 below. Note that <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct. ">wcsset()</a> is not invoked on these structs. <br/>
 This allocated memory must be freed by the user, first by invoking <a class="el" href="wcs_8h.html#a4ab38bc642c4656f62c43acf84a849f1" title="Destructor for the wcsprm struct. ">wcsfree()</a> for each struct, and then by freeing the array itself. A routine, <a class="el" href="wcshdr_8h.html#a27465844aaeea0623133f8151ca4fd9b" title="Free the array of wcsprm structs. ">wcsvfree()</a>, is provided to do this (see below).</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> pointer passed.</li>
<li>2: Memory allocation failed.</li>
<li>3: Invalid column selection.</li>
<li>4: Fatal error returned by Flex parser.</li>
</ul>
</dd></dl>
<p><b>Notes:</b> <br/>
 </p>
<ol>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> determines the number of coordinate axes independently for each alternate coordinate representation (denoted by the "a" value in keywords like <code><b>CTYPE</b>ia</code>) from the higher of</p>
<ol type="a">
<li>
<code><b>NAXIS</b></code>, </li>
<li>
<code><b>WCSAXES</b>a</code>, </li>
<li>
The highest axis number in any parameterized WCS keyword. The keyvalue, as well as the keyword, must be syntactically valid otherwise it will not be considered. </li>
</ol>
<p>If none of these keyword types is present, i.e. if the header only contains auxiliary WCS keywords for a particular coordinate representation, then no coordinate description is constructed for it.</p>
<p><b>wcsbth</b>() is similar except that it ignores the <code><b>NAXIS</b></code> keyword if given an image header to process.</p>
<p>The number of axes, which is returned as a member of the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct, may differ for different coordinate representations of the same image.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <b>wcsbth</b>() enforce correct FITS "keyword = value" syntax with regard to "= " occurring in columns 9 and 10.</p>
<p>However, they do recognize free-format character (NOST 100-2.0, Sect. 5.2.1), integer (Sect. 5.2.3), and floating-point values (Sect. 5.2.4) for all keywords.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">Where <code><b>CROTA</b>n</code>, <code><b>CD</b>i<b>_</b>ja</code>, and <code><b>PC</b>i<b>_</b>ja</code> occur together in one header <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <b>wcsbth</b>() treat them as described in the prologue to <a class="el" href="wcs_8h.html">wcs.h</a>.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">WCS Paper I mistakenly defined the pixel list form of <code><b>WCSNAME</b>a</code> as <code><b>TWCS</b>na</code> instead of <code><b>WCSN</b>na</code>; the <code>'<b>T</b>'</code> is meant to substitute for the axis number in the binary table form of the keyword - note that keywords defined in WCS Papers II and III that are not parameterised by axis number have identical forms for binary tables and pixel lists. Consequently <b>wcsbth</b>() always treats <code><b>WCSN</b>na</code> and <code><b>TWCS</b>na</code> as equivalent.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <b>wcsbth</b>() interpret the <em>relax</em> argument as a vector of flag bits to provide fine-grained control over what non-standard WCS keywords to accept. The flag bits are subject to change in future and should be set by using the preprocessor macros (see below) for the purpose.</p>
<ul>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#a92a0007f672a5498ab1b6ccc6a4a002b" title="Bit mask for wcspih() and wcsbth() - reject all extensions. ">WCSHDR_none</a>: Don't accept any extensions (not even those in the errata). Treat non-conformant keywords in the same way as non-WCS keywords in the header, i.e. simply ignore them.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#a0b9b53e5cfd05653cbca75cf1aa8b2ed" title="Bit mask for wcspih() and wcsbth() - accept all extensions. ">WCSHDR_all</a>: Accept all extensions recognized by the parser.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#afd6d52bed79bd48230f651ac48eb5ca6" title="Bit mask for wcspih() and wcsbth() - reject non-standard keywords. ">WCSHDR_reject</a>: Reject non-standard keywords (that are not otherwise accepted). A message will optionally be printed on stderr by default, or the stream set by <a class="el" href="wcsprintf_8h.html#a5c6f91916a0b8f8c2d85274c0ba130f6" title="Set output disposition for wcsprintf() and wcsfprintf(). ">wcsprintf_set()</a>, as determined by the ctrl argument, and nreject will be incremented.</p>
<p>This flag may be used to signal the presence of non-standard keywords, otherwise they are simply passed over as though they did not exist in the header.</p>
<p>Useful for testing conformance of a FITS header to the WCS standard.</p>
<p class="endli"></p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#a017f1e817bdb2114ba765e7a9ef73bac" title="Bit mask for wcspih() and wcsbth() - accept CROTAia, iCROTna, TCROTna. ">WCSHDR_CROTAia</a>: Accept <code><b>CROTA</b>i</code>a (<a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a>), <code>i<b>CROT</b>n</code>a (<b>wcsbth</b>()), <code><b>TCROT</b>na</code> (<b>wcsbth</b>()). </li>
<li>
<a class="el" href="wcshdr_8h.html#a5feeef18919b1cbb79729bbfa75976ec" title="Bit mask for wcspih() and wcsbth() - accept EPOCHa. ">WCSHDR_EPOCHa</a>: Accept <code><b><code><b>EPOCH</b></code></b>a</code>. </li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#afc0a5a6b475a8e50b77d4be099790985" title="Bit mask for wcspih() and wcsbth() - accept VELREFa. ">WCSHDR_VELREFa</a>: Accept <code><b><code><b>VELREF</b></code></b>a</code>. <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> always recognizes the AIPS-convention keywords, <code><b>CROTA</b>n</code>, <code><b>EPOCH</b></code>, and <code><b>VELREF</b></code> for the primary representation (a = ' ') but alternates are non-standard.</p>
<p><b>wcsbth</b>() accepts <code><b><code><b>EPOCH</b></code></b>a</code> and <code><b><code><b>VELREF</b></code></b>a</code> only if <a class="el" href="wcshdr_8h.html#a0e8eb873389e9c15bd6079a96c41ad60" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of an auxiliary WCS keyword to provi...">WCSHDR_AUXIMG</a> is also enabled.</p>
<p class="endli"></p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#a63eb554461f3df5dc64a25f71891b9f1" title="Bit mask for wcspih() and wcsbth() - accept CD00i00j. ">WCSHDR_CD00i00j</a>: Accept <code><b>CD00</b>i<b>00</b>j</code> (<a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a>). </li>
<li>
<a class="el" href="wcshdr_8h.html#a3dea9d7548bdbc9a7cc8d0a04cdd46fb" title="Bit mask for wcspih() and wcsbth() - accept PC00i00j. ">WCSHDR_PC00i00j</a>: Accept <code><b>PC00</b>i<b>00</b>j</code> (<a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a>). </li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#aee4fe41274945f9e34009d2eb309c922" title="Bit mask for wcspih() and wcsbth() - accept PROJPn. ">WCSHDR_PROJPn</a>: Accept <code><b>PROJP</b>n</code> (<a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a>). These appeared in early drafts of WCS Paper I+II (before they were split) and are equivalent to <code><b>CD</b>i<b>_</b>ja</code>, <code><b>PC</b>i<b>_</b>ja</code>, and <code><b>PV</b>i<b>_</b>ma</code> for the primary representation (a = ' '). <code><b>PROJP</b>n</code> is equivalent to <code><b>PV</b>i<b>_</b>ma</code> with <code>m = n</code> <img class="formulaInl" alt="$\le$" src="form_64.png"/> 9, and is associated exclusively with the latitude axis.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#a1d506ef2ad493a963426e0732a6328ca" title="Bit mask for wcspih() and wcsbth() - accept RADECSYS. ">WCSHDR_RADECSYS</a>: Accept <code><b>RADECSYS</b></code>. This appeared in early drafts of WCS Paper I+II and was subsequently replaced by <code><b>RADESYS</b>a</code>.</p>
<p><b>wcsbth</b>() accepts <code><b>RADECSYS</b></code> only if <a class="el" href="wcshdr_8h.html#a0e8eb873389e9c15bd6079a96c41ad60" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of an auxiliary WCS keyword to provi...">WCSHDR_AUXIMG</a> is also enabled.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#a1b66d50d7f1927222a170bc88f9db51e" title="Bit mask for wcspih() and wcsbth() - accept VSOURCEa. ">WCSHDR_VSOURCE</a>: Accept <code><b>VSOURCE</b>a</code> or <code><b>VSOU</b>na</code> (<b>wcsbth</b>()). This appeared in early drafts of WCS Paper III and was subsequently dropped in favour of <code><b>ZSOURCE</b>a</code> and <code><b>ZSOU</b>na</code>.</p>
<p><b>wcsbth</b>() accepts <code><b>VSOURCE</b>a</code> only if <a class="el" href="wcshdr_8h.html#a0e8eb873389e9c15bd6079a96c41ad60" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of an auxiliary WCS keyword to provi...">WCSHDR_AUXIMG</a> is also enabled.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#adff9a101a373a634f3a1baab29e92534" title="Bit mask for wcspih() and wcsbth() - accept DOBSn. ">WCSHDR_DOBSn</a> (<b>wcsbth</b>() only): Allow <code><b>DOBS</b>n</code>, the column-specific analogue of <code><b>DATE-OBS</b></code>. By an oversight this was never formally defined in the standard.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#ae8a768f544fe3ae81436b73dca3099fb" title="Bit mask for wcspih() and wcsbth() - accept long forms of the alternate binary table and pixel list W...">WCSHDR_LONGKEY</a> (<b>wcsbth</b>() only): Accept long forms of the alternate binary table and pixel list WCS keywords, i.e. with "a" non- blank. Specifically </p>
<hr/>
<table  border="0">
<tr>
<td><code>j<b>CRPX</b>n</code>a </td><td><code><b>TCRPX</b>n</code>a </td><td>: </td><td><code>j<b>CRPX</b>n</code> </td><td><code>j<b>CRP</b>na</code> </td><td><code><b>TCRPX</b>n</code> </td><td><code><b>TCRP</b>na</code> </td><td><code><b>CRPIX</b>ja</code>  </td></tr>
<tr>
<td></td><td><code><b>TPC</b>n<b>_</b>ka</code> </td><td>: </td><td></td><td><code>ij<b>PC</b>na</code> </td><td></td><td><code><b>TP</b>n<b>_</b>ka</code> </td><td><code><b>PC</b>i<b>_</b>ja</code>  </td></tr>
<tr>
<td></td><td><code><b>TCD</b>n<b>_</b>ka</code> </td><td>: </td><td></td><td><code>ij<b>CD</b>na</code> </td><td></td><td><code><b>TC</b>n<b>_</b>ka</code> </td><td><code><b>CD</b>i<b>_</b>ja</code>  </td></tr>
<tr>
<td><code>i<b>CDLT</b>n</code>a </td><td><code><b>TCDLT</b>n</code>a </td><td>: </td><td><code>i<b>CDLT</b>n</code> </td><td><code>i<b>CDE</b>na</code> </td><td><code><b>TCDLT</b>n</code> </td><td><code><b>TCDE</b>na</code> </td><td><code><b>CDELT</b>ia</code>  </td></tr>
<tr>
<td><code>i<b>CUNI</b>n</code>a </td><td><code><b>TCUNI</b>n</code>a </td><td>: </td><td><code>i<b>CUNI</b>n</code> </td><td><code>i<b>CUN</b>na</code> </td><td><code><b>TCUNI</b>n</code> </td><td><code><b>TCUN</b>na</code> </td><td><code><b>CUNIT</b>ia</code>  </td></tr>
<tr>
<td><code>i<b>CTYP</b>n</code>a </td><td><code><b>TCTYP</b>n</code>a </td><td>: </td><td><code>i<b>CTYP</b>n</code> </td><td><code>i<b>CTY</b>na</code> </td><td><code><b>TCTYP</b>n</code> </td><td><code><b>TCTY</b>na</code> </td><td><code><b>CTYPE</b>ia</code>  </td></tr>
<tr>
<td><code>i<b>CRVL</b>n</code>a </td><td><code><b>TCRVL</b>n</code>a </td><td>: </td><td><code>i<b>CRVL</b>n</code> </td><td><code>i<b>CRV</b>na</code> </td><td><code><b>TCRVL</b>n</code> </td><td><code><b>TCRV</b>na</code> </td><td><code><b>CRVAL</b>ia</code>  </td></tr>
<tr>
<td><code>i<b>PV</b>n<b>_</b>ma</code> </td><td><code><b>TPV</b>n<b>_</b>ma</code> </td><td>: </td><td></td><td><code>i<b>V</b>n<b>_</b>ma</code> </td><td></td><td><code><b>TV</b>n<b>_</b>ma</code> </td><td><code><b>PV</b>i<b>_</b>ma</code>  </td></tr>
<tr>
<td><code>i<b>PS</b>n<b>_</b>ma</code> </td><td><code><b>TPS</b>n<b>_</b>ma</code> </td><td>: </td><td></td><td><code>i<b>S</b>n<b>_</b>ma</code> </td><td></td><td><code><b>TS</b>n<b>_</b>ma</code> </td><td><code><b>PS</b>i<b>_</b>ma</code>  </td></tr>
</table>
<hr/>
<p>where the primary and standard alternate forms together with the image-header equivalent are shown rightwards of the colon.</p>
<p>The long form of these keywords could be described as quasi- standard. <code><b>TPC</b>n<b>_</b>ka</code>, <code>i<b>PV</b>n<b>_</b>ma</code>, and <code><b>TPV</b>n<b>_</b>ma</code> appeared by mistake in the examples in WCS Paper II and subsequently these and also <code><b>TCD</b>n<b>_</b>ka</code>, <code>i<b>PS</b>n<b>_</b>ma</code> and <code><b>TPS</b>n<b>_</b>ma</code> were legitimized by the errata to the WCS papers.</p>
<p>Strictly speaking, the other long forms are non-standard and in fact have never appeared in any draft of the WCS papers nor in the errata. However, as natural extensions of the primary form they are unlikely to be written with any other intention. Thus it should be safe to accept them provided, of course, that the resulting keyword does not exceed the 8-character limit.</p>
<p>If <a class="el" href="wcshdr_8h.html#adf57a609a5c3f7288452cce86210260e" title="Bit mask for wcspih() and wcsbth() - accept iCNAMn, TCNAMn, iCRDEn, TCRDEn, iCSYEn, TCSYEn. ">WCSHDR_CNAMn</a> is enabled then also accept </p>
<hr/>
<table  border="0">
<tr>
<td><code>i<b>CNAM</b>n</code>a </td><td><code><b>TCNAM</b>n</code>a </td><td>: </td><td>&mdash; </td><td><code>i<b>CNA</b>na</code> </td><td>&mdash; </td><td><code><b>TCNA</b>na</code> </td><td><code><b>CNAME</b>ia</code>  </td></tr>
<tr>
<td><code>i<b>CRDE</b>n</code>a </td><td><code><b>TCRDE</b>n</code>a </td><td>: </td><td>&mdash; </td><td><code>i<b>CRD</b>na</code> </td><td>&mdash; </td><td><code><b>TCRD</b>na</code> </td><td><code><b>CRDER</b>ia</code>  </td></tr>
<tr>
<td><code>i<b>CSYE</b>n</code>a </td><td><code><b>TCSYE</b>n</code>a </td><td>: </td><td>&mdash; </td><td><code>i<b>CSY</b>na</code> </td><td>&mdash; </td><td><code><b>TCSY</b>na</code> </td><td><code><b>CSYER</b>ia</code>  </td></tr>
</table>
<hr/>
<p>Note that <code><b>CNAME</b>ia</code>, <code><b>CRDER</b>ia</code>, <code><b>CSYER</b>ia</code>, and their variants are not used by WCSLIB but are stored in the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct as auxiliary information.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#adf57a609a5c3f7288452cce86210260e" title="Bit mask for wcspih() and wcsbth() - accept iCNAMn, TCNAMn, iCRDEn, TCRDEn, iCSYEn, TCSYEn. ">WCSHDR_CNAMn</a> (<b>wcsbth</b>() only): Accept <code>i<b>CNAM</b>n</code>, <code>i<b>CRDE</b>n</code>, <code>i<b>CSYE</b>n</code>, <code><b>TCNAM</b>n</code>, <code><b>TCRDE</b>n</code>, and <code><b>TCSYE</b>n</code>, i.e. with "a" blank. While non-standard, these are the obvious analogues of <code>i<b>CTYP</b>n</code>, <code><b>TCTYP</b>n</code>, etc.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#a0e8eb873389e9c15bd6079a96c41ad60" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of an auxiliary WCS keyword to provi...">WCSHDR_AUXIMG</a> (<b>wcsbth</b>() only): Allow the image-header form of an auxiliary WCS keyword with representation-wide scope to provide a default value for all images. This default may be overridden by the column-specific form of the keyword.</p>
<p>For example, a keyword like <code><b>EQUINOX</b>a</code> would apply to all image arrays in a binary table, or all pixel list columns with alternate representation "a" unless overridden by <code><b>EQUI</b>na</code>.</p>
<p>Specifically the keywords are: </p>
<hr/>
<table  border="0">
<tr>
<td><code><b>LATPOLE</b>a</code> </td><td>for <code><b>LATP</b>na</code>  </td></tr>
<tr>
<td><code><b>LONPOLE</b>a</code> </td><td>for <code><b>LONP</b>na</code>  </td></tr>
<tr>
<td><code><b>RESTFREQ</b></code> </td><td>for <code><b>RFRQ</b>na</code>  </td></tr>
<tr>
<td><code><b>RESTFRQ</b>a</code> </td><td>for <code><b>RFRQ</b>na</code>  </td></tr>
<tr>
<td><code><b>RESTWAV</b>a</code> </td><td>for <code><b>RWAV</b>na</code>  </td></tr>
</table>
<hr/>
<p>whose keyvalues are actually used by WCSLIB, and also keywords that provide auxiliary information that is simply stored in the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct: </p>
<hr/>
<table  border="0">
<tr>
<td><code><b>EPOCH</b></code> </td><td></td><td>... (No column-specific form.)  </td></tr>
<tr>
<td><code><b><code><b>EPOCH</b></code></b>a</code> </td><td></td><td>... Only if <a class="el" href="wcshdr_8h.html#a5feeef18919b1cbb79729bbfa75976ec" title="Bit mask for wcspih() and wcsbth() - accept EPOCHa. ">WCSHDR_EPOCHa</a> is set.  </td></tr>
<tr>
<td><code><b>EQUINOX</b>a</code> </td><td>for <code><b>EQUI</b>na</code>  </td></tr>
<tr>
<td><code><b>RADESYS</b>a</code> </td><td>for <code><b>RADE</b>na</code>  </td></tr>
<tr>
<td><code><b>RADECSYS</b></code> </td><td>for <code><b>RADE</b>na</code> </td><td>... Only if <a class="el" href="wcshdr_8h.html#a1d506ef2ad493a963426e0732a6328ca" title="Bit mask for wcspih() and wcsbth() - accept RADECSYS. ">WCSHDR_RADECSYS</a> is set.  </td></tr>
<tr>
<td><code><b>SPECSYS</b>a</code> </td><td>for <code><b>SPEC</b>na</code>  </td></tr>
<tr>
<td><code><b>SSYSOBS</b>a</code> </td><td>for <code><b>SOBS</b>na</code>  </td></tr>
<tr>
<td><code><b>SSYSSRC</b>a</code> </td><td>for <code><b>SSRC</b>na</code>  </td></tr>
<tr>
<td><code><b>VELOSYS</b>a</code> </td><td>for <code><b>VSYS</b>na</code>  </td></tr>
<tr>
<td><code><b>VELANGL</b>a</code> </td><td>for <code><b>VANG</b>na</code>  </td></tr>
<tr>
<td><code><b>VELREF</b></code> </td><td></td><td>... (No column-specific form.)  </td></tr>
<tr>
<td><code><b><code><b>VELREF</b></code></b>a</code> </td><td></td><td>... Only if <a class="el" href="wcshdr_8h.html#afc0a5a6b475a8e50b77d4be099790985" title="Bit mask for wcspih() and wcsbth() - accept VELREFa. ">WCSHDR_VELREFa</a> is set.  </td></tr>
<tr>
<td><code><b>VSOURCE</b>a</code> </td><td>for <code><b>VSOU</b>na</code> </td><td>... Only if <a class="el" href="wcshdr_8h.html#a1b66d50d7f1927222a170bc88f9db51e" title="Bit mask for wcspih() and wcsbth() - accept VSOURCEa. ">WCSHDR_VSOURCE</a> is set.  </td></tr>
<tr>
<td><code><b>WCSNAME</b>a</code> </td><td>for <code><b>WCSN</b>na</code> </td><td>... Or <code><b>TWCS</b>na</code> (see below).  </td></tr>
<tr>
<td><code><b>ZSOURCE</b>a</code> </td><td>for <code><b>ZSOU</b>na</code>  </td></tr>
</table>
<hr/>
 <hr/>
<table  border="0">
<tr>
<td><code><b>DATE-AVG</b></code> </td><td>for <code><b>DAVG</b>n</code>  </td></tr>
<tr>
<td><code><b>DATE-OBS</b></code> </td><td>for <code><b>DOBS</b>n</code>  </td></tr>
<tr>
<td><code><b>MJD-AVG</b></code> </td><td>for <code><b>MJDA</b>n</code>  </td></tr>
<tr>
<td><code><b>MJD-OBS</b></code> </td><td>for <code><b>MJDOB</b>n</code>  </td></tr>
<tr>
<td><code><b>OBSGEO-X</b></code> </td><td>for <code><b>OBSGX</b>n</code>  </td></tr>
<tr>
<td><code><b>OBSGEO-Y</b></code> </td><td>for <code><b>OBSGY</b>n</code>  </td></tr>
<tr>
<td><code><b>OBSGEO-Z</b></code> </td><td>for <code><b>OBSGZ</b>n</code>  </td></tr>
</table>
<hr/>
<p>where the image-header keywords on the left provide default values for the column specific keywords on the right.</p>
<p>Keywords in the last group, such as <code><b>MJD-OBS</b></code>, apply to all alternate representations, so <code><b>MJD-OBS</b></code> would provide a default value for all images in the header.</p>
<p>This auxiliary inheritance mechanism applies to binary table image arrays and pixel lists alike. Most of these keywords have no default value, the exceptions being <code><b>LONPOLE</b>a</code> and <code><b>LATPOLE</b>a</code>, and also <code><b>RADESYS</b>a</code> and <code><b>EQUINOX</b>a</code> which provide defaults for each other. Thus the only potential difficulty in using <a class="el" href="wcshdr_8h.html#a0e8eb873389e9c15bd6079a96c41ad60" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of an auxiliary WCS keyword to provi...">WCSHDR_AUXIMG</a> is that of erroneously inheriting one of these four keywords.</p>
<p>Unlike <a class="el" href="wcshdr_8h.html#a33d67fd81c52448aead9e09f32ba9cca" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of all image header WCS keywords to ...">WCSHDR_ALLIMG</a>, the existence of one (or all) of these auxiliary WCS image header keywords will not by itself cause a <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct to be created for alternate representation "a". This is because they do not provide sufficient information to create a non-trivial coordinate representation when used in conjunction with the default values of those keywords, such as <code><b>CTYPE</b>ia</code>, that are parameterized by axis number.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#a33d67fd81c52448aead9e09f32ba9cca" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of all image header WCS keywords to ...">WCSHDR_ALLIMG</a> (<b>wcsbth</b>() only): Allow the image-header form of *all* image header WCS keywords to provide a default value for all image arrays in a binary table (n.b. not pixel list). This default may be overridden by the column-specific form of the keyword.</p>
<p>For example, a keyword like <code><b>CRPIX</b>ja</code> would apply to all image arrays in a binary table with alternate representation "a" unless overridden by <code>j<b>CRP</b>na</code>.</p>
<p>Specifically the keywords are those listed above for <a class="el" href="wcshdr_8h.html#a0e8eb873389e9c15bd6079a96c41ad60" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of an auxiliary WCS keyword to provi...">WCSHDR_AUXIMG</a> plus </p>
<hr/>
<table  border="0">
<tr>
<td><code><b>WCSAXES</b>a</code> </td><td>for <code><b>WCAX</b>na</code>  </td></tr>
</table>
<hr/>
<p>which defines the coordinate dimensionality, and the following keywords which are parameterized by axis number: </p>
<hr/>
<table  border="0">
<tr>
<td><code><b>CRPIX</b>ja</code> </td><td>for <code>j<b>CRP</b>na</code>  </td></tr>
<tr>
<td><code><b>PC</b>i<b>_</b>ja</code> </td><td>for <code>ij<b>PC</b>na</code>  </td></tr>
<tr>
<td><code><b>CD</b>i<b>_</b>ja</code> </td><td>for <code>ij<b>CD</b>na</code>  </td></tr>
<tr>
<td><code><b>CDELT</b>ia</code> </td><td>for <code>i<b>CDE</b>na</code>  </td></tr>
<tr>
<td><code><b>CROTA</b>i</code> </td><td>for <code>i<b>CROT</b>n</code>  </td></tr>
<tr>
<td><code><b>CROTA</b>i</code>a </td><td></td><td>... Only if <a class="el" href="wcshdr_8h.html#a017f1e817bdb2114ba765e7a9ef73bac" title="Bit mask for wcspih() and wcsbth() - accept CROTAia, iCROTna, TCROTna. ">WCSHDR_CROTAia</a> is set.  </td></tr>
<tr>
<td><code><b>CUNIT</b>ia</code> </td><td>for <code>i<b>CUN</b>na</code>  </td></tr>
<tr>
<td><code><b>CTYPE</b>ia</code> </td><td>for <code>i<b>CTY</b>na</code>  </td></tr>
<tr>
<td><code><b>CRVAL</b>ia</code> </td><td>for <code>i<b>CRV</b>na</code>  </td></tr>
<tr>
<td><code><b>PV</b>i<b>_</b>ma</code> </td><td>for <code>i<b>V</b>n<b>_</b>ma</code>  </td></tr>
<tr>
<td><code><b>PS</b>i<b>_</b>ma</code> </td><td>for <code>i<b>S</b>n<b>_</b>ma</code>  </td></tr>
</table>
<hr/>
 <hr/>
<table  border="0">
<tr>
<td><code><b>CNAME</b>ia</code> </td><td>for <code>i<b>CNA</b>na</code>  </td></tr>
<tr>
<td><code><b>CRDER</b>ia</code> </td><td>for <code>i<b>CRD</b>na</code>  </td></tr>
<tr>
<td><code><b>CSYER</b>ia</code> </td><td>for <code>i<b>CSY</b>na</code>  </td></tr>
</table>
<hr/>
<p>where the image-header keywords on the left provide default values for the column specific keywords on the right.</p>
<p>This full inheritance mechanism only applies to binary table image arrays, not pixel lists, because in the latter case there is no well-defined association between coordinate axis number and column number.</p>
<p>Note that <code><b>CNAME</b>ia</code>, <code><b>CRDER</b>ia</code>, <code><b>CSYER</b>ia</code>, and their variants are not used by WCSLIB but are stored in the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct as auxiliary information.</p>
<p>Note especially that at least one <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct will be returned for each "a" found in one of the image header keywords listed above:</p>
<ul>
<li>
<p class="startli">If the image header keywords for "a" <b><em>are not</em></b> inherited by a binary table, then the struct will not be associated with any particular table column number and it is up to the user to provide an association.</p>
<p class="endli"></p>
</li>
<li>
If the image header keywords for "a" <b><em>are</em></b> inherited by a binary table image array, then those keywords are considered to be "exhausted" and do not result in a separate <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct. </li>
</ul>
</li>
</ul>
<p>For example, to accept <code><b>CD00</b>i<b>00</b>j</code> and <code><b>PC00</b>i<b>00</b>j</code> and reject all other extensions, use </p>
<div class="fragment"><div class="line">relax = <a class="code" href="wcshdr_8h.html#afd6d52bed79bd48230f651ac48eb5ca6" title="Bit mask for wcspih() and wcsbth() - reject non-standard keywords. ">WCSHDR_reject</a> | <a class="code" href="wcshdr_8h.html#a63eb554461f3df5dc64a25f71891b9f1" title="Bit mask for wcspih() and wcsbth() - accept CD00i00j. ">WCSHDR_CD00i00j</a> | <a class="code" href="wcshdr_8h.html#a3dea9d7548bdbc9a7cc8d0a04cdd46fb" title="Bit mask for wcspih() and wcsbth() - accept PC00i00j. ">WCSHDR_PC00i00j</a>;</div>
</div><!-- fragment --><p>The parser always treats <code><b>EPOCH</b></code> as subordinate to <code><b>EQUINOX</b>a</code> if both are present, and <code><b>VSOURCE</b>a</code> is always subordinate to <code><b>ZSOURCE</b>a</code>.</p>
<p>Likewise, <code><b>VELREF</b></code> is subordinate to the formalism of WCS Paper III, see <a class="el" href="spc_8h.html#ac9dc37c9fdf2db04e23e26b7a51c8e6a" title="Translate AIPS-convention spectral keywords. ">spcaips()</a>.</p>
<p>Neither <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> nor <b>wcsbth</b>() currently recognize the AIPS-convention keywords <code><b>ALTRPIX</b></code> or <code><b>ALTRVAL</b></code> which effectively define an alternative representation for a spectral axis.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">Depending on what flags have been set in its <em>relax</em> argument, <b>wcsbth</b>() could return as many as 27027 <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs:</p>
<ul>
<li>
<p class="startli">Up to 27 unattached representations derived from image header keywords.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">Up to 27 structs for each of up to 999 columns containing an image arrays.</p>
<p class="endli"></p>
</li>
<li>
Up to 27 structs for a pixel list. </li>
</ul>
<p>Note that it is considered legitimate for a column to contain an image array and also form part of a pixel list, and in particular that <b>wcsbth</b>() does not check the <code><b>TFORM</b></code> keyword for a pixel list column to check that it is scalar.</p>
<p>In practice, of course, a realistic binary table header is unlikely to contain more than a handful of images.</p>
<p>In order for <b>wcsbth</b>() to create a <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct for a particular coordinate representation, at least one WCS keyword that defines an axis number must be present, either directly or by inheritance if <a class="el" href="wcshdr_8h.html#a33d67fd81c52448aead9e09f32ba9cca" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of all image header WCS keywords to ...">WCSHDR_ALLIMG</a> is set.</p>
<p>When the image header keywords for an alternate representation are inherited by a binary table image array via <a class="el" href="wcshdr_8h.html#a33d67fd81c52448aead9e09f32ba9cca" title="Bit mask for wcspih() and wcsbth() - allow the image-header form of all image header WCS keywords to ...">WCSHDR_ALLIMG</a>, those keywords are considered to be "exhausted" and do not result in a separate <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct. Otherwise they do.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">Neither <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> nor <b>wcsbth</b>() check for duplicated keywords, in most cases they accept the last encountered.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <b>wcsbth</b>() use <a class="el" href="wcs_8h.html#a42b2578d76ace7ca6114d82b7ae46a89" title="Memory allocation for PVi_ma. ">wcsnpv()</a> and <a class="el" href="wcs_8h.html#ae790c9ce6c9b7a4845cf1c3c97b1e97a" title="Memory allocation for PSi_ma. ">wcsnps()</a> (refer to the prologue of <a class="el" href="wcs_8h.html">wcs.h</a>) to match the size of the pv[] and ps[] arrays in the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs to the number in the header. Consequently there are no unused elements in the pv[] and ps[] arrays, indeed they will often be of zero length.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli">The FITS WCS standard for pixel lists assumes that a pixel list defines one and only one image, i.e. that each row of the binary table refers to just one event, e.g. the detection of a single photon or neutrino.</p>
<p>In the absence of a formal mechanism for identifying the columns containing pixel coordinates (as opposed to pixel values or ancillary data recorded at the time the photon or neutrino was detected), Paper I discusses how the WCS keywords themselves may be used to identify them.</p>
<p>In practice, however, pixel lists have been used to store multiple images. Besides not specifying how to identify columns, the pixel list convention is also silent on the method to be used to associate table columns with image axes.</p>
<p class="endli"><b>wcsbth</b>() simply collects all WCS keywords for a particular coordinate representation (i.e. the "a" value in <code><b>TCTY</b>na</code>) into one <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct. However, these alternates need not be associated with the same table columns and this allows a pixel list to contain up to 27 separate images. As usual, if one of these representations happened to contain more than two celestial axes, for example, then an error would result when <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct. ">wcsset()</a> is invoked on it. In this case the "colsel" argument could be used to restrict the columns used to construct the representation so that it only contained one pair of celestial axes. </p>
</li>
</ol>

</div>
</div>
<a class="anchor" id="a6dd857f7b61a5b349cc8af5a4b6d8a1c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcstab </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> *&#160;</td>
          <td class="paramname"><em>wcs</em>)</td><td></td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcstab</b>() assists in filling in the information in the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct relating to coordinate lookup tables.</p>
<p>Tabular coordinates (<code>'<b>TAB</b>'</code>) present certain difficulties in that the main components of the lookup table - the multidimensional coordinate array plus an index vector for each dimension - are stored in a FITS binary table extension (BINTABLE). Information required to locate these arrays is stored in <code><b>PV</b>i<b>_</b>ma</code> and <code><b>PS</b>i<b>_</b>ma</code> keywords in the image header.</p>
<p><b>wcstab</b>() parses the <code><b>PV</b>i<b>_</b>ma</code> and <code><b>PS</b>i<b>_</b>ma</code> keywords associated with each <code>'<b>TAB</b>'</code> axis and allocates memory in the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct for the required number of <a class="el" href="structtabprm.html" title="Tabular transformation parameters. ">tabprm</a> structs. It sets as much of the <a class="el" href="structtabprm.html" title="Tabular transformation parameters. ">tabprm</a> struct as can be gleaned from the image header, and also sets up an array of <a class="el" href="structwtbarr.html" title="Extraction of coordinate lookup tables from BINTABLE. ">wtbarr</a> structs (described in the prologue of <a class="el" href="wcs_8h.html">wcs.h</a>) to assist in extracting the required arrays from the BINTABLE extension(s).</p>
<p>It is then up to the user to allocate memory for, and copy arrays from the BINTABLE extension(s) into the <a class="el" href="structtabprm.html" title="Tabular transformation parameters. ">tabprm</a> structs. A CFITSIO routine, <a class="el" href="getwcstab_8h.html#a96c804d78d44901bc5d497b30e47b7ad" title="FITS &#39;TAB&#39; table reading routine. ">fits_read_wcstab()</a>, has been provided for this purpose, see <a class="el" href="getwcstab_8h.html">getwcstab.h</a>. <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct. ">wcsset()</a> will automatically take control of this allocated memory, in particular causing it to be free'd by <a class="el" href="wcs_8h.html#a4ab38bc642c4656f62c43acf84a849f1" title="Destructor for the wcsprm struct. ">wcsfree()</a>; the user must not attempt to free it after <a class="el" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91" title="Setup routine for the wcsprm struct. ">wcsset()</a> has been called.</p>
<p>Note that <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> and <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> automatically invoke <b>wcstab</b>() on each of the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs that they return.</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 (see below). <br/>
 <b>wcstab</b>() sets ntab, tab, nwtb and wtb, allocating memory for the tab and wtb arrays. This allocated memory will be free'd automatically by <a class="el" href="wcs_8h.html#a4ab38bc642c4656f62c43acf84a849f1" title="Destructor for the wcsprm struct. ">wcsfree()</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> pointer passed.</li>
<li>2: Memory allocation failed.</li>
<li>3: Invalid tabular parameters.</li>
</ul>
For returns &gt; 1, a detailed error message is set in <a class="el" href="structwcsprm.html#af54ce939604be183231f0ee006e2f8ed">wcsprm::err</a> if enabled, see <a class="el" href="wcserr_8h.html#a1691b8bd184d40ca6fda255be078fa53" title="Enable/disable error messaging. ">wcserr_enable()</a>. </dd></dl>

</div>
</div>
<a class="anchor" id="a6174a483baad91dae3fa1c30b0e4cde5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcsidx </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nwcs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> **&#160;</td>
          <td class="paramname"><em>wcs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>alts</em>[27]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcsidx</b>() returns an array of 27 indices for the alternate coordinate representations in the array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs returned by <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a>. For the array returned by <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> it returns indices for the unattached (colnum == 0) representations derived from image header keywords - use <a class="el" href="wcshdr_8h.html#a16e35904c64fe6b0aab144bd022c722f" title="Index alternate coordinate representions. ">wcsbdx()</a> for those derived from binary table image arrays or pixel lists keywords.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">nwcs</td><td>Number of coordinate representations in the array. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">wcs</td><td>Pointer to an array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs returned by <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> or <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a>.</td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">alts</td><td>Index of each alternate coordinate representation in the array: alts[0] for the primary, alts[1] for 'A', etc., set to -1 if not present. <br/>
 For example, if there was no 'P' representation then <div class="fragment"><div class="line">alts[<span class="charliteral">&#39;P&#39;</span>-<span class="charliteral">&#39;A&#39;</span>+1] == -1;</div>
</div><!-- fragment --> <br/>
 Otherwise, the address of its <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct would be <div class="fragment"><div class="line">wcs + alts[<span class="charliteral">&#39;P&#39;</span>-<span class="charliteral">&#39;A&#39;</span>+1];</div>
</div><!-- fragment --></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> pointer passed. </li>
</ul>
</dd></dl>

</div>
</div>
<a class="anchor" id="a16e35904c64fe6b0aab144bd022c722f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcsbdx </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>nwcs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> **&#160;</td>
          <td class="paramname"><em>wcs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short&#160;</td>
          <td class="paramname"><em>alts</em>[1000][28]&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcsbdx</b>() returns an array of 999 x 27 indices for the alternate coordinate representions for binary table image arrays xor pixel lists in the array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs returned by <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a>. Use <a class="el" href="wcshdr_8h.html#a6174a483baad91dae3fa1c30b0e4cde5" title="Index alternate coordinate representations. ">wcsidx()</a> for the unattached representations derived from image header keywords.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">nwcs</td><td>Number of coordinate representations in the array. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">wcs</td><td>Pointer to an array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs returned by <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a>. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">type</td><td>Select the type of coordinate representation:<ul>
<li>0: binary table image arrays,</li>
<li>1: pixel lists.</li>
</ul>
</td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">alts</td><td>Index of each alternate coordinate represention in the array: alts[col][0] for the primary, alts[col][1] for 'A', to alts[col][26] for 'Z', where col is the 1-relative column number, and col == 0 is used for unattached image headers. Set to -1 if not present. <br/>
 alts[col][27] counts the number of coordinate representations of the chosen type for each column. <br/>
 For example, if there was no 'P' represention for column 13 then <div class="fragment"><div class="line">alts[13][<span class="charliteral">&#39;P&#39;</span>-<span class="charliteral">&#39;A&#39;</span>+1] == -1;</div>
</div><!-- fragment --> <br/>
 Otherwise, the address of its <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct would be <div class="fragment"><div class="line">wcs + alts[13][<span class="charliteral">&#39;P&#39;</span>-<span class="charliteral">&#39;A&#39;</span>+1];</div>
</div><!-- fragment --></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> pointer passed. </li>
</ul>
</dd></dl>

</div>
</div>
<a class="anchor" id="a27465844aaeea0623133f8151ca4fd9b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcsvfree </td>
          <td>(</td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>nwcs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> **&#160;</td>
          <td class="paramname"><em>wcs</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcsvfree</b>() frees the memory allocated by <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a> or <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> for the array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs, first invoking <a class="el" href="wcs_8h.html#a4ab38bc642c4656f62c43acf84a849f1" title="Destructor for the wcsprm struct. ">wcsfree()</a> on each of the array members.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">nwcs</td><td>Number of coordinate representations found; set to 0 on return. </td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">wcs</td><td>Pointer to the array of <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> structs; set to 0 on return.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
<li>0: Success.</li>
<li>1: Null <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> pointer passed. </li>
</ul>
</dd></dl>

</div>
</div>
<a class="anchor" id="a0b8372e555a2e2bcc63a11f3dc7a1bf6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int wcshdo </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>relax</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structwcsprm.html">wcsprm</a> *&#160;</td>
          <td class="paramname"><em>wcs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>nkeyrec</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&#160;</td>
          <td class="paramname"><em>header</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><b>wcshdo</b>() translates a <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct into a FITS header. If the colnum member of the struct is non-zero then a binary table image array header will be produced. Otherwise, if the colax[] member of the struct is set non-zero then a pixel list header will be produced. Otherwise, a primary image or image extension header will be produced.</p>
<p>If the struct was originally constructed from a header, e.g. by <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</a>, the output header will almost certainly differ in a number of respects:</p>
<ul>
<li>The output header only contains WCS-related keywords. In particular, it does not contain syntactically-required keywords such as <code><b>SIMPLE</b></code>, <code><b>NAXIS</b></code>, <code><b>BITPIX</b></code>, or <code><b>END</b></code>.</li>
<li>Deprecated (e.g. <code><b>CROTA</b>n</code>) or non-standard usage will be translated to standard (this is partially dependent on whether <a class="el" href="wcsfix_8h.html#a89e1b5b4d2fa89af03f5d1143352b05f" title="Translate a non-standard WCS struct. ">wcsfix()</a> was applied).</li>
<li>Quantities will be converted to the units used internally, basically SI with the addition of degrees.</li>
<li>Floating-point quantities may be given to a different decimal precision.</li>
<li>Elements of the <code><b>PC</b>i<b>_</b>ja</code> matrix will be written if and only if they differ from the unit matrix. Thus, if the matrix is unity then no elements will be written.</li>
<li>Additional keywords such as <code><b>WCSAXES</b>a</code>, <code><b>CUNIT</b>ia</code>, <code><b>LONPOLE</b>a</code> and <code><b>LATPOLE</b>a</code> may appear.</li>
<li>The original keycomments will be lost, although <b>wcshdo</b>() tries hard to write meaningful comments.</li>
<li>Keyword order may be changed.</li>
</ul>
<p>Keywords can be translated between the image array, binary table, and pixel lists forms by manipulating the colnum or colax[] members of the <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">relax</td><td>Degree of permissiveness:<ul>
<li>0: Recognize only FITS keywords defined by the published WCS standard.</li>
<li>-1: Admit all informal extensions of the WCS standard.</li>
</ul>
Fine-grained control of the degree of permissiveness is also possible as explained in the notes below.</td></tr>
    <tr><td class="paramdir">[in,out]</td><td class="paramname">wcs</td><td>Pointer to a <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> struct containing coordinate transformation parameters. Will be initialized if necessary.</td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">nkeyrec</td><td>Number of FITS header keyrecords returned in the "header" array. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">header</td><td>Pointer to an array of char holding the header. Storage for the array is allocated by <b>wcshdo</b>() in blocks of 2880 bytes (32 x 80-character keyrecords) and must be free'd by the user to avoid memory leaks. <br/>
 Each keyrecord is 80 characters long and is *NOT* null-terminated, so the first keyrecord starts at (*header)[0], the second at (*header)[80], etc.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Status return value (associated with wcs_errmsg[]):<ul>
<li>0: Success.</li>
<li>1: Null <a class="el" href="structwcsprm.html" title="Coordinate transformation parameters. ">wcsprm</a> pointer passed.</li>
<li>2: Memory allocation failed.</li>
<li>3: Linear transformation matrix is singular.</li>
<li>4: Inconsistent or unrecognized coordinate axis types.</li>
<li>5: Invalid parameter value.</li>
<li>6: Invalid coordinate transformation parameters.</li>
<li>7: Ill-conditioned coordinate transformation parameters.</li>
</ul>
For returns &gt; 1, a detailed error message is set in <a class="el" href="structwcsprm.html#af54ce939604be183231f0ee006e2f8ed">wcsprm::err</a> if enabled, see <a class="el" href="wcserr_8h.html#a1691b8bd184d40ca6fda255be078fa53" title="Enable/disable error messaging. ">wcserr_enable()</a>.</dd></dl>
<p><b>Notes:</b> <br/>
 <b>wcshdo</b>() interprets the <em>relax</em> argument as a vector of flag bits to provide fine-grained control over what non-standard WCS keywords to write. The flag bits are subject to change in future and should be set by using the preprocessor macros (see below) for the purpose.</p>
<ul>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#a54634ed49425e8842874e9e2b77899df" title="Bit mask for wcshdo() - don&#39;t write any extensions. ">WCSHDO_none</a>: Don't use any extensions.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#a5592649ee4c25e118559c6d283c51930" title="Bit mask for wcshdo() - write all extensions. ">WCSHDO_all</a>: Write all recognized extensions, equivalent to setting each flag bit.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#a446914676e0b3f55ac6a080015a52b43" title="Bit mask for wcshdo() - write safe extensions only. ">WCSHDO_safe</a>: Write all extensions that are considered to be safe and recommended.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#a6779d48001260a0011b3dcffdcb64cb6" title="Bit mask for wcshdo() - write DOBSn. ">WCSHDO_DOBSn</a>: Write <code><b>DOBS</b>n</code>, the column-specific analogue of <code><b>DATE-OBS</b></code> for use in binary tables and pixel lists. WCS Paper III introduced <code><b>DATE-AVG</b></code> and <code><b>DAVG</b>n</code> but by an oversight <code><b>DOBS</b>n</code> (the obvious analogy) was never formally defined by the standard. The alternative to using <code><b>DOBS</b>n</code> is to write <code><b>DATE-OBS</b></code> which applies to the whole table. This usage is considered to be safe and is recommended.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#a96b787f84207faa42599e50e6e078d21" title="Bit mask for wcshdo() - write TPCn_ka. ">WCSHDO_TPCn_ka</a>: WCS Paper I defined</p>
<ul>
<li>
<code><b>TP</b>n<b>_</b>ka</code> and <code><b>TC</b>n<b>_</b>ka</code> for pixel lists </li>
</ul>
<p>but WCS Paper II uses <code><b>TPC</b>n<b>_</b>ka</code> in one example and subsequently the errata for the WCS papers legitimized the use of</p>
<ul>
<li>
<code><b>TPC</b>n<b>_</b>ka</code> and <code><b>TCD</b>n<b>_</b>ka</code> for pixel lists </li>
</ul>
<p>provided that the keyword does not exceed eight characters. This usage is considered to be safe and is recommended because of the non-mnemonic terseness of the shorter forms.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#a222a5bd7659f3e1ea1a9ed21f54c50ef" title="Bit mask for wcshdo() - write iPVn_ma, TPVn_ma, iPSn_ma, TPSn_ma. ">WCSHDO_PVn_ma</a>: WCS Paper I defined</p>
<ul>
<li>
<code>i<b>V</b>n<b>_</b>ma</code> and <code>i<b>S</b>n<b>_</b>ma</code> for bintables and </li>
<li>
<code><b>TV</b>n<b>_</b>ma</code> and <code><b>TS</b>n<b>_</b>ma</code> for pixel lists </li>
</ul>
<p>but WCS Paper II uses <code>i<b>PV</b>n<b>_</b>ma</code> and <code><b>TPV</b>n<b>_</b>ma</code> in the examples and subsequently the errata for the WCS papers legitimized the use of</p>
<ul>
<li>
<code>i<b>PV</b>n<b>_</b>ma</code> and <code>i<b>PS</b>n<b>_</b>ma</code> for bintables and </li>
<li>
<code><b>TPV</b>n<b>_</b>ma</code> and <code><b>TPS</b>n<b>_</b>ma</code> for pixel lists </li>
</ul>
<p>provided that the keyword does not exceed eight characters. This usage is considered to be safe and is recommended because of the non-mnemonic terseness of the shorter forms.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#aace96fb8c1499616dd1333af3e8340b0" title="Bit mask for wcshdo() - write jCRPXna, TCRPXna, iCDLTna, TCDLTna, iCUNIna, TCUNIna, iCTYPna, TCTYPna, iCRVLna, TCRVLna. ">WCSHDO_CRPXna</a>: For historical reasons WCS Paper I defined</p>
<ul>
<li>
<code>j<b>CRPX</b>n</code>, <code>i<b>CDLT</b>n</code>, <code>i<b>CUNI</b>n</code>, <code>i<b>CTYP</b>n</code>, and <code>i<b>CRVL</b>n</code> for bintables and </li>
<li>
<code><b>TCRPX</b>n</code>, <code><b>TCDLT</b>n</code>, <code><b>TCUNI</b>n</code>, <code><b>TCTYP</b>n</code>, and <code><b>TCRVL</b>n</code> for pixel lists </li>
</ul>
<p>for use without an alternate version specifier. However, because of the eight-character keyword constraint, in order to accommodate column numbers greater than 99 WCS Paper I also defined</p>
<ul>
<li>
<code>j<b>CRP</b>na</code>, <code>i<b>CDE</b>na</code>, <code>i<b>CUN</b>na</code>, <code>i<b>CTY</b>na</code> and <code>i<b>CRV</b>na</code> for bintables and </li>
<li>
<code><b>TCRP</b>na</code>, <code><b>TCDE</b>na</code>, <code><b>TCUN</b>na</code>, <code><b>TCTY</b>na</code> and <code><b>TCRV</b>na</code> for pixel lists </li>
</ul>
<p>for use with an alternate version specifier (the "a"). Like the PC, CD, PV, and PS keywords there is an obvious tendency to confuse these two forms for column numbers up to 99. It is very unlikely that any parser would reject keywords in the first set with a non-blank alternate version specifier so this usage is considered to be safe and is recommended.</p>
<p class="endli"></p>
</li>
<li>
<p class="startli"><a class="el" href="wcshdr_8h.html#a95325b53ebd8d7d0a371a65b27b3d04a" title="Bit mask for wcshdo() - write iCNAMna, TCNAMna, iCRDEna, TCRDEna, iCSYEna, TCSYEna. ">WCSHDO_CNAMna</a>: WCS Papers I and III defined</p>
<ul>
<li>
<code>i<b>CNA</b>na</code>, <code>i<b>CRD</b>na</code>, and <code>i<b>CSY</b>na</code> for bintables and </li>
<li>
<code><b>TCNA</b>na</code>, <code><b>TCRD</b>na</code>, and <code><b>TCSY</b>na</code> for pixel lists </li>
</ul>
<p>By analogy with the above, the long forms would be</p>
<ul>
<li>
<code>i<b>CNAM</b>n</code>a, <code>i<b>CRDE</b>n</code>a, and <code>i<b>CSYE</b>n</code>a for bintables and </li>
<li>
<code><b>TCNAM</b>n</code>a, <code><b>TCRDE</b>n</code>a, and <code><b>TCSYE</b>n</code>a for pixel lists </li>
</ul>
<p>Note that these keywords provide auxiliary information only, none of them are needed to compute world coordinates. This usage is potentially unsafe and is not recommended at this time.</p>
<p class="endli"></p>
</li>
<li>
<a class="el" href="wcshdr_8h.html#a9a70ad2a355a9736711d8017535bf72b" title="Bit mask for wcshdo() - write WCSNna instead of TWCSna ">WCSHDO_WCSNna</a>: In light of <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> note 4, write <code><b>WCSN</b>na</code> instead of <code><b>TWCS</b>na</code> for pixel lists. While <a class="el" href="wcshdr_8h.html#adc053d80a9c4da454a52eed34e123633" title="FITS WCS parser routine for binary table and image headers. ">wcsbth()</a> treats <code><b>WCSN</b>na</code> and <code><b>TWCS</b>na</code> as equivalent, other parsers may not. Consequently, this usage is potentially unsafe and is not recommended at this time. </li>
</ul>

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

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