{
    "mode": "man",
    "parameter": "fitstopnm",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/fitstopnm/1/json",
    "generated": "2026-06-15T16:43:09Z",
    "synopsis": "fitstopnm [-image N] [-noraw] [-scanmax] [-printmax] [-min f] [-max f] [FITSfile]",
    "sections": {
        "NAME": {
            "content": "fitstopnm - convert a FITS file into a portable anymap\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "fitstopnm [-image N] [-noraw] [-scanmax] [-printmax] [-min f] [-max f] [FITSfile]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Reads  a FITS file as input.  Produces a portable pixmap if the FITS file consists of 3 image\nplanes (NAXIS = 3 and NAXIS3 = 3), a portable graymap if the FITS file consists  of  2  image\nplanes  (NAXIS  =  2),  or whenever the -image flag is specified.  The results may need to be\nflipped top for bottom; if so, just pipe the output through pnmflip -tb.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "The -image option is for FITS files with three axes.  The assumption is that the  third  axis\nis for multiple images, and this option lets you select which one you want.\n\nFlags  -min  and  -max  can  be used to override the min and max values as read from the FITS\nheader or the image data if no DATAMIN and DATAMAX keywords are found.  Flag -scanmax can  be\nused  to  force  the  program to scan the data even when DATAMIN and DATAMAX are found in the\nheader. If -printmax is specified, the program will just print the min  and  max  values  and\nquit.  Flag -noraw can be used to force the program to produce an ASCII portable anymap.\n\nThe  program will tell what kind of anymap is writing.  All flags can be abbreviated to their\nshortest unique prefix.\n",
            "subsections": []
        },
        "REFERENCES": {
            "content": "FITS stands for Flexible Image Transport System.  A full description can be found in  Astron‐\nomy & Astrophysics Supplement Series 44 (1981), page 363.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "pnmtofits(1), pgm(5), pnmflip(1)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Copyright  (C)  1989 by Jef Poskanzer, with modifications by Daniel Briggs (dbriggs@nrao.edu)\nand Alberto Accomazzi (alberto@cfa.harvard.edu).\n\n\n\n20 September 89                              fitstopnm(1)",
            "subsections": []
        }
    },
    "summary": "fitstopnm - convert a FITS file into a portable anymap",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "pnmtofits",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnmtofits/1/json"
        },
        {
            "name": "pgm",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/pgm/5/json"
        },
        {
            "name": "pnmflip",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/pnmflip/1/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "Convert a Flexible Image Transport System (FITS) file to a PNM image.",
        "examples": [
            {
                "description": "Convert a FITS file to a PNM image",
                "command": "fitstopnm {{path/to/file.fits}} > {{path/to/output.pnm}}"
            },
            {
                "description": "Convert the image on the specified position of the third axis in the FITS file",
                "command": "fitstopnm {{-i|-image}} {{z_position}} {{path/to/file.fits}} > {{path/to/output.pnm}}"
            }
        ]
    }
}