MDIFFEXEC(1)

πŸ’… MDIFFEXEC β€” bestie edition πŸ’…

okay so this is mDiffExec from Montage (that's the manual name, hi, it's in section 1, the user commands section, iykyk) and it does exactly what it says: it re-projects and mosaics your images, WITH background rectification. that's the whole vibe. it's giving ✨glow-up for your FITS files✨


✨ NAME ✨

mDiffExec β€” Re-project and mosaic your images, with background rectification πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

mDiffExec [-p projdir] [-d] [-n(o-areas)] [-s statusfile] diffs.tbl
template.hdr diffdir

yes that's the whole thing, it's not that deep 🫢


🌸 DESCRIPTION 🌸

so like. this runs mDiff on all the pairs that mOverlaps already identified. that's it. that's the job. it's the little errand-runner of the Montage pipeline and honestly? it eats. πŸ”₯


πŸ’– OPTIONS πŸ’–

  • -p projdir β€” tells it where the directory is that's holding your reprojected input images. path goes here, bestie.
  • -d β€” turns on debugging. chaos mode: enabled πŸ›βœ¨
  • -n β€” the no-area-images flag (it's short for -n(o-areas) if you're being fancy). this makes it create the difference image WITHOUT needing the _area FITS images. lowkey a lifesaver.
  • -s statusfile β€” output and errors get sent to statusfile instead of to stdout. so if you want your terminal to stay cute and quiet, this is the move πŸ’…

🧚 ARGUMENTS 🧚

  • diffs.tbl β€” the table mOverlaps generated for the images sitting in projdir. it's the guest list, basically.
  • template.hdr β€” the FITS header template for your output files. the blueprint. the vision board. 🌈
  • diffdir β€” path to where the output files go. that's the drop zone πŸ“¦

⭐ RESULT ⭐

you get FITS images representing the differences for each pair of overlapping images. nimages is the total number of images successfully processed, and nfailed is the number of images that failed. 😭

the most likely cause of failure? the FITS images DID overlap, but only in areas where they contained blank pixels β€” and this is especially common in images with a large degree of rotation. so like. rotate responsibly.


πŸ’€ MESSAGES πŸ’€

here's what it yells at you, verbatim, no edits:

  • OK [struct stat="OK", count=nimages, failed=nfailed] β€” slay, it worked πŸ’–
  • ERROR MPI initialization failed
  • ERROR Cannot open status file: statusfile
  • ERROR Cannot access diffdir
  • ERROR diffdir is not a directory
  • ERROR Invalid image metadata file: filename
  • ERROR Need columns: cntr1 cntr2 plus minus diff
  • ERROR mDiff error

πŸ”₯ EXAMPLES πŸ”₯

step one: diffs.tbl gets generated using mOverlaps. step two: mDiff can be run on the reprojected images, using this template.hdr. iconic pipeline behaviour, no cap.

$ mDiffExec -n -p projdir projdir/diffs.tbl template.hdr diffdir
       [struct stat="OK", count=42, failed=0]

42 succeeded, 0 failed. we love to see it πŸŽ€


πŸ™ˆ BUGS πŸ™ˆ

okay listen, the tea:

  • the drizzle algorithm has been implemented but has not been tested in this release. so like. it's there. it's just... unverified. proceed accordingly 😬
  • if a header template contains carriage returns (i.e., 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 CRLF jumpscare fr fr πŸ’€
  • for the background correction algorithms, it is best 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. so the recommendation is: use an expanded header for the reprojection and background modeling steps, then return to the originally desired header size for the final coaddition. the default background matching assumes there are no non-linear background variations in the individual images (and therefore in the overlap differences). if there's any uncertainty in this regard, it is safer to turn on the "level only" background matching β€” that's the -l flag in mBgModel. write that down πŸ“

2001-2015 California Institute of Technology, Pasadena, California

if your research uses Montage, please include the following acknowledgement (and like, actually include it, it's the rules):

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

also: the Montage distribution includes an adaptation of the MOPEX algorithm developed at the Spitzer Science Center. respect the ancestors 🫢


and that's the whole page bestie πŸ’œ this one's from Montage 5, dated Dec 2016 β€” go process some images, you've got this. main character energy only. periodt. βœ¨πŸŒ™