.TH MSUBCUBE 1 "Dec 2016" "Montage 5" "Montage" .SH NAME mSubCube \- Create a subimage of a cube .SH SYNOPSIS mSubCube [\-d] [\-D3 \fIindex-selection-string\fP] [\-D4 \fIindex-selection-string\fP] [\-a] [\-h \fIhdu\fP] [\-s \fIstatusfile\fP] in.fits out.fits ra dec xsize [ysize] .PP mSubCube \-p [\-d] [\-D3 \fIindex-selection-string\fP] [\-D4 \fIindex-selection-string\fP] [\-h \fIhdu\fP] [\-s \fIstatusfile\fP] in.fits out.fits xstartpix ystartpix xpixsize [ypixsize] .SH DESCRIPTION Creates a subimage (or "cutout") of a FITS file. Note that in "normal" mode, all the parameters (location and size) are in degrees; in pixel (\-p) mode, all of them are in pixels. .SH OPTIONS .TP \-d Turns on debugging. .TP \-D3 This argument is a string (quoted if it contain spaces) defining the subset of indices desired. The string has the form of an ordered set of comma-separated values, which 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. Note that these numbers refer to indices in a FITS cube, so are one-offset, not zero. Attempts to go outside the available data result in an error. .TP \-D4 The same sort of thing as \-D3, but for the fourth dimension. .TP \-a All pixels \- Force retrieval of whole image (useful to extract an entire HDU) .TP \-h \fIhdu\fP Operate on the specified FITS header extension (HDU) .TP \-s \fIstatusfile\fP Output and errors are sent to \fIstatusfile\fP instead of to stdout .TP \-p Pixel mode \- create subimage using pixel locations, instead of a location on the sky .SH ARGUMENTS .TP in.fits Input FITS file. .TP out.fits Path to output FITS file. .TP ra In normal mode, RA of center of output image. .TP dec In normal mode, declination of center of output image. .TP xstartpix In pixel mode, pixel along the x-axis where the cutout image will begin .TP ystartpix In pixel mode, pixel along the y-axis where the cutout image will begin .TP xsize In normal mode, width of output image in degrees. .TP ysize In normal mode, height of output image in degrees (default is equal to \fIxsize\fP. .TP xpixsize In pixel mode, width of output image in pixels .TP ypixsize In pixel mode, height of output image in pixels (default is equal to \fIxpixsize\fP .SH RESULT \fB[struct stat="OK", content="\fIblank, flat or normal\fP"]\fP .PP The content keyword indicates whether all pixels where NaN (blank), all pixels were the same value (flat), or the image appears to be normal. .SH MESSAGES .TP OK [struct stat="OK", content="\fIblank, flat or normal\fP"] .TP ERROR HDU value (\fIhdu\fP) must be a non-negative integer .TP ERROR Cannot open status file: \fIstatusfile\fP .TP ERROR Center RA string (\fIstring\fP) cannot be interpreted as a real number .TP ERROR Center Dec string (\fIstring\fP) cannot be interpreted as a real number .TP ERROR X size string (\fIstring\fP) cannot be interpreted as a real number .TP ERROR Y size string (\fIstring\fP) cannot be interpreted as a real number .TP ERROR Invalid 'x' size .TP ERROR Invalid 'y' size .TP ERROR Image file \fIfilename\fP missing or invalid FITS .TP ERROR Cannot find HDU \fIhdu\fP .TP ERROR Output wcsinit() failed. .TP ERROR Location is off image .TP ERROR Region outside image .TP ERROR No pixels match area. .TP ERROR Can't create output file: \fIout.fits\fP .TP ERROR \fIFITS library error\fP .SH EXAMPLES .TP $ mSubCube image1.fits subimage.fits 307.9 37.29 .01 .01 [struct stat="OK", content="normal"] .SH BUGS The drizzle algorithm has been implemented but has not been tested in this release. .PP 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"] .PP 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. .SH COPYRIGHT 2001-2015 California Institute of Technology, Pasadena, California .PP 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." .PP The Montage distribution includes an adaptation of the MOPEX algorithm developed at the Spitzer Science Center.