MANIC

Change the dimensionality of all or part of an NDF

Description:

This application manipulates the dimensionality of an NDF . The input NDF can be projected on to any n-dimensional surface (line, plane, etc.) by averaging or taking the median the pixels in perpendicular directions, or grown into new dimensions by duplicating an existing n-dimensional surface. The order of the axes can also be changed at the same time. Any combination of these operations is also possible.

The shape of the output NDF is specified using Parameter AXES. This is a list of integers, each element of which identifies the source of the corresponding axis of the output–-either the index of one of the pixel axes of the input, or a zero indicating that the input should be expanded with copies of itself along that axis. If any axis of the input NDF is not referenced in the AXES list, the missing dimensions will be collapsed to form the resulting data. Dimensions are collapsed by averaging all the non-bad pixels along the relevant pixel axis (or axes).

Usage:

manic in out axes

Parameters:

AXES( ) = _INTEGER (Read)
An array of integers which define the pixel axes of the output NDF. The array should contain one value for each pixel axis in the output NDF. Each value can be either a positive integer or zero. If positive, it is taken to be the index of a pixel axis within the input NDF which is to be used as the output axis. If zero, the output axis will be formed by replicating the entire output NDF a specified number of times (see Parameters LBOUND and UBOUND). At least one non-zero value must appear in the list, and no input axis may be used more than once.
ESTIMATOR = LITERAL (Read)
The method by which data values in collapsed axes are combined. The permittted options are "Mean" to form the average, or "Median" to use the median. ["Mean"]
IN = NDF (Read)
The input NDF.
LBOUND( ) = _INTEGER (Read)
An array holding the lower pixel bounds of any new axes in the output NDF (that is, output axes which have a zero value in the corresponding element of the AXES parameter). One element must be given for each zero-valued element within AXES, in order of appearance within AXES. The dynamic default is to use 1 for every element. []
OUT = NDF (Write)
The output NDF.
TITLE = LITERAL (Read)
Title for the output NDF. A null (!) means use the title from the input NDF. [!]
UBOUND( ) = _INTEGER (Read)
An array holding the upper pixel bounds of any new axes in the output NDF (that is, output axes which have a zero value in the corresponding element of the AXES parameter). One element must be given for each zero-valued element within AXES, in order of appearance within AXES. The dynamic default is to use 1 for every element. []

Examples:

manic image transim [2,1]
This transposes the two-dimensional NDF image so that its x pixel co-ordinates are in the y direction and vice versa. The ordering of the axes within the current WCS Frame  will only be changed if the Domain of the current Frame  is PIXEL or AXES. For instance, if the current Frame has Domain "SKY", with Axis 1 being RA and Axis 2 being DEC, then these will be unchanged in the output NDF. However, the Mapping which is used to relate (RA,DEC) positions to pixel positions will be modified to take the permutation of the pixel axes into account.
manic cube summ 3
This creates a one dimensional output NDF called summ, in which the single pixel axis corresponds to the z (third) axis in an input NDF called (cube). Each element in the output is equal to the average data value in the corresponding xy plane of the input.
manic in=cube out=summ axis=3 estimator=median
The same as the previous example, except each output value is equal to the median data value in the corresponding xy plane of the input cube.
manic line plane [0,1] lbound=1 ubound=25
This takes a one-dimensional NDF called line and expands it into a two-dimensional NDF called plane. The second pixel axis of the output NDF corresponds to the first (and only) pixel axis in the input NDF. The first pixel axes of the output is formed by replicating the the input NDF 25 times.
manic line plane [1,0] lbound=1 ubound=25
This does the same as the last example except that the output NDF is transposed. That is, the input NDF is copied into the output NDF so that it is parallel to pixel Axis 1 (x) in the output NDF, instead of pixel Axis 2 (y) as before.
manic cube hyper [1,0,0,0,0,0,3] ubound=[2,4,2,2,1] accept
This manic example projects the second dimension of an input three-dimensional NDF on to the plane formed by its first and third dimensions by averaging, and grows the resulting plane up through five new dimensions with a variety of extents.

Notes:

Related Applications

KAPPA: COLLAPSE, PERMAXES.

Implementation Status: