MCONVERT(1)
π mConvert β the manual page, bestie edition π
okay so you found yourself at the mConvert(1) page, from the Montage era (Montage, she's the manual, not a person, keep up π). Sit down, hydrate, and let's get you fluent.
β¨ NAME β¨
mConvert β literally just changes FITS data into a different data type (like, integer to floating-point, the glow-up pipeline we all deserve). π₯
πΈ SYNOPSIS πΈ
mConvert [-d level] [-s statusfile] [-b bitpix] [-min minval] [-max maxval] [-blank blankval] in.fits out.fits
π¦ DESCRIPTION π¦
So mConvert changes the datatype of an image. That's the whole job. That's the vibe. π«
When you're converting to floating point? Gorgeous, effortless, no extra info needed, she just does it, main character energy, periodt.
But the second you go from higher precision (say, 64-bit floating point) down to lower precision (say, 16-bit integer)?? Now we need scaling information, bestie. And you've got two options: you hand it over explicitly, or the program guesses it for you. Your call, your life. π
π OPTIONS π
-d levelβ turns on debugging to the specified level (1-3). Turn it up if something's acting shady. π-s statusfileβmBgModeloutput and errors get written to statusfile instead of to stdout. Like, redirect the drama. π-b bitpixβ the BITPIX value for the output FITS file (default is-64). Possible values are:
8 (character or unsigned binary integer), 16 (16-bit integer), 32 (32-bit integer), -32 (single precision floating point), -64 (double precision floating point).
-min minvalβ the pixel data value in the input image that should be treated as a minimum (value of0) in the output image when you're converting from floating point to integer. Defaults: for BITPIX 8 it's0; for BITPIX 16 it's-32767; for BITPIX 32 it's-2147483647.-max maxvalβ the pixel data value in the input image that should be treated as a maximum (value of255or32768) in the output image when converting from floating point to integer. Defaults: for BITPIX 8 it's255; for BITPIX 16 it's32768; for BITPIX 32 it's2147483648.-blank blankvalβ if you're converting down to an integer scale, this is the value used in the output image to represent blank pixels (NaN) from the input image. Default value is minval. π«₯
π ARGUMENTS π
in.fitsβ input image filename. The before picture. πΈout.fitsβ output image filename. The after picture. β¨
π RESULT π
Output image with the datatype as specified by you (BITPIX). Slay. π
π MESSAGES π
Here's the whole roster of things she might say to you. Every single one, no skips:
OK [struct stat="OK"]ERROR No status file name givenERROR Cannot open status file: statusfileERROR No debug level givenERROR Debug level string is invalid: 'debug-level'ERROR Debug level value cannot be negativeERROR No bitpix value givenERROR Bitpix string is invalid: 'bitpix'ERROR Bitpix must be one of (8, 16, 32, -32, -64)ERROR No range min value givenERROR Range min string is invalid: 'min'ERROR No range max value givenERROR Range max string is invalid: 'max'ERROR No blank value givenERROR Blank string is invalid: 'blank'ERROR Invalid input file 'in.fits'ERROR Invalid output file 'out.fits'ERROR general error messageERROR FITS library error message
π EXAMPLES π
Converting a single-precision image down to a 16-bit integer BITPIX, when the data is clustered between values of -0.01 and 0.1:
$ mConvert -b 16 -min -0.01 -max 0.1 -blank -32767 acs.fits acs_bitpix16.fits
[struct stat="OK"]
look at her go π₯Ή
π BUGS π
okay so here's the messy part. buckle up.
- The drizzle algorithm has been implemented but has not been tested in this release. not me shipping untested code π iconic honestly.
- If a header template contains carriage returns (i.e., created/modified on a Windows machine), the
cfitsiolibrary will be unable to read it properly, resulting in the error:[struct stat="ERROR", status=207, msg="illegal character in keyword"]. windows strikes again, fr fr. π - It is best for the background correction algorithms if the area described in the header template completely encloses all of the input images in their entirety. If parts of input images are "chopped off" by the header template, the background correction will be affected. We recommend you use an expanded header for the reprojection and background modeling steps, returning to the originally desired header size for the final coaddition. The default background matching assumes that there are no non-linear background variations in the individual images (and therefore in the overlap differences). If there is any uncertainty in this regard, it's safer to turn on the "level only" background matching (the
-lflag inmBgModel).
bestie the chopping thing is real, don't let your images get chopped. π«Ά
β COPYRIGHT β
2001-2015 California Institute of Technology, Pasadena, California
If your research uses Montage, please include the following acknowledgement: "This research made use of Montage. It is funded by the National Science Foundation under Grant Number ACI-1440620, and was previously funded by the National Aeronautics and Space Administration's Earth Science Technology Office, Computation Technologies Project, under Cooperative Agreement Number NCC5-626 between NASA and the California Institute of Technology."
The Montage distribution includes an adaptation of the MOPEX algorithm developed at the Spitzer Science Center.
aaaand that's the whole page, bestie. this is Montage version 5, dated Dec 2016 β she's a little vintage, she's a classic, and she still ate. ππ bye luv u π«Άβ¨
π¦ where this page comes from
- debian bookworm: montage 6.0+dfsg-7+b8 Β· BSD-3-Clause
- debian trixie: montage 6.1+dfsg-1+b1 Β· BSD-3-Clause
- ubuntu jammy: montage 6.0+dfsg-7build5 Β· BSD-3-Clause
- ubuntu noble: montage 6.0+dfsg-9 Β· BSD-3-Clause
- ubuntu questing: montage 6.1+dfsg-2
- ubuntu resolute: montage 6.1+dfsg-2build2 Β· BSD-3-Clause
- ubuntu stonking: montage 6.1+dfsg-2build2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms