File: pgsbox.html

package info (click to toggle)
python-pywcs 1.11-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 11,888 kB
  • sloc: ansic: 31,441; lex: 6,170; fortran: 6,080; sh: 3,478; python: 3,122; sed: 408; makefile: 76
file content (31 lines) | stat: -rw-r--r-- 3,520 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>WCSLIB 4.8.2: PGSBOX</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="index.html">WCSLIB 4.8.2 and PGSBOX 4.8.2</a>
  </div>
</div>
<div class="contents">
<h1><a class="anchor" name="pgsbox">PGSBOX </a></h1><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/~mcalabre/WCS/PGSBOX/index.html.">http://www.atnf.csiro.au/~mcalabre/WCS/PGSBOX/index.html.</a><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>
<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>
<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>
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>
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. </div>
<hr size="1"><address style="text-align: right;"><small>Generated on Tue Oct 4 19:02:31 2011 for WCSLIB 4.8.2 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>