MSUBCUBE(1)
π MSUBCUBE π
okay so this is the manual page for mSubCube, part of Montage (section 1 of the manual, bestie, iykyk) β¨
π NAME π
mSubCube β literally just creates a subimage of a cube, no cap π
β¨ SYNOPSIS β¨
mSubCube [-d] [-D3 index-selection-string] [-D4 index-selection-string]
[-a] [-h hdu] [-s statusfile] in.fits out.fits ra dec xsize [ysize]
mSubCube -p [-d] [-D3 index-selection-string] [-D4 index-selection-string]
[-h hdu] [-s statusfile] in.fits out.fits xstartpix ystartpix
xpixsize [ypixsize]
πΈ DESCRIPTION πΈ
It makes a subimage (aka a "cutout", so cute) out of a FITS file π¦
The way it works: in "normal" mode, every single parameter β both the location and the size β is in degrees. But in pixel (-p) mode, all of them are in pixels. That's the whole vibe shift, bestie, don't mix them up π
π OPTIONS π
-dβ turns on debugging π (chaos mode: enabled)-D3β this argument is a string (quote it if it's got spaces in it, ok?) that defines which subset of indices you want. The string is an ordered set of comma-separated values, and each value is either an index or a range of indices. For instance,"2, 4:46, 58, 101:120"would copy dimension three planes 2, 4 through 46, 58, and 101 through 120 to the output cube. Heads up though: these numbers are indices in a FITS cube, so they're one-offset, not zero. And if you try to go outside the available data, you get an error, periodt. π«-D4β same sort of thing as-D3, but for the fourth dimension π-aβ All pixels β forces retrieval of the whole image (super useful if you wanna extract an entire HDU) π-h hduβ operate on the specified FITS header extension (HDU) ποΈ-s statusfileβ output and errors get sent to statusfile instead of tostdoutπ-pβ Pixel mode β creates the subimage using pixel locations instead of a location on the sky πβ‘οΈπ’
π§ ARGUMENTS π§
in.fitsβ input FITS file π«Άout.fitsβ path to the output FITS file πΎraβ in normal mode, the RA of the center of the output image πdecβ in normal mode, the declination of the center of the output image πxstartpixβ in pixel mode, the pixel along the x-axis where the cutout image will begin β‘οΈystartpixβ in pixel mode, the pixel along the y-axis where the cutout image will begin β¬οΈxsizeβ in normal mode, the width of the output image in degrees πysizeβ in normal mode, the height of the output image in degrees (default is equal toxsize) πxpixsizeβ in pixel mode, the width of the output image in pixels π²ypixsizeβ in pixel mode, the height of the output image in pixels (default is equal toxpixsize) π²
β RESULT β
[struct stat="OK", content="blank, flat or normal"]
The content keyword tells you whether all pixels were NaN (blank), all pixels were the same value (flat), or the image appears to be normal. Vibe check passed or not, basically π
π 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 π
$ mSubCube image1.fits subimage.fits 307.9 37.29 .01 .01
[struct stat="OK", content="normal"]
slay π it worked
π BUGS π
ok so here's the tea, and it's not all pretty:
- The drizzle algorithm has been implemented but has not been tested in this release π (we love an untested feature, no we don't)
- If a header template contains carriage returns (i.e., it was created/modified on a Windows machine), the
cfitsiolibrary 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's safer to turn on the "level only" background matching (the
"-l"flag inmBgModel). π«Ά
fr fr, read the BUGS section before you run this on your precious data. it's giving "trust issues" π₯
π 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 lil manual is Montage 5, dated Dec 2016, and it's the MSUBCUBE(1) page β go make some iconic cutouts ππ¦πΈ
π¦ 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