wcslib (8.2.2)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>WCSLIB: PGSBOX</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">WCSLIB<span id="projectnumber"> 8.2.2</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="index.html">WCSLIB 8.2.2 and PGSBOX 8.2.2</a></li> </ul>
</div>
</div><!-- top -->
<div><div class="header">
<div class="headertitle"><div class="title">PGSBOX</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p><code>PGSBOX</code>, which is provided as a separate part of WCSLIB, is a <a class="el" href="software.html">PGPLOT</a> routine (PGPLOT being a Fortran graphics library) that draws and labels curvilinear coordinate grids. Example <code>PGSBOX</code> grids can be seen at <a href="http://www.atnf.csiro.au/people/Mark.Calabretta/WCS/PGSBOX/index.html">http://www.atnf.csiro.au/people/Mark.Calabretta/WCS/PGSBOX/index.html</a>.</p>
<p>The prologue to pgsbox.f contains usage instructions. pgtest.f and cpgtest.c serve as test and demonstration programs in Fortran and C and also as well- documented examples of usage.</p>
<p><code>PGSBOX</code> requires a separate routine, <code>EXTERNAL</code> <code>NLFUNC</code>, to define the coordinate transformation. Fortran subroutine <code>PGCRFN</code> (pgcrfn.f) is provided to define separable pairs of non-linear coordinate systems. Linear, logarithmic and power-law axis types are currently defined; further types may be added as required. A C function, <em>pgwcsl_()</em>, with Fortran-like interface defines an <code>NLFUNC</code> that interfaces to WCSLIB 4.x for <code>PGSBOX</code> to draw celestial coordinate grids.</p>
<p><a class="el" href="software.html">PGPLOT</a> is implemented as a Fortran library with a set of C wrapper routines that are generated by a software tool. However, <code>PGSBOX</code> has a more complicated interface than any of the standard PGPLOT routines, especially in having an <code>EXTERNAL</code> function in its argument list. Consequently, <code>PGSBOX</code> is implemented in Fortran but with a hand-coded C wrapper, <em>cpgsbox()</em>.</p>
<p>As an example, in this suite the C test/demo program, <em>cpgtest</em>, calls the C wrapper, <em>cpgsbox()</em>, passing it a pointer to <em>pgwcsl_()</em>. In turn, <em>cpgsbox()</em> calls <code>PGSBOX</code>, which invokes <em>pgwcsl_()</em> as an <code>EXTERNAL</code> subroutine. In this sequence, a complicated C struct defined by <em>cpgtest</em> is passed through <code>PGSBOX</code> to <em>pgwcsl_()</em> as an <code>INTEGER</code> array.</p>
<p>While there are no formal standards for calling Fortran from C, there are some fairly well established conventions. Nevertheless, it's possible that you may need to modify the code if you use a combination of Fortran and C compilers with linkage conventions that differ from that of the GNU compilers, gcc and g77. </p>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Nov 29 2023 19:09:57 for WCSLIB by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>