MPROJECTPP(1)
π MPROJECTPP π
okay bestie, welcome to the Montage manual, section 1 β yes this is MPROJECTPP(1), the reprojection girlie of the family. buckle up π
β¨ NAME β¨
mProjectPP β re-project FITS images. that's it, that's the job. slay.
β¨ SYNOPSIS β¨
mProjectPP [-z factor] [-d level] [-b border] [-s statusfile] [-o
altout.hdr] [-i altin.hdr] [-h hdu] [-x scale] [-w weightfile] [-W
fixed-weight] [-t threshold] [-X] [-b border-string] in.fits out.fits
template.hdr
like... look at all those flags. she's flexible π
β¨ DESCRIPTION β¨
so mProjectPP takes ONE image and reprojects it onto the scale that's defined in an alternate FITS header template β and that template is usually made by mTANhdr. she gives you a pair of images back: the reprojected image, and an "area" image. that area image is literally the fraction of input pixel sky area that landed in each output pixel π«Ά. and here's the cute part: that area image goes through all the same subsequent processing as the reprojected image does, so it can be properly coadded at the end. no cap.
mProjectPP does a plane-to-plane transform on the input image. it's an adaptation of the Mopex algorithm, developed in collaboration with the Spitzer Space Telescope, and it is approximately 30Γ faster than the general-purpose mProject. obsessed. BUT β and this is a big but β mProjectPP is only suitable for projections that can be approximated by tangent-plane projections (TAN, SIN, ZEA, STG, ARC), which means it is NOT suited for images covering large portions of the sky. also note she does not directly support changes in coordinate system (like equatorial β galactic), though you can facilitate those changes by using an alternate header. iykyk π
π¨ one situation that has happened often enough to warrant special note π¨
it is possible to define a FITS header with the reference location off the image. in particular, people often reference cylindrical projections (e.g., CAR, CEA) to location (0.,0.) (e.g., the Galactic center). this is not wrong in itself, but it does lead to extremely large pixel offsets (like, in the hundreds of thousands π). related to this: if you extract a header from an image with large offsets of this type, it is unlikely that you can simply change projection types without also adjusting the reference location/offsets. most likely you will end up with the reproject data all being off-scale. periodt. π
β¨ OPTIONS β¨
-zfactor β processing is done utilizing the drizzle algorithm. factor is a floating point number; recommended drizzle factors are from0.5to1. π§οΈ-dlevel β causes additional debugging information to be printed tostdout. valid levels are1-5; for levels greater than1, it's recommended to redirect the output into a text file. (fr fr, redirect it.)-bborder β ignores border pixels around the image edge when performing calculations. πΌοΈ-sstatusfile β output and errors are written to statusfile instead of being written tostdout.-[i|o]alternate.hdr β specifies an alternate FITS header for use inmProjectPPcalculations; allows substitution of psuedo-TAN headers created bymTANhdr. (yes, "psuedo". we keep the typo, it's iconic β¨)-hhdu β specify the FITS extension to re-project if the FITS image is multi-extension.-xscale β multiple the pixel values by scale when reprojecting. for instance, each 2MASS image has a different scale factor (very near1.0) to correct for varying magnitude-zero points.-wweightfile β path to a weight map to be used when reading values from the input image.-Wfixed-weight β use constant weight value for the whole image.-tthreshold β pixels with weights below threshold will be treated as blank.-Xβ makes the output region (originally defined in the header template) big enough to include all of the input images. main character energy, honestly π-bborder-string β define a border width or border pixel corners outside of which all pixels are set toNaN. (yes there are two-bs. we don't make the rules, we just report them π )
β¨ ARGUMENTS β¨
- in.fits β input FITS file to be reprojected.
- out.fits β path to output FITS file to be created.
- template.hdr β FITS header template to be used in generation of output FITS
β¨ RESULT β¨
two files are created as output, bestie: the reprojected FITS file (out.fits), and an "area" image (out_area.fits). see the image reprojection algorithm for more information. π¦
β¨ MESSAGES β¨
here's everything she might yell at you. read them, love them.
OK [struct stat="OK", time=seconds]ERROR Drizzle factor string (string) cannot be interpreted as a real numberERROR Cannot open status file: statusfileERROR Weight threshold string (threshold) cannot be interpreted as a real numberERROR Flux scale string (scale) cannot be interpreted as a real numberERROR Border value string (string) cannot be interprted as an integer or a set of polygon verticesERROR Border value (value) must be greater than or equal to zeroERROR HDU value (hdu) must be a non-negative integerERROR Could not set up plane-to-plane transform. Check for compliant headers.ERROR No overlapERROR Not enough memory for output data image arrayERROR Not enough memory for output area image arrayERROR Output wcsinit() failed.ERROR Input wcsinit() failed.ERROR Input and output must be in the same coordinate system for fast reprojectionERROR All pixels are blankERROR Input image projection (projection) must be TAN, SIN, ZEA, STG or ARC for fast reprojectionERROR Output image projection (projection) must be TAN, SIN, ZEA, STG or ARC for fast reprojectionERROR Template file [template.hdr] not foundERROR Image file in.fits is missing or invalid FITSERROR Weight file weightfile is missing or invalid FITSERROR FITS library error
β¨ EXAMPLES β¨
look at her go π
$ mProjectPP rawdir/real_orig.fits projdir/base_unity.fits
templates/galactic_orig.txt
[struct stat="OK", time=14]
β¨ BUGS β¨
the drizzle algorithm has been implemented but has not been tested in this release. π
if a header template contains carriage returns (i.e., created/modified on a Windows machine), the cfitsio library will be unable to read it properly, resulting in the error: [struct stat="ERROR", status=207, msg="illegal character in keyword"]
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 is safer to turn on the "level only" background matching (the -l flag in mBgModel).
mProjectPP is only suitable for use on projections which can be approximated by tangent-plane projections (TAN, SIN, ZEA, STG, ARC), and is therefore not suited for images covering large portions of the sky. also note that it does not directly support changes in coordinate system (i.e. equatorial to galactic coordinates), though these changes can be facilitated by the use of an alternate header.
β¨ 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. π
okay that's the whole page bestie, no skips, no summaries, every single flag accounted for π this was Montage 5, dated Dec 2016, and honestly? iconic. go reproject something. mwah π«Άβ¨
π¦ 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