mTranspose(1) Re-order axes of multi-dimensional data sets

SYNOPSIS

mTranspose [-d level] [-s statusfile] incube.fits outcube.fits [outaxis1 outaxis2 [outaxi3 [outaxis4]]]

DESCRIPTION

Montage (and a lot of other software) find it hard to work with WCS information that are not connected to the first two axes in a datacube. Rather than over-complicate all the cube-related software we have opted for having this utility for transposing the data. The default for the program is to examine the cube and rearrange the data so the first two axes represent sky longitude and latitude but the user can optionally specify the order of the rearrangement themselves (this also allows transforming reprojected cubes back into the original order for use by other programs).

OPTIONS

-d level
Turns on debugging to the specified level (1-3).
-s statusfile
mTranspose output and errors will be written to statusfile instead of stdout.

ARGUMENTS

incube.fits
Input FITS cube (3 or 4 dimensions).
outcube.fits
Output FITS cube.
outaxis1 ... outaxis4
The input axis numbers (1,2,3,4) in output order.

RESULT

mTranspose rearranges the data value so the axes are in a different order. As much as possible, the FITS header keywords are renamed accordingly but as it is not alway possible to identify which parameters have axis "subscripts" it may be necessary to manually modify the headera(e.g., using mGetHdr / mPutHdr) after the fact.
$ mTranspose in.fits out.fits 3 2 1 4
[struct stat="OK", mindata=2234.5, maxdata=10234.4]

MESSAGES

OK
[struct stat = "OK", mindata=value, maxdata=value]
ERROR
No status file name given
ERROR
Cannot open status file: filename
ERROR
No debug level given
ERROR
Debug level string is invalid: 'string'
ERROR
Debug level value cannot be negative
ERROR
Invalid input file 'string'
ERROR
Invalid output file 'string'
ERROR
Axis ID 1 cannot be interpreted as an integer.
ERROR
Axis ID 2 cannot be interpreted as an integer.
ERROR
Axis ID 3 cannot be interpreted as an integer.
ERROR
Axis ID 4 cannot be interpreted as an integer.
ERROR
FITS library error
ERROR
general error message

BUGS

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

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.

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.