MBESTIMAGE(1)

πŸ’– MBESTIMAGE β€” bestie, it's literally mBestImage from the Montage manual (section 1) πŸ’–

okay so picture this: you've got a whole pile of sky images and you're like "which one of y'all actually covers this exact spot the best?" β€” that's it. that's the whole gig. she picks the winner. πŸ‘‘


✨ NAME ✨

mBestImage β€” determine which image covers a location "best"

like... not just any image that touches the point. the one where your point is farthest from the nearest edge. main character image, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

mBestImage [-d level] images.tbl ra dec

three little things and a flag. that's the whole vibe.


🌸 DESCRIPTION 🌸

so you hand her a list of images plus a position on the sky, and she figures out which image covers that location "best" β€” and by best we mean the one where the position is farthest from the nearest edge. not the closest edge, the farthest-from. she wants you comfy in the middle of the frame, not hanging off the side. it's giving "best seat in the house." 🫢


πŸŽ€ OPTIONS πŸŽ€

  • -d debug β€” turn on debugging to the specified level (1 or 2). that's it, those are the only two levels, don't get cute with it.

πŸ’… ARGUMENTS πŸ’…

  • images.tbl β€” input table of image metadata (as generated by mImgtbl). like, this is the receipts. she needs them.
  • ra β€” RA of location of interest (in degrees)
  • dec β€” Declination of location of interest (in degrees)
bestie. degrees. not radians, not hours, not vibes. degrees. πŸ“

⭐ RESULT ⭐

she hands you back one of these two, depending on whether your table had a URL column:

[struct stat="OK", file="filename", edgedist=distance]

or

[struct stat="OK", file="filename", url="fileurl", edgedist=distance]

where filename is the name of the "best" image found in images.tbl, and distance is measured from the point of interest to the nearest edge of the image. and if the input table included a URL column, the output message will also include the image's URL. extra credit, we love to see it. 🌈


πŸ”₯ MESSAGES πŸ”₯

  • OK β€” [struct stat="OK", file="filename", url="fileurl", edgedist=distance"]
  • OK β€” [struct stat="OK", file="filename", edgedist=distance]
  • ERROR β€” Invalid image metadata file: images.tbl
  • ERROR β€” Need columns: cntr and fname; ctype1 ctype2 nl ns crval1 crval2 crpix1 crpix2 cdelt1 cdelt2 and crota2 or cd matrix / ra dec ra1 ... dec4
  • ERROR β€” Bad WCS for image fitsfile
  • ERROR β€” No image covers this position.
that last one is the saddest one. nobody covered your spot. πŸ’€ you're gonna have to go find more images, bestie.

🌟 EXAMPLES 🌟

given a table of image metadata describing images covering a 0.5 by 0.5 degree area around m31 (2mass_m31_j.tbl), narrow it down to the image which includes the best coverage of one particular location:

mBestImage 2mass_m31_j.tbl 10.7 41.2
       [struct stat="OK", file="2mass-atlas-971024n-j0080033.fits",
       edgedist=0.008436]

look at her go. found her girl, 0.008436 degrees from the edge. ate. πŸ’…βœ¨


😭 BUGS 😭

okay so the messy parts, we gotta talk about them:

  • The drizzle algorithm has been implemented but has not been tested in this release. 🫣 (do not perceive it)
  • 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 -l flag in mBgModel).
fr fr, don't let the template chop your images. give them room to breathe. 🧚

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 one came out of Montage 5, dated Dec 2016 β€” yeah she's an elder but she still slays. go find your best image. πŸ’œπŸ’–πŸ¦‹