1Pamtofits User Manual(0)                              Pamtofits User Manual(0)
2
3
4

NAME

6       pamtofits - convert a Netpbm image into FITS format
7
8

SYNOPSIS

10       pamtofits [-max f] [-min f] [pamfile]
11
12

DESCRIPTION

14       This program is part of Netpbm(1).
15
16       pamtofits reads a PNM or PAM image as input and produces a FITS (Flexi‐
17       ble Image Transport System) file as output.  The resolution of the out‐
18       put  file  is  either  8 bits/pixel, or 16 bits/pixel, depending on the
19       value of maxval in the input file.  If the input file is a PBM  or  PGM
20       image, the output file consists of a single plane image (NAXIS = 2). If
21       instead the input file is a PPM image, the output file will consist  of
22       a three-plane image (NAXIS = 3, NAXIS3 = 3).
23
24

OPTIONS

26       -min  and  -max  tell  pamtofits what "physical values" zero and maxval
27       sample values, respectively, in the input  image  represent.   Physical
28       values are a FITS concept.  pamtofits sets up the BSCALE and BZERO FITS
29       header cards to indicate this information.
30
31       The default for -min is 0 and for -max is the maxval,  which  means  if
32       you  don't  specify these options, the FITS physical values are in fact
33       the original Netpbm sample values.
34
35       pamtofits always sets up the FITS header DATAMIN and DATAMAX  cards  to
36       indicate that the highest physical value in the image is the one corre‐
37       sponding to the Netpbm maxval and the lowest is that  corresponding  to
38       Netpbm  zero.   This  isn't  really  how those cards are supposed to be
39       used, since the input image doesn't necessarily contain the full possi‐
40       ble range of sample values.  It is a conservative approximation.
41
42

NOTES

44   Pixel Order
45       The  FITS  specification does not specify which data in the file corre‐
46       sponds to which pixel in the image (i.e. which bytes are the  top  left
47       pixel,  etc.).  Netpbm uses the common sense, most popular arrangement:
48       row major, top to bottom, left to right.  That means in a 10 wide by 20
49       high  image,  the  first  10 pixels in the file are the top row and the
50       last 10 are the bottom row.  Within each row, the first  pixel  is  the
51       leftmost one and the last pixel is the rightmost one.
52
53       Netpbm  has always done that, since it first understood the FITS format
54       in 1989, so it is something of a de facto  standard.   Nobody  reported
55       trouble with that until 2008.
56
57       However,  at  least  some  versions of ImageMagick and Gimp (as seen in
58       2008) use bottom to top order, so if you use on of these to  display  a
59       FITS  image generated by pamtofits, it will appear upside down.  To fix
60       that, use  pamflip  -topbottom  on  the  image  before  feeding  it  to
61       pamtofits.
62
63       Since  2008,  people  have  noted that NASA distributes FITS files with
64       bottom to top order.
65
66
67

HISTORY

69       pamtofits was originally pnmtofits and did not handle  PAM  input.   It
70       was extended and renamed in Netpbm 10.30 (October 2005).
71
72       pnmtofits was itself an extension of pgmtofits, which was added to Pbm‐
73       plus in 1989.
74
75

SEE ALSO

77       fitstopnm(1), pam(1)
78
79

AUTHOR

81       Copyright (C) 1989 by Wilson H. Bent (whb@hoh-2.att.com), with  modifi‐
82       cations by Alberto Accomazzi (alberto@cfa.harvard.edu).
83

DOCUMENT SOURCE

85       This  manual  page was generated by the Netpbm tool 'makeman' from HTML
86       source.  The master documentation is at
87
88              http://netpbm.sourceforge.net/doc/pamtofits.html
89
90netpbm documentation           25 September 2005      Pamtofits User Manual(0)
Impressum