MPROJEXEC(1)

πŸ’– MPROJEXEC πŸ’– (that's the mProjExec girlies, section 1 of the Montage manual)

okay bestie, sit down, hydrate, because this one is literally the executive producer of your mosaic pipeline ✨


🌸 NAME 🌸

mProjExec β€” re-project and mosaic your images, with background rectification. it's giving "glow up your pixels" fr fr πŸ’…


✨ SYNOPSIS ✨

mProjExec [-q] [-p rawdir] [-d] [-e] [-X] [-b border] [-r restartrec]
[-s statusfile] [-x scaleColumn] images.tbl template.hdr projdir
stats.tbl

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically mProjExec is the executive πŸ‘‘ β€” it runs mProject for every single image in an image metadata table. and if the input/output projections are chill enough for it, it'll flex and use mProjectPP instead. and if you're working with data cubes? it brings out mProjectCube. no cap, it just knows which tool to call. main character energy honestly πŸŽ€


πŸ’… OPTIONS πŸ’…

  • -q β€” use mProjectQL for the reprojections instead. much faster but it's not quite flux-conserving, so like, pick your fighter ⚑
  • -p rawdir β€” tells it the path to the directory where the images-to-be-reprojected are living. if you don't pass -p, mProjExec just goes looking in the current working directory like it owns the place 🏠
  • -d β€” turns on debugging πŸ›
  • -e β€” flag saying the output image should match the FITS header template exactly, no cropping off of blank pixels, periodt
  • -X β€” force reprojection of the whole images, even if they spill way past the area of the FITS header template. she does not shrink for anyone πŸ’ͺ
  • -b border β€” ignore a border width of pixels around the edge of the images
  • -r restartrec β€” lets you restart at record number restartrec, for when mProjExec exits on you because of an error 😭 (we've all been there)
  • -s statusfile β€” output and errors get written to statusfile instead of being dumped to stdout
  • -x scaleColumn β€” turn on flux rescaling (think magnitude zero point correction ✨). scaleColumn is the name of a column in images.tbl that's holding your scale info

🌈 ARGUMENTS 🌈

  • images.tbl β€” ASCII table (made by mImgtbl, love her) containing metadata for all the images you wanna reproject
  • template.hdr β€” the FITS header template that'll be used when generating the output FITS
  • projdir β€” the directory where the reprojected images get created 🎁
  • stats.tbl β€” name of the table for output statistics (that's the time of each reprojection, or the error messages if things went sideways)

⭐ RESULT ⭐

[struct stat="OK", count=16, failed=0, nooverlap=0]

so for every input file name.fits in the table images.tbl, mProjExec creates a matching name.fits and name_area.fits in the directory projdir. iconic behaviour, honestly 🫢

  • nimages = the number of images successfully processed
  • nfailed = the number of images mProject was unable to process πŸ˜”
  • noutside = the number of images that did not overlap with the given template.hdr

and the file stats.tbl? that's an ASCII table containing the filename, status, and time for each file. receipts on receipts πŸ“‹


πŸ’€ MESSAGES πŸ’€

here's the whole mood board of things this thing can yell at you:

  • OK β€” [struct stat="OK", count=nimages, failed=nfailed, nooverlap=noutside]
  • ERROR β€” MPI initialization failed
  • ERROR β€” Path (outdir) is not a directory
  • ERROR β€” Restart index value string n cannot be interpreted as an integer
  • ERROR β€” Restart index value n must be greater than or equal to zero
  • ERROR β€” Cannot open status file: statusfile
  • ERROR β€” Can't open output file.
  • ERROR β€” Can't open tmp status file.
  • ERROR β€” Can't delete tmp status file.
  • ERROR β€” Need column fname in input
  • ERROR β€” Need column scaleCol in input
  • ERROR β€” Output would overwrite input
  • ERROR β€” Template file template.hdr not found
  • ERROR β€” Output wcsinit() failed
  • ERROR β€” mProject or mProjectPP error

πŸŽ€ EXAMPLES πŸŽ€

okay so this example runs mProjExec on a directory holding 16 images. the -f switch specifies that mProjExec will use mProjectPP to reproject the files, as opposed to mProject. the relevant files are images.tbl, generated by mImgtbl, and template.hdr. the files get created in the directory projdir. slay πŸ¦‹

$ mProjExec -p raw images.tbl template.hdr proj stats.tbl
       [struct stat="OK", count=16, failed=0, nooverlap=0]

see output file stats.tbl πŸ‘€


πŸ™ˆ BUGS πŸ™ˆ

ngl, this is the "read before you cry" section, bestie.
  • the drizzle algorithm has been implemented but has not been tested in this release. she's built different but nobody's checked her work yet πŸ’€
  • if a header template contains carriage returns (like, if it was created/modified on a Windows machine), the cfitsio library will be unable to read it properly, and you'll get this error: [struct stat="ERROR", status=207, msg="illegal character in keyword"]. the classic Windows betrayal 😭
  • 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, and return 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 -l flag in mBgModel).

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. 🌌


and that's the whole page, bestie 🫢 this was Montage 5, dated Dec 2016 β€” mwah, go reproject something pretty βœ¨πŸ’–