MCOVERAGECHECK(1)
π« MCOVERAGECHECK π« β a Montage manual page, bestie edition
okay so this is mCoverageCheck(1) from Montage 5, and no cap, it's lowkey one of the most useful little tools in the whole suite. let's get into it π«Ά
β¨ NAME β¨
mCoverageCheck β filter an image metadata table down to only the records that represent FITS files overlapping a footprint on the sky π¦
like... it looks at your table, it looks at your sky region, and it goes "these ones. only these ones. periodt."
πΈ SYNOPSIS πΈ
mCoverageCheck [-s statusfile] in.tbl out.tbl -mode <parameters>
that's the whole vibe. one command, one table in, one table out, one region mode. π
π DESCRIPTION π
so here's the tea, bestie: mCoverageCheck subsets an image metadata table (the kind stuffed with FITS/WCS info, or with image corners) by figuring out which records in that table represent images that overlap a region definition β and that region can be a box or a circle in the sky β which you hand it right there on the command line. π
it's giving "who's actually in this neighborhood" energy and honestly? iconic.
β¨ OPTIONS β¨
-sstatusfile β output and errors get sent to statusfile instead of to stdout. so if you don't want the chatter in your terminal, you send it elsewhere. very demure, very mindful. π-modeβ can be one of:pointsβ used to describe a convex polygon π¦boxβ a box on the sky πcircleβ a circle on the sky βheaderβ the area is described in a header file πpointβ find images that overlap one particular point on the sky πcutoutβ operates likeboxmode, but returns metadata that represents what the input images would look like after being subset to exactly match the cutout area βοΈ
- in.tbl β the input metadata table. your raw material. your source of truth. π
- out.tbl β the output metadata table, which will contain the subset of in.tbl. the chosen ones. the main characters. π
- parameters β depends on mode, as follows:
points:ra1 dec1 ra2 dec2 ... raN decN(must be at least 3 vertices) πΊbox:ra dec xsize [ysize [rotation]]
where ra, dec is the center of the box, and size is in degrees. π
circle:ra dec radius
where ra, dec is the center of the circle, and radius is in degrees (default is 0, in which case it's treated like a point search). π©
point:ra decπ―header:region.hdr(path to an ASCII header template that defines the region of interest) πcutout:ra dec xsize [ysize]
where ra, dec is the center of the cutout area, and size is in degrees. βοΈ
π RESULT π
the output file out.tbl gets created, with nimages records. that's it, that's the payoff, and it ate. π
π MESSAGES π
here's every message this thing can throw at you, fr fr. some are happy, some are... not. π
OK [struct stat="OK", count=n]β¨ERROR Cannot open status file: statusfileERROR Invalid region definition mode: stringERROR Too few vertices for region (must be at least three)ERROR Longitude n (string) cannot be interpreted as a real numberERROR Latitude n (string) cannot be interpreted as a real numberERROR Failed to find bounding polygon for pointsERROR Too few arguments for box or cutout (must at least have center and size)ERROR Center RA string (string) cannot be interpreted as a real numberERROR Center Dec string (string) cannot be interpreted as a real numberERROR X box size string (string) cannot be interpreted as a real numberERROR X box size (string) must be a positive numberERROR Y box size string (string) cannot be interpreted as a real numberERROR Y box size (string) must be a positive numberERROR Box rotation string (string) cannot be interpreted as a real numberERROR Must give header file nameERROR Failed to find bounding polygon for pointsERROR Too few arguments for circle (must at least have center)ERROR Circle radius string (string) cannot be interpreted as a real numberERROR Too few arguments for point (must have coordinates)ERROR Point RA string (string) cannot be interpreted as a real numberERROR Point Dec string (string) cannot be interpreted as a real numberERROR Error opening table filenameERROR Cannot create output file filenameERROR Need either WCS or corner columns.ERROR Failed to create wcs structure for record n
yes, Failed to find bounding polygon for points really is listed twice in the original. i'm not deleting it, i'm not merging it, i'm just telling you it's there twice. that's canon. π
π₯ EXAMPLES π₯
okay bestie, storytime. as input, we use this table of 2MASS atlas images. the images in this table are in two "clumps" on the sky: 3 overlapping images separated by several degrees from the other 12 overlapping images. and here we're gonna show you several ways of isolating the group of 3 images. π§
$ mCoverageCheck images.tbl circle.tbl -circle 262.78208 -35.03049 1.0
[struct stat="OK", count="3"]
$ mCoverageCheck images.tbl box.tbl -box 262.84948 -34.81197 1.0
[struct stat="OK", count="3"]
$ mCoverageCheck images.tbl points.tbl -points 263.3796 -34.48881
262.15127 -34.51032 262.90267 -35.38753
[struct stat="OK", count="3"]
$ mCoverageCheck images.tbl point.tbl -point 262.78208 -35.03049
[struct stat="OK", count="3"]
each of these methods results in this output table containing only 3 records out of the original 15. slay. π
π¦ BUGS π¦
gonna keep it real with you, these are the rough edges:
- the drizzle algorithm has been implemented but has not been tested in this release. (yes really. it's just... sitting there.) π
- 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
-lflag inmBgModel). β οΈ
that last one is a real "read it twice" situation, bestie. expanded header for reprojection + background modeling, then back to the size you actually wanted for the final coaddition. the-lflag inmBgModelis your safe-space option if you're unsure. π«Ά
π 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.
and that's the whole page, bestie π this was Montage 5, dated Dec 2016 β so if you're reading this in the future, hi, hope the clumps are still clumping. go subset some tables. you got this. π β¨
π¦ 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