MDAG(1)

πŸ’– mDAG β€” bestie we're building a DAG πŸ’–

okay so this is mDAG, a page from the Montage manual set (section 1, she's a command, she's iconic). pull up a chair, grab a strawberry πŸ“, and let's get you fluent in Directed Acyclic Graphs, because you're about to be so good at this.


✨ NAME ✨

mDAG β€” Create a Directed Acyclic Graph (DAG) for Pegasus. no cap, that's literally the whole job. πŸ‘‘


✨ SYNOPSIS ✨

mDAG survey band objstr width height cdelt workdir workurlbase [urlbase]

mDAG -h survey band hdrfile workdir workurlbase [urlbase]

two whole modes, bestie. one of them you tell her the object, the other one you hand her a header file and she just gets it. πŸ¦‹


✨ DESCRIPTION ✨

so what mDAG actually does: she creates an XML-based Directed Acyclic Graph (DAG). that DAG spells out three things:

  • "jobs" β€” the Montage modules that gotta run to produce a mosaic
  • "files" β€” the stuff being consumed or generated during processing (input files, intermediate files, output files, the whole girlboss pipeline)
  • "dependencies" β€” the relationships between jobs and files that imply the order in which the jobs should run

in this "abstract graph", logical names get assigned to jobs and files. the abstract graph is meant to be an input to a job scheduler β€” think Pegasus in the Chimera Virtual Data System. she's feeding the scheduler, she's the plug, it's giving infrastructure πŸ’…


✨ OPTIONS ✨

  • -h β€” the output mosaic gets based on a header file instead of an explicit object name (for location), plus sizes and scale. it's giving "I already have the header, don't make me spell out the object". πŸŽ€

✨ ARGUMENTS ✨

  • survey β€” mDAG has custom code for dealing with surveys (like DSS) where we already know we have to use the slower mProject module instead of mProjectPP. she knows. she's prepared. 😌
  • band β€” mDAG also has custom code for the 2MASS survey, where Montage scales the data to a project-specified magnitude zero point by band (J, H, K). yes, exactly those three. πŸŽ€
  • objstr β€” the object name, resolved through NED/SIMBAD for sky location. she'll go look it up for you, that's her whole thing. πŸ”
  • width/height β€” the size of the image, in degrees.
  • cdelt β€” the pixel scale, in degrees.
  • hdrfile β€” instead of objstr, width, height, and cdelt, the user can provide a pre-built FITS header. (yes, the original says "the user an provide" β€” typos happen, bestie, we move.) 🫢
  • workdir β€” there's a whole collection of files the processing is gonna need, and mDAG creates them. the user needs to make a location for this and hand it over to mDAG. set it up yourself first, she's not your assistant for that part. πŸ™ˆ
  • workurlbase β€” while she's working, some files in the workspace get accessed via URL. again, this needs to be set up by the user beforehand. you gotta do your part, bestie.
  • urlbase β€” optionally, results can be made URL-accessible if this parameter is given. optional but cute ✨

✨ RESULT ✨

if everything goes right (and she is that girl), the workspace gets populated with several tables and with the dag.xml file β€” the one you hand over to the workflow manager. that's the moment. that's the slay. πŸ”₯


✨ MESSAGES ✨

the error girls, in all their glory. if you see one of these, something went sideways:

  • ERROR Error opening debug file
  • ERROR Error opening header template file
  • ERROR Error opening big header template file
  • ERROR Error opening image list
  • ERROR Error opening working file list for write
  • ERROR Error opening working file list for read
  • ERROR Error opening parent list
  • ERROR Error opening sorted parent list
  • ERROR Bad template: file
  • ERROR Output wcsinit() failed.
  • ERROR general error message
  • ERROR No return message from object lookup.
  • ERROR Invalid location specification or object name.
  • ERROR Can't find RA in lookup return.
  • ERROR Can't find Dec in lookup return.
  • ERROR Couldn't find host hostname
  • ERROR Couldn't create socket()
  • ERROR, msg= β€” hostname: connect failed.

✨ EXAMPLES ✨

here's her living her best life, 2MASS style:

mDAG 2mass j m51 0.5 0.5 0.00277778 m51work http://montage-
web.ipac.caltech.edu/workspace/m51

and she answers with:

[struct stat="OK", id="20150904_095958_21631"]

see? OK. successful. slay. πŸ’…


✨ BUGS ✨

okay bestie, listen up, this is the part where we're honest about her flaws:

  • The drizzle algorithm has been implemented but has not been tested in this release. implemented but untested, it's giving "trust me bro". 😭
  • 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"]. windows line endings strike 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 is safer to turn on the "level only" background matching (the -l flag in mBgModel).
so basically: give her room to breathe, don't crop your inputs, and if you're unsure about non-linear backgrounds, hit that -l flag in mBgModel. periodt. πŸ‘‘

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, from way back in Dec 2016, and she's still out here building DAGs. go make a mosaic. you got this. πŸ«ΆπŸŽ€πŸ¦‹