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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
\
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
.\" Do not hand-hack it! If you have bug fixes or improvements, please find
.\" the corresponding HTML page on the Netpbm website, generate a patch
.\" against that, and send it to the Netpbm maintainer.
.TH "Fitstopnm User Manual" 0 "02 August 2015" "netpbm documentation"
.SH NAME
fitstopnm - convert a FITS file into a PNM image
.UN synopsis
.SH SYNOPSIS
\fBfitstopnm\fP
[\fB-image=\fP\fIN\fP]
[\fB-scanmax\fP]
[\fB-printmax\fP]
[\fB-min=\fP\fIf\fP]
[\fB-max=\fP\fIf\fP]
[\fB-omaxval=\fP\fIN\fP
[\fIFITSfile\fP]
.PP
Minimum unique abbreviation of option is acceptable. You may use double
hyphens instead of single hyphen to denote options. You may use white
space in place of the equals sign to separate an option name from its value.
.UN description
.SH DESCRIPTION
.PP
This program is part of
.BR "Netpbm" (1)\c
\&.
.PP
\fBfitstopnm\fP reads a FITS (Flexible Image Transport System) file as
input and produces a PPM image if the FITS file consists of 3 image planes
(NAXIS = 3 and NAXIS3 = 3), or a PGM image if the FITS file consists of 2
image planes (NAXIS = 2), or if you specify the \fB-image\fP option.
.PP
Note that the PPM image is highly unlikely to be a true PPM image, as it is
not normal for a FITS image to use the third axis as R, G, and B components of
the pixels. The most common interpretation when there are 3 axes is that the
third one is time. So the image is instead a pseudo-PPM in which the three
sample values of a pixel represent something other than color components, for
example gray levels at three instants (this variation on PPM is common in
programs such as \fBfitstopnm\fP that predate the PAM format).
.PP
If you work with FITS images with 3 axes, you should probably always use
the \fB-image\fP option to avoid getting an unwanted pseudo-PPM image.
.PP
The program tells you what kind of PNM image it is writing.
.UN options
.SH OPTIONS
.PP
In addition to the options common to all programs based on libnetpbm
(most notably \fB-quiet\fP, see
.UR index.html#commonoptions
Common Options
.UE
\&), \fBfitstopnm\fP recognizes the following
command line options:
.TP
\fB-image=\fP\fIN\fP
This is for FITS files with three axes. This option says that the third
axis is for multiple images, and the option value \fIN\fP tells which one you
want.
.TP
\fB-omaxval=\fP\fIN\fP
.sp
This is the maxval that the output PNM image is to have.
.sp
By default, the maxval is the least possible to retain all the
precision of the FITS input. That means the difference between the
highest and lowest sample value in the input. If the values range
from -5 to 100, for example, the default maxval would be 106 and each
PNM sample value would correspond to one FITS sample value.
.sp
For a FITS input with floating point sample values, the precision is
essentially unlimited, so this is not possible. In that case, the default
maxval is simply 255.
.sp
This option was new in Netpbm 10.39 (June 2007). Before that, the
output maxval is always the default.
.TP
\fB-min=\fP\fIfloat\fP
.TP
\fB-max=\fP\fIfloat\fP
.sp
You can use these options to override the min and max values as
read from the FITS header or the image data if the header has no
DATAMIN and DATAMAX keywords.
.TP
\fB-scanmax\fP
Use this option to force the program to scan the data even when the
header has DATAMIN and DATAMAX.
.TP
\fB-printmax\fP
With this option, the program just prints the min and max values
and quits without doing its normal job.
.sp
This is for use in shell programs. Example:
.nf
\f(CW
eval 'fitstopnm -printmax $filename | \e
awk {min = $1; max = $2} \e
END {print "min=" min; " max=" max}'
\fP
.fi
.UN notes
.SH NOTES
.UN pixelorder
.SS Pixel Order
.PP
You may need to pass the output of \fBfitstopnm\fP through \fBpamflip
-topbottom\fP. See
.UR pamtofits.html#pixelorder
\fBpamtofits\fP
.UE
\&
.UN seealso
.SH SEE ALSO
.BR "pamtofits" (1)\c
\&,
.BR "pamflip" (1)\c
\&,
.BR "pgm" (1)\c
\&
.UN author
.SH AUTHOR
Copyright (C) 1989 by Jef Poskanzer, with modifications by Daniel
Briggs (\fIdbriggs@nrao.edu\fP) and
Alberto Accomazzi (\fIalberto@cfa.harvard.edu\fP).
.SH DOCUMENT SOURCE
This manual page was generated by the Netpbm tool 'makeman' from HTML
source. The master documentation is at
.IP
.B http://netpbm.sourceforge.net/doc/fitstopnm.html
.PP
|