{
    "content": [
        {
            "type": "text",
            "text": "# fitstopnm (man)\n\n## NAME\n\nfitstopnm - convert a FITS file into a PNM image\n\n## SYNOPSIS\n\nfitstopnm [-image=N] [-scanmax] [-printmax] [-min=f] [-max=f] [-omaxval=N [FITSfile]\nMinimum  unique  abbreviation of option is acceptable.  You may use double hyphens instead of\nsingle hyphen to denote options.  You may use white space in place of the equals sign to sep‐\narate an option name from its value.\n\n## DESCRIPTION\n\nThis program is part of Netpbm(1).\n\n## TLDR\n\n> Convert a Flexible Image Transport System (FITS) file to a PNM image.\n\n- Convert a FITS file to a PNM image:\n  `fitstopnm {{path/to/file.fits}} > {{path/to/output.pnm}}`\n- Convert the image on the specified position of the third axis in the FITS file:\n  `fitstopnm {{-i|-image}} {{z_position}} {{path/to/file.fits}} > {{path/to/output.pnm}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (6 subsections)\n- **NOTES** (1 subsections)\n- **SEE ALSO**\n- **AUTHOR**\n- **DOCUMENT SOURCE**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "fitstopnm",
        "section": "",
        "mode": "man",
        "summary": "fitstopnm - convert a FITS file into a PNM image",
        "synopsis": "fitstopnm [-image=N] [-scanmax] [-printmax] [-min=f] [-max=f] [-omaxval=N [FITSfile]\nMinimum  unique  abbreviation of option is acceptable.  You may use double hyphens instead of\nsingle hyphen to denote options.  You may use white space in place of the equals sign to sep‐\narate an option name from its value.",
        "tldr_summary": "Convert a Flexible Image Transport System (FITS) file to a PNM image.",
        "tldr_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}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "This is for FITS files with three axes. This option says that the third axis is for multiple images, and the option value N tells which one you want."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "This is the maxval that the output PNM image is to have. By default, the maxval is the least possible to retain all the precision of the FITS input. That means the difference between the highest and lowest sample value in the input. If the values range from -5 to 100, for example, the default maxval would be 106 and each PNM sample value would correspond to one FITS sample value. For a FITS input with floating point sample values, the precision is essentially un‐ limited, so this is not possible. In that case, the default maxval is simply 255. This option was new in Netpbm 10.39 (June 2007). Before that, the output maxval is always the default."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "You can use these options to override the min and max values as read from the FITS header or the image data if the header has no DATAMIN and DATAMAX keywords."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Use this option to force the program to scan the data even when the header has DATAMIN and DATAMAX."
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "With this option, the program just prints the min and max values and quits without do‐ ing its normal job. This is for use in shell programs. Example: eval 'fitstopnm -printmax $filename | \\ awk {min = $1; max = $2} \\ END {print \"min=\" min; \" max=\" max}'"
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "pamtofits",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pamtofits/1/json"
            },
            {
                "name": "pamflip",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pamflip/1/json"
            },
            {
                "name": "pgm",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/pgm/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 6,
                "subsections": [
                    {
                        "name": "-image=_",
                        "lines": 4
                    },
                    {
                        "name": "-omaxval=_",
                        "lines": 14
                    },
                    {
                        "name": "-min=_",
                        "lines": 1
                    },
                    {
                        "name": "-max=_",
                        "lines": 4
                    },
                    {
                        "name": "-scanmax",
                        "lines": 4
                    },
                    {
                        "name": "-printmax",
                        "lines": 13
                    }
                ]
            },
            {
                "name": "NOTES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Pixel Order",
                        "lines": 4
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DOCUMENT SOURCE",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "fitstopnm - convert a FITS file into a PNM image\n\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "fitstopnm [-image=N] [-scanmax] [-printmax] [-min=f] [-max=f] [-omaxval=N [FITSfile]\n\nMinimum  unique  abbreviation of option is acceptable.  You may use double hyphens instead of\nsingle hyphen to denote options.  You may use white space in place of the equals sign to sep‐\narate an option name from its value.\n\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This program is part of Netpbm(1).\n\nfitstopnm reads a FITS (Flexible Image Transport System) file as input and produces a PPM im‐\nage if the FITS file consists of 3 image planes (NAXIS = 3 and NAXIS3 = 3), or a PGM image if\nthe FITS file consists of 2 image planes (NAXIS = 2), or if you specify the -image option.\n\nNote that the PPM image is highly unlikely to be a true PPM image, as it is not normal for  a\nFITS  image  to  use the third axis as R, G, and B components of the pixels.  The most common\ninterpretation when there are 3 axes is that the third one is time.  So the image is  instead\na pseudo-PPM in which the three sample values of a pixel represent something other than color\ncomponents,  for  example  gray  levels at three instants (this variation on PPM is common in\nprograms such as fitstopnm that predate the PAM format).\n\nIf you work with FITS images with 3 axes, you should probably always use the -image option to\navoid getting an unwanted pseudo-PPM image.\n\nThe program tells you what kind of PNM image it is writing.\n\n\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "In addition to the options common to all programs based on libnetpbm  (most  notably  -quiet,\nsee \u001b]8;;index.html#commonoptions\u001b\\ Common Options\u001b]8;;\u001b\\ ), fitstopnm recognizes the following command line options:\n\n\n\n",
                "subsections": [
                    {
                        "name": "-image=_",
                        "content": "This  is  for FITS files with three axes.  This option says that the third axis is for\nmultiple images, and the option value N tells which one you want.\n\n"
                    },
                    {
                        "name": "-omaxval=_",
                        "content": "This is the maxval that the output PNM image is to have.\n\nBy default, the maxval is the least possible to retain all the precision of  the  FITS\ninput.   That  means the difference between the highest and lowest sample value in the\ninput.  If the values range from -5 to 100, for example, the default maxval  would  be\n106 and each PNM sample value would correspond to one FITS sample value.\n\nFor  a  FITS input with floating point sample values, the precision is essentially un‐\nlimited, so this is not possible.  In that case, the default maxval is simply 255.\n\nThis option was new in Netpbm 10.39 (June 2007).  Before that, the  output  maxval  is\nalways the default.\n\n"
                    },
                    {
                        "name": "-min=_",
                        "content": ""
                    },
                    {
                        "name": "-max=_",
                        "content": "You  can  use  these  options to override the min and max values as read from the FITS\nheader or the image data if the header has no DATAMIN and DATAMAX keywords.\n\n"
                    },
                    {
                        "name": "-scanmax",
                        "content": "Use this option to force the program to scan the data even when the header has DATAMIN\nand DATAMAX.\n\n"
                    },
                    {
                        "name": "-printmax",
                        "content": "With this option, the program just prints the min and max values and quits without do‐\ning its normal job.\n\nThis is for use in shell programs.  Example:\n\neval 'fitstopnm -printmax $filename | \\\nawk {min = $1; max = $2} \\\nEND {print \"min=\" min; \" max=\" max}'\n\n\n\n\n"
                    }
                ]
            },
            "NOTES": {
                "content": "",
                "subsections": [
                    {
                        "name": "Pixel Order",
                        "content": "You may need to pass the output of fitstopnm through pamflip -topbottom.  See \u001b]8;;pamtofits.html#pixelorder\u001b\\pamtofits\u001b]8;;\u001b\\\n\n\n"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "pamtofits(1), pamflip(1), pgm(1)\n\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",
                "subsections": []
            },
            "DOCUMENT SOURCE": {
                "content": "This  manual  page  was  generated by the Netpbm tool 'makeman' from HTML source.  The master\ndocumentation is at\n\nhttp://netpbm.sourceforge.net/doc/fitstopnm.html\n\nnetpbm documentation                       02 August 2015                   Fitstopnm User Manual(1)",
                "subsections": []
            }
        }
    }
}