Debian Codegraph @

userguide/fitstopnm.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
2 <html><head><title>Fitstopnm User Manual</title></head>
3 <body>
4 <h1>fitstopnm</h1>
5 Updated: 02 August 2015
6 <br>
7 <a href="#index">Table Of Contents</a>
8
9 <h2>NAME</h2>
10 fitstopnm - convert a FITS file into a PNM image
11
12 <h2 id="synopsis">SYNOPSIS</h2>
13
14 <b>fitstopnm</b>
15 [<b>-image=</b><i>N</i>]
16 [<b>-scanmax</b>]
17 [<b>-printmax</b>]
18 [<b>-min=</b><i>f</i>]
19 [<b>-max=</b><i>f</i>]
20 [<b>-omaxval=</b><i>N</i>
21 [<i>FITSfile</i>]
22
23 <p>Minimum unique abbreviation of option is acceptable. You may use double
24 hyphens instead of single hyphen to denote options. You may use white
25 space in place of the equals sign to separate an option name from its value.
26
27
28 <h2 id="description">DESCRIPTION</h2>
29
30 <p>This program is part of <a href="index.html">Netpbm</a>.
31
32 <p><b>fitstopnm</b> reads a FITS (Flexible Image Transport System) file as
33 input and produces a PPM image if the FITS file consists of 3 image planes
34 (NAXIS = 3 and NAXIS3 = 3), or a PGM image if the FITS file consists of 2
35 image planes (NAXIS = 2), or if you specify the <b>-image</b> option.
36
37 <p>Note that the PPM image is highly unlikely to be a true PPM image, as it is
38 not normal for a FITS image to use the third axis as R, G, and B components of
39 the pixels. The most common interpretation when there are 3 axes is that the
40 third one is time. So the image is instead a pseudo-PPM in which the three
41 sample values of a pixel represent something other than color components, for
42 example gray levels at three instants (this variation on PPM is common in
43 programs such as <b>fitstopnm</b> that predate the PAM format).
44
45 <p>If you work with FITS images with 3 axes, you should probably always use
46 the <b>-image</b> option to avoid getting an unwanted pseudo-PPM image.
47
48 <p>The program tells you what kind of PNM image it is writing.
49
50
51 <h2 id="options">OPTIONS</h2>
52
53 <p>In addition to the options common to all programs based on libnetpbm
54 (most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
55 Common Options</a>), <b>fitstopnm</b> recognizes the following
56 command line options:
57
58 <dl>
59
60 <dt><b>-image=</b><i>N</i>
61
62 <dd>This is for FITS files with three axes. This option says that the third
63 axis is for multiple images, and the option value <i>N</i> tells which one you
64 want.
65
66 <dt><b>-omaxval=</b><i>N</i>
67
68 <p>This is the maxval that the output PNM image is to have.
69
70 <p>By default, the maxval is the least possible to retain all the
71 precision of the FITS input. That means the difference between the
72 highest and lowest sample value in the input. If the values range
73 from -5 to 100, for example, the default maxval would be 106 and each
74 PNM sample value would correspond to one FITS sample value.
75
76 <p>For a FITS input with floating point sample values, the precision is
77 essentially unlimited, so this is not possible. In that case, the default
78 maxval is simply 255.
79
80 <p>This option was new in Netpbm 10.39 (June 2007). Before that, the
81 output maxval is always the default.
82
83 <dt><b>-min=</b><i>float</i>
84 <dt><b>-max=</b><i>float</i>
85 <dd>
86
87 <p>You can use these options to override the min and max values as
88 read from the FITS header or the image data if the header has no
89 DATAMIN and DATAMAX keywords.
90
91 <dt><b>-scanmax</b>
92 <dd>
93 Use this option to force the program to scan the data even when the
94 header has DATAMIN and DATAMAX.
95
96 <dt><b>-printmax</b>
97
98 <dd>With this option, the program just prints the min and max values
99 and quits without doing its normal job.
100
101 <p>This is for use in shell programs. Example:
102
103 <pre>
104 <code>
105 eval 'fitstopnm -printmax $filename | \
106 awk {min = $1; max = $2} \
107 END {print "min=" min; " max=" max}'
108 </code>
109 </pre>
110
111 </dl>
112
113 <h2 id="notes">NOTES</h2>
114
115 <h3 id="pixelorder">Pixel Order</h3>
116
117 <p>You may need to pass the output of <b>fitstopnm</b> through <b>pamflip
118 -topbottom</b>. See <a href="pamtofits.html#pixelorder"><b>pamtofits</b></a>
119
120
121 <h2 id="seealso">SEE ALSO</h2>
122
123 <a href="pamtofits.html">pamtofits</a>,
124 <a href="pamflip.html">pamflip</a>,
125 <a href="pgm.html">pgm</a>
126
127 <h2 id="author">AUTHOR</h2>
128
129 Copyright (C) 1989 by Jef Poskanzer, with modifications by Daniel
130 Briggs (<a href="mailto:[email protected]">[email protected]</a>) and
131 Alberto Accomazzi (<a
132 href="mailto:[email protected]">[email protected]</a>).
133
134
135 <hr>
136 <h2 id="index">Table Of Contents</h2>
137 <ul>
138 <li><a href="#synopsis">SYNOPSIS</a>
139 <li><a href="#description">DESCRIPTION</a>
140 <li><a href="#options">OPTIONS</a>
141 <li><a href="#notes">NOTES</a>
142 <ul>
143 <li><a href="#pixelorder">Pixel Order</a>
144 </ul>
145 <li><a href="#seealso">SEE ALSO</a>
146 <li><a href="#author">AUTHOR</a>
147 </ul>
148 </body>
149 </html>