<casaxml xsi:schemaLocation="http://casa.nrao.edu/schema/casa.xsd file:///opt/casa/code/xmlcasa/xml/casa.xsd" xmlns="http://casa.nrao.edu/schema/psetTypes.html" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<task type="function" name="imtrans" category="analysis">
<shortdescription>Reorder image axes</shortdescription>
<param type="path" name="imagename" mustexist="true"><shortdescription>Name of the input image which must be specified.</shortdescription><description>Name of the input image which must be specified.</description>
<example>imagename='ngc5921.im'</example>
<param type="string" name="outfile"><shortdescription>Name of output CASA image.</shortdescription><description>Name of output CASA image.</description>
<example>outfile='reordered.im'</example>
<param type="any" name="order"><shortdescription>New zero-based axes order.</shortdescription><description>New zero-based axes order.</description>
<any type="variant" limittype="string stringArray int"/>
<example>order="120"</example>
<example>order=120</example>
<example>order=["d", "f", "r"]</example>
imagename Name of the input image
outfile Name of output CASA image. Must be specified.
order Output axes mapping
This task reorders (transposes) the axes in the input image to the specified
order. The associated pixel values and coordinate system are transposed.
The order parameter describes the mapping of the input axes to the output axes.
It can be one of three types: a non-negative integer, a string, or a list of
strings. If a string or non-negative integer, it should contain
zero-based digits describing the new order of the input axes. It must
contain the same number of (unique) digits as the number of input axes. For example,
specifying order="1032" or order=1032 for a four axes image maps input axes
1, 0, 3, 2 to output axes 0, 1, 2, 3. In the case of order being a nonnegative integer
and the zeroth axis in the input being mapped to zeroth axis in the output, the zeroth
digit is implicitly understood to be 0 so that to transpose an image where one would
use a string order="0321", one could equivalently specify an int order=321.
IMPORTANT: When specifying a non-negative integer and mapping the zeroth axis of
the input to the zeroth axis of the output, do *not* explicitly specify the leading
0; eg, specify order=321 rather than order=0321. Python interprets an integer with
a leading 0 as an octal number.
Because of ambiguity for axes numbers greater than nine, using string or integer order
specifications cannot handle images containing more than 10 axes.
The order parameter can also be specified as a list of strings which uniquely match,
ignoring case, the first characters of the image axis names (ia.coordsys().names()).
So to reorder an image with right ascension, declination, and frequency axes, one could
specify order=["d", "f", "r"] or equivalently ["decl", "frequ", "right a"]. Note that