astTranN

Transform N-dimensional coordinates

Description:

This function applies a Mapping to transform the coordinates of a set of points in an arbitrary number of dimensions. It is the appropriate routine to use if the coordinates are not purely 1- or 2-dimensional and are stored in a single array (which they need not fill completely).

If the coordinates are not stored in a single array, then the astTranP function might be more suitable.

Synopsis

void astTranN( AstMapping this, int npoint, int ncoord_in, int indim, const double in, int forward, int ncoord_out, int outdim, double out )

Parameters:

this
Pointer to the Mapping to be applied.
npoint
The number of points to be transformed.
ncoord_in
The number of coordinates being supplied for each input point (i.e. the number of dimensions of the space in which the input points reside).
indim
The number of elements along the second dimension of the " in" array (which contains the input coordinates). This value is required so that the coordinate values can be correctly located if they do not entirely fill this array. The value given should not be less than " npoint" .
in
The address of the first element in a 2-dimensional array of shape " [ncoord_in][indim]" , containing the coordinates of the input (untransformed) points. These should be stored such that the value of coordinate number " coord" for input point number " point" is found in element " in[coord][point]" .
forward
A non-zero value indicates that the Mapping s forward coordinate transformation is to be applied, while a zero value indicates that the inverse transformation should be used.
ncoord_out
The number of coordinates being generated by the Mapping for each output point (i.e. the number of dimensions of the space in which the output points reside). This need not be the same as " ncoord_in" .
outdim
The number of elements along the second dimension of the " out" array (which will contain the output coordinates). This value is required so that the coordinate values can be correctly located if they will not entirely fill this array. The value given should not be less than " npoint" .
out
The address of the first element in a 2-dimensional array of shape " [ncoord_out][outdim]" , into which the coordinates of the output (transformed) points will be written. These will be stored such that the value of coordinate number " coord" for output point number " point" will be found in element " out[coord][point]" .

Notes:

Handling of Huge Pixel Arrays

If the number of points to be transformed exceeds the largest value that can be represented by a 4-byte integer, then the alternative " 8-byte" interface for this function should be used. This alternative interface uses 8 byte integer arguments (instead of 4-byte). Specifically, the arguments " npoint" , " indim" and " outdim" are changed from type " int" to type " int64_t" (defined in header file stdint.h). The function name is changed by appending the digit " 8" to the name. Thus, astTranN becomes astTranN8