.TL Pnmtofits User Manual .SH 1 pnmtofits .LP Updated: 25 September 2005 .br Table Of Contents .SH 2 NAME .LP pnmtofits - convert a PNM image into FITS format .SH 2 SYNOPSIS .LP \fBpnmtofits\fR [\fB-max\fR \fIf\fR] [\fB-min\fR \fIf\fR] [\fIpnmfile\fR] .SH 2 DESCRIPTION .LP .LP This program is part of Netpbm. .LP \fBpnmtofits\fR reads a PNM image as input and produces a FITS (Flexible Image Transport System) file as output. The resolution of the output file is either 8 bits/pixel, or 16 bits/pixel, depending on the value of maxval in the input file. If the input file is a PBM or PGM image, the output file consists of a single plane image (NAXIS = 2). If instead the input file is a PPM image, the output file will consist of a three-plane image (NAXIS = 3, NAXIS3 = 3). .LP You can find a full description of the FITS format in Astronomy & Astrophysics Supplement Series 44 (1981), page 363. .SH 2 OPTIONS .LP .LP \fB-min\fR and \fB-max\fR tell \fBpnmtofits\fR what "physical values" zero and maxval sample values, respectively, in the input image represent. Physical values are a FITS concept. \fBpnmtofits\fR sets up the \fBBSCALE\fR and \fBBZERO\fR FITS header cards to indicate this information. .LP The default for \fB-min\fR is 0 and for \fB-max\fR is the maxval, which means if you don't specify these options, the FITS physical values are in fact the original PNM sample values. .LP \fBpnmtofits\fR always sets up the FITS header \fBDATAMIN\fR and \fBDATAMAX\fR cards to indicate that the highest physical value in the image is the one corresponding to the PNM maxval and the lowest is that corresponding to PNM zero. This isn't really how those cards are supposed to be used, since the input image doesn't necessarily contain the full possible range of sample values. It is a conservative approximation. .SH 2 HISTORY .LP .LP \fBpamtofits\fR was originally \fBpnmtofits\fR and did not handle PAM input. It was extended and renamed in Netpbm 10.30 (October 2005). .SH 2 SEE ALSO .LP fitstopnm, pnm .SH 2 AUTHOR .LP Copyright (C) 1989 by Wilson H. Bent (whb@hoh-2.att.com), with modifications by Alberto Accomazzi (alberto@cfa.harvard.edu). .br \l'5i' .SH 2 Table Of Contents .LP .IP \(bu NAME .IP \(bu SYNOPSIS .IP \(bu DESCRIPTION .IP \(bu OPTIONS .IP \(bu HISTORY .IP \(bu SEE ALSO .IP \(bu AUTHOR .LP