MSUBIMAGE(1)

πŸ’– MSUBIMAGE(1) β€” mSubimage πŸ’–

okay bestie, pull up a chair because we are about to talk about mSubimage, a lil icon from the Montage fam, section 1 of the manual, and honestly? she's the "cutout" queen. βœ‚οΈβœ¨


🌸 NAME 🌸

mSubimage β€” Create a "cutout" of a FITS image

like literally she just goes snip snip and hands you the part of the picture you actually wanted. no cap. πŸŽ€


✨ SYNOPSIS ✨

mSubimage [-d] [-a] [-h hdu] [-s statusfile] in.fits out.fits ra dec
xsize [ysize]

mSubimage -p [-d] [-h hdu] [-s statusfile] in.fits out.fits xstartpix
ystartpix xpixsize [ypixsize]

two whole moods, two whole ways to run her. pick your fighter πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Creates a subimage (or "cutout") of a FITS file. so yes, exactly what it says on the tin.

the vibe check: in "normal" mode, all the parameters (location and size) are in degrees. in pixel (-p) mode, all of them are in pixels.

do not mix them up bestie i am begging 😭 it's giving "everything in degrees" vs "everything in pixels" and there is no in-between.


πŸŽ€ OPTIONS πŸŽ€

  • -d β€” Turns on debugging. she gets chatty.
  • -a β€” All pixels β€” Force retrieval of whole image (useful to extract an entire HDU). the whole thing. the entire buffet. πŸ“
  • -h hdu β€” Operate on the specified FITS header extension (HDU). pick which extension you're living in today.
  • -s statusfile β€” Output and errors are sent to statusfile instead of to stdout. quiet girl era. 🀫
  • -p β€” Pixel mode β€” create subimage using pixel locations, instead of a location on the sky. pixels pixels pixels.

🧚 ARGUMENTS 🧚

  • in.fits β€” Input FITS file. the source material, the blueprint, the moment.
  • out.fits β€” Path to output FITS file. where your little cutout baby gets born.
  • ra β€” In normal mode, RA of center of output image. center of attention fr fr πŸ‘‘
  • dec β€” In normal mode, declination of center of output image.
  • xstartpix β€” In pixel mode, pixel along the x-axis where the cutout image will begin. where the x journey starts.
  • ystartpix β€” In pixel mode, pixel along the y-axis where the cutout image will begin. and the y journey too.
  • xsize β€” In normal mode, width of output image in degrees.
  • ysize β€” In normal mode, height of output image in degrees (default is equal to xsize). yes she'll just copy xsize if you ghost her, it's giving square energy πŸŸͺ
  • xpixsize β€” In pixel mode, width of output image in pixels.
  • ypixsize β€” In pixel mode, height of output image in pixels (default is equal to xpixsize). same deal, same square, but in pixels.

⭐ RESULT ⭐

[struct stat="OK", content="blank, flat or normal"]

The content keyword indicates whether all pixels where NaN (blank), all pixels were the same value (flat), or the image appears to be normal.

so she's like "okay so your image is... blank πŸ’€, or flat πŸ’€, or normal 🌈" and honestly that's a lot of emotional range.


πŸ’œ MESSAGES πŸ’œ

  • OK β€” [struct stat="OK", content="blank, flat or normal"]
  • ERROR β€” HDU value (hdu) must be a non-negative integer
  • ERROR β€” Cannot open status file: statusfile
  • ERROR β€” Center RA string (string) cannot be interpreted as a real number
  • ERROR β€” Center Dec string (string) cannot be interpreted as a real number
  • ERROR β€” X size string (string) cannot be interpreted as a real number
  • ERROR β€” Y size string (string) cannot be interpreted as a real number
  • ERROR β€” Invalid 'x' size
  • ERROR β€” Invalid 'y' size
  • ERROR β€” Image file filename missing or invalid FITS
  • ERROR β€” Cannot find HDU hdu
  • ERROR β€” Output wcsinit() failed.
  • ERROR β€” Location is off image
  • ERROR β€” Region outside image
  • ERROR β€” No pixels match area.
  • ERROR β€” Can't create output file: out.fits
  • ERROR β€” FITS library error

πŸ”₯ EXAMPLES πŸ”₯

$ mSubimage image1.fits subimage.fits 307.9 37.29 .01 .01
       [struct stat="OK", content="normal"]

look at her go. clean. iconic. ate and left no crumbs. πŸ‘‘


πŸ’€ BUGS πŸ’€

The drizzle algorithm has been implemented but has not been tested in this release.

ma'am?? it's in there but nobody has checked it?? okay so proceed with the caution of a girl walking into a haunted house in heels. πŸ‘ πŸ‘»

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 really said "let me ruin your whole afternoon" πŸ™ˆ

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.

translation: keep the whole image in the frame, don't crop early, and if you're unsure about non-linear background stuff, use the "level only" matching β€” that's the -l flag in mBgModel. iykyk πŸ’…


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's from Montage 5, dated Dec 2016 β€” so like, a vintage queen, but she still serves. mwah πŸ’‹βœ¨