| 1 |
\ |
| 2 |
.\" This man page was generated by the Netpbm tool 'makeman' from HTML source. |
| 3 |
.\" Do not hand-hack it! If you have bug fixes or improvements, please find |
| 4 |
.\" the corresponding HTML page on the Netpbm website, generate a patch |
| 5 |
.\" against that, and send it to the Netpbm maintainer. |
| 6 |
.TH "Pamtofits User Manual" 1 "25 September 2005" "netpbm documentation" |
| 7 |
|
| 8 |
.SH NAME |
| 9 |
|
| 10 |
pamtofits - convert a Netpbm image into FITS format |
| 11 |
|
| 12 |
.UN synopsis |
| 13 |
.SH SYNOPSIS |
| 14 |
|
| 15 |
\fBpamtofits\fP |
| 16 |
[\fB-max\fP \fIf\fP] |
| 17 |
[\fB-min\fP \fIf\fP] |
| 18 |
[\fIpamfile\fP] |
| 19 |
|
| 20 |
.UN description |
| 21 |
.SH DESCRIPTION |
| 22 |
.PP |
| 23 |
This program is part of |
| 24 |
.BR "Netpbm" (1)\c |
| 25 |
\&. |
| 26 |
.PP |
| 27 |
\fBpamtofits\fP reads a PNM or PAM image as input and produces a FITS |
| 28 |
(Flexible Image Transport System) file as output. The resolution of |
| 29 |
the output file is either 8 bits/pixel, or 16 bits/pixel, depending on |
| 30 |
the value of maxval in the input file. If the input file is a PBM or |
| 31 |
PGM image, the output file consists of a single plane image (NAXIS = |
| 32 |
2). If instead the input file is a PPM image, the output file will |
| 33 |
consist of a three-plane image (NAXIS = 3, NAXIS3 = 3). |
| 34 |
|
| 35 |
.UN options |
| 36 |
.SH OPTIONS |
| 37 |
.PP |
| 38 |
In addition to the options common to all programs based on libnetpbm |
| 39 |
(most notably \fB-quiet\fP, see |
| 40 |
.UR index.html#commonoptions |
| 41 |
Common Options |
| 42 |
.UE |
| 43 |
\&), \fBpamtofits\fP recognizes the following |
| 44 |
command line options: |
| 45 |
.PP |
| 46 |
\fB-min\fP and \fB-max\fP tell \fBpamtofits\fP what "physical |
| 47 |
values" zero and maxval sample values, respectively, in the input |
| 48 |
image represent. Physical values are a FITS concept. \fBpamtofits\fP |
| 49 |
sets up the \fBBSCALE\fP and \fBBZERO\fP FITS header cards to indicate |
| 50 |
this information. |
| 51 |
.PP |
| 52 |
The default for \fB-min\fP is 0 and for \fB-max\fP is the maxval, |
| 53 |
which means if you don't specify these options, the FITS physical values |
| 54 |
are in fact the original Netpbm sample values. |
| 55 |
.PP |
| 56 |
\fBpamtofits\fP always sets up the FITS header \fBDATAMIN\fP and |
| 57 |
\fBDATAMAX\fP cards to indicate that the highest physical value in |
| 58 |
the image is the one corresponding to the Netpbm maxval and the lowest is |
| 59 |
that corresponding to Netpbm zero. This isn't really how those cards are |
| 60 |
supposed to be used, since the input image doesn't necessarily contain |
| 61 |
the full possible range of sample values. It is a conservative |
| 62 |
approximation. |
| 63 |
|
| 64 |
.UN notes |
| 65 |
.SH NOTES |
| 66 |
|
| 67 |
.UN pixelorder |
| 68 |
.SS Pixel Order |
| 69 |
.PP |
| 70 |
The FITS specification does not specify which data in the file corresponds |
| 71 |
to which pixel in the image (i.e. which bytes are the top left pixel, |
| 72 |
etc.). Netpbm uses the common sense, most popular arrangement: row major, top |
| 73 |
to bottom, left to right. That means in a 10 wide by 20 high image, the first |
| 74 |
10 pixels in the file are the top row and the last 10 are the bottom row. |
| 75 |
Within each row, the first pixel is the leftmost one and the last pixel is |
| 76 |
the rightmost one. |
| 77 |
.PP |
| 78 |
\fBNetpbm\fP has always done that, since it first understood the |
| 79 |
FITS format in 1989, so it is something of a de facto standard. Nobody |
| 80 |
reported trouble with that until 2008. |
| 81 |
.PP |
| 82 |
However, at least some versions of ImageMagick and Gimp (as seen in 2008) |
| 83 |
use bottom to top order, so if you use on of these to display a FITS image |
| 84 |
generated by \fBpamtofits\fP, it will appear upside down. To fix that, |
| 85 |
use \fBpamflip -topbottom\fP on the image before feeding it |
| 86 |
to \fBpamtofits\fP. |
| 87 |
.PP |
| 88 |
Since 2008, people have noted that NASA distributes FITS files with |
| 89 |
bottom to top order. |
| 90 |
|
| 91 |
|
| 92 |
.UN history |
| 93 |
.SH HISTORY |
| 94 |
.PP |
| 95 |
\fBpamtofits\fP was originally \fBpnmtofits\fP and did not handle |
| 96 |
PAM input. It was extended and renamed in Netpbm 10.30 (October 2005). |
| 97 |
.PP |
| 98 |
\fBpnmtofits\fP was itself an extension of \fBpgmtofits\fP, which |
| 99 |
was added to Pbmplus in 1989. |
| 100 |
|
| 101 |
.UN seealso |
| 102 |
.SH SEE ALSO |
| 103 |
.BR "fitstopnm" (1)\c |
| 104 |
\&, |
| 105 |
.BR "pam" (1)\c |
| 106 |
\& |
| 107 |
|
| 108 |
.UN author |
| 109 |
.SH AUTHOR |
| 110 |
|
| 111 |
Copyright (C) 1989 by Wilson H. Bent (\[email protected]\fP), with |
| 112 |
modifications by Alberto Accomazzi (\[email protected]\fP). |
| 113 |
.SH DOCUMENT SOURCE |
| 114 |
This manual page was generated by the Netpbm tool 'makeman' from HTML |
| 115 |
source. The master documentation is at |
| 116 |
.IP |
| 117 |
.B http://netpbm.sourceforge.net/doc/pamtofits.html |
| 118 |
.PP |