MEXEC(1)

✨ MEXEC β€” bestie edition ✨

okay so you want to make a big pretty picture of the sky?? πŸ¦‹ that's literally what mExec does and i am so excited to tell you about it.


🌸 NAME 🌸

mExec β€” makes a 2MASS, SDSS or DSS mosaic based on a size and a location πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

mExec [-q] [-r rawdir] [-n ntilex] [-m ntiley] [-l] [-k] [-c] [-o
output.fits] [-d level] [-f region.hdr | -h header] survey band
[workspace-dir]

like. that's the whole vibe. flags go in, mosaic comes out. no cap. πŸ’…


πŸ’« DESCRIPTION πŸ’«

So mExec is a mosaicking executive for 2MASS, SDSS, and DSS data. she's the boss of the whole operation, the main character fr. πŸ‘‘

She handles remote data and metadata access for you (yes bestie, she'll go fetch it herself), or alternatively β€” if you already have a pile of data sitting on your disk β€” you can just mosaic that. Either way works. iykyk. ✨


🧚 OPTIONS 🧚

  • -q β€” use mProjectQL for reprojections instead. it's much faster but not quite flux-conserving, so like… tradeoffs, babe. ⚑
  • -r rawdir β€” give her the path to the directory holding the original ("raw") data that's gonna get reprojected and mosaicked. you do NOT need this if you're letting mExec pull remote data from the 2MASS, SDSS or DSS surveys. πŸ™ˆ
  • -n ntilex β€” how many output tiles to make along the X-axis. default is 1, aka one single mosaicked image, the classic. πŸŽ€
  • -m ntiley β€” how many output tiles along the Y-axis. default is equal to ntilex. so if you don't say anything she just matches them. πŸ’–
  • -l β€” the "Level-only" flag (peep mBgModel for the deets). ⭐
  • -k β€” if you're pulling data from a remote archive, the "keep" flag leaves the original data products on disk after the mosaic gets generated. without it, raw data gets deleted β€” unless you provided it yourself with the -r flag. πŸ’€
  • -c β€” removes all temporary files and intermediate data products. ⚠️ note: if you did NOT use the -o flag to specify an output file, this will also remove mosaic.fits. bye bye. 😭
  • -o output.fits β€” name your own output mosaic file. default filename is mosaic.fits. πŸ¦‹
  • -d level β€” print extra debugging info (levels 1-4). detective mode. πŸ”

🌈 ARGUMENTS 🌈

mExec must be given FITS header information. periodt. she needs it. this can either be a header template (that's the -f flag) or you can pass header text directly to the program (that's the -h flag). pick your fighter. πŸ’…

  • -f region.hdr β€” path to the header template used to create the mosaic. πŸ“
  • -h header β€” provide the header template as text input instead of pointing at a file. see the sample shell script that makes use of this option. πŸ“
  • survey band β€” if you're not mosaicking user-provided data (i.e. no -r flag), you have to pick one of these survey + band combos:
    • 2MASS [j, h, k]
    • SDSS [u, g, r, i, z]
    • DSS [DSS1, DSS1R, DSS1B, DSS2, DSS2B, DSS2R, DSS2IR]
  • workspace-dir β€” directory where the intermediate files get created. if you don't give a workspace, a unique local subdirectory gets made for you (like ./MOSAIC_AAAaa17v). she's got you. 🫢

πŸ“ RESULT πŸ“

[struct stat="OK", workspace="workspace-dir"]

The output mosaic(s), and any intermediate files (if the -c flag was not used), will be inside workspace-dir. that's it, that's the payoff. ✨


πŸ’œ MESSAGES πŸ’œ

  • OK β€” [struct stat="OK", workspace="workdir"] πŸŽ‰
  • ERROR β€” Must have either header file (-f) or header text (-h)
  • ERROR β€” Can't open original header template file: [region.hdr]
  • ERROR β€” Can't open workspace header template file: [region.hdr]
  • ERROR β€” Can't create proper subdirectories in workspace (may already exist)
  • ERROR β€” Can't open header template file
  • ERROR β€” Can't open expanded header file: [big_region.hdr]
  • ERROR β€” survey has no data covering expanded area
  • ERROR β€” survey has no data covering this area
  • ERROR β€” No data was available for the region specified at this time
  • ERROR β€” Bad WCS in input image
  • ERROR β€” Can't open mosaic file: [mosaic.fits]
  • ERROR β€” Can't open save file: [image.fits]
  • ERROR β€” Output wcsinit() failed
  • ERROR β€” Error from another Montage module

πŸ”₯ EXAMPLES πŸ”₯

making a lil mosaic of the area around m31

coordinates: "10.68469 41.26904" β€” she's giving andromeda ✨

$ mHdr m31 0.3 m31.hdr
       [struct stat="OK", count="16"]

$ mExec -o m31.fits -f m31.hdr 2MASS J tempdir
       [struct stat="OK", workspace="/path/to/tempdir"]

mosaicking your OWN data collection

it lives in the directory raw πŸŽ€

$ mImgtbl raw raw.tbl
       [struct stat="OK", count=16, badfits=0]

$ mMakeHdr raw.tbl raw.hdr

       [struct stat="OK", count=16, clon=0.118289, clat=0.118288,
       lonsize=0.236660, latsize=0.236660, posang=359.999756,
       lon1=0.236618, lat1=-0.000042, lon2=359.999959, lat2=-0.000041,
       lon3=359.999959, lat3=0.236618, lon4=0.236620, lat4=0.236617]

$ mExec -o my_mosaic.fits raw.hdr workdir
       [struct stat="OK", workspace="/path/to/workdir"]

😭 BUGS 😭 (yes really, read these)

The drizzle algorithm has been implemented but has not been tested in this release. so like… it's there. she's untested. be careful bestie. πŸ™ˆ

If a header template contains carriage returns (i.e., it was created or modified on a Windows machine πŸͺŸ), the cfitsio library will be unable to read it properly, which gives you this error: [struct stat="ERROR", status=207, msg="illegal character in keyword"]. windows line endings stay ruining lives 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 the 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, 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 about this, it's safer to turn on the "level only" background matching (the -l flag in mBgModel). this one actually matters, don't skip it. ⚠️


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


k bye bestie, go make a mosaic πŸ’– this was Montage 5, from Dec 2016, page MEXEC(1) β€” love u, slay, periodt ✨