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       In  addition  to  the options common to all programs based on libnetpbm
27       (most notably -quiet, see
28        Common Options ⟨index.html#commonoptions⟩ ), pamtofits recognizes  the
29       following command line options:
30
31       -min  and  -max  tell  pamtofits what "physical values" zero and maxval
32       sample values, respectively, in the input  image  represent.   Physical
33       values are a FITS concept.  pamtofits sets up the BSCALE and BZERO FITS
34       header cards to indicate this information.
35
36       The default for -min is 0 and for -max is the maxval,  which  means  if
37       you  don't  specify these options, the FITS physical values are in fact
38       the original Netpbm sample values.
39
40       pamtofits always sets up the FITS header DATAMIN and DATAMAX  cards  to
41       indicate that the highest physical value in the image is the one corre‐
42       sponding to the Netpbm maxval and the lowest is that  corresponding  to
43       Netpbm  zero.   This  isn't  really  how those cards are supposed to be
44       used, since the input image doesn't necessarily contain the full possi‐
45       ble range of sample values.  It is a conservative approximation.
46
47

NOTES

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

HISTORY

74       pamtofits was originally pnmtofits and did not handle  PAM  input.   It
75       was extended and renamed in Netpbm 10.30 (October 2005).
76
77       pnmtofits was itself an extension of pgmtofits, which was added to Pbm‐
78       plus in 1989.
79
80

SEE ALSO

82       fitstopnm(1), pam(1)
83
84

AUTHOR

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

DOCUMENT SOURCE

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