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. π-hhdu β Operate on the specified FITS header extension (HDU). pick which extension you're living in today.-sstatusfile β Output and errors are sent to statusfile instead of tostdout. 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 toxsize). yes she'll just copyxsizeif 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 toxpixsize). 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 integerERRORβCannot open status file: statusfileERRORβCenter RA string (string) cannot be interpreted as a real numberERRORβCenter Dec string (string) cannot be interpreted as a real numberERRORβX size string (string) cannot be interpreted as a real numberERRORβY size string (string) cannot be interpreted as a real numberERRORβInvalid 'x' sizeERRORβInvalid 'y' sizeERRORβImage file filename missing or invalid FITSERRORβCannot find HDU hduERRORβOutput wcsinit() failed.ERRORβLocation is off imageERRORβRegion outside imageERRORβNo pixels match area.ERRORβCan't create output file: out.fitsERRORβ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-lflag inmBgModel.
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 π
π 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 one's from Montage 5, dated Dec 2016 β so like, a vintage queen, but she still serves. mwah πβ¨
π¦ 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