astIntraReg

Register a transformation function for use by an IntraMap

Description:

This function registers a privately-defined coordinate transformation function written in C so that it may be used to create an IntraMap. An IntraMap is a specialised form of Mapping which encapsulates the C function so that it may be used like any other AST Mapping. This allows you to create Mappings that perform any conceivable coordinate transformation.

Registration of relevant transformation functions is required before using the astIntraMap constructor function to create an IntraMap or reading an external representation of an IntraMap from a Channel.

Synopsis

astIntraReg( const char name, int nin, int nout, void ( tran)( AstMapping , int, int, const double [], int, int, double [] ), unsigned int flags, const char purpose, const char author, const char contact )

Parameters:

name
Pointer to a null-terminated string containing a unique name to be associated with the transformation function in order to identify it. This name is case sensitive. All white space will be removed before use.
nin
The number of input coordinates accepted by the transformation function (i.e. the number of dimensions of the space in which the input points reside). A value of AST__ANY may be given if the function is able to accommodate a variable number of input coordinates.
nout
The number of output coordinates produced by the transformation function (i.e. the number of dimensions of the space in which the output points reside). A value of AST__ANY may be given if the function is able to produce a variable number of output coordinates.
tran
Pointer to the transformation function to be registered. This function should perform whatever coordinate transformations are required and should have an interface like astTranP (q.v.).
flags
This value may be used to supply a set of flags which describe the transformation function and which may affect the behaviour of any IntraMap which uses it. Often, a value of zero will be given here, but you may also supply the bitwise OR of a set of flags as described in the " Transformation Flags" section (below).
purpose
Pointer to a null-terminated string containing a short (one line) textual comment to describe the purpose of the transformation function.
author
Pointer to a null-terminated string containing the name of the author of the transformation function.
contact
Pointer to a null-terminated string containing contact details for the author of the transformation function (e.g. an e-mail or WWW address). If any IntraMap which uses this transformation function is exported as part of a dataset to an external user who does not have access to the function, then these contact details should allow them to obtain the necessary code.

Notes:

Transformation Flags

The following flags are defined in the “ast.h header file and allow you to provide further information about the nature of the transformation function. Having selected the set of flags which apply, you should supply the bitwise OR of their values as the “flags argument to astIntraReg.