Register a transformation routine for use by an IntraMap AST_INTRAREG
Registration of relevant transformation routines is required before using the AST_INTRAMAP constructor function to create an IntraMap or reading an external representation of an IntraMap from a Channel.
This transformation routine must also appear in an EXTERNAL statement in the routine which calls AST_INTRAREG.
"
Transformation Flags"
section (below). Beware that an external representation of an IntraMap (created by writing it to a Channel) will not include the coordinate transformation routine which it uses, so will only refer to the routine by its name (as assigned using AST_INTRAREG). Consequently, the external representation cannot be utilised by another program unless that program has also registered the same transformation routine with the same name using an identical invocation of AST_INTRAREG. If no such registration has been performed, then attempting to read the external representation will result in an error.
You may use AST_INTRAREG to register a transformation routine with the same name more than once, but only if the arguments supplied are identical on each occasion (i.e there is no way of changing things once a routine has been successfully registered under a given name, and attempting to do so will result in an error). This feature simply allows registration to be performed independently, but consistently, at several places within your program, without having to check whether it has already been done.
If an error occurs in the transformation routine, this may be indicated by setting its STATUS argument to an error value before it returns. This will immediately terminate the current AST operation. The error value AST__ITFER is available for this purpose, but other values may also be used (e.g. if you wish to distinguish different types of error). The AST__ITFER error value is defined in the AST_ERR include file.
AST__NOFWD: If this flag is set, it indicates that the transformation routine does not implement a forward coordinate transformation. In this case, any IntraMap which uses it will have a TranForward attribute value of zero and the transformation routine itself will not be called with its FORWARD argument set to .TRUE.. By default, it is assumed that a forward transformation is provided.
AST__NOINV: If this flag is set, it indicates that the transformation routine does not implement an inverse coordinate transformation. In this case, any IntraMap which uses it will have a TranInverse attribute value of zero and the transformation routine itself will not be called with its FORWARD argument set to .FALSE.. By default, it is assumed that an inverse transformation is provided.
AST__SIMPFI: You may set this flag if applying the transformation routine’
s forward coordinate
transformation, followed immediately by the matching inverse transformation, should always restore
the original set of coordinates. It indicates that AST may replace such a sequence of operations by an
identity Mapping (a UnitMap) if it is encountered while simplifying a compound Mapping (e.g.
using AST_SIMPLIFY). It is not necessary that both transformations have actually been
implemented.
AST__SIMPIF: You may set this flag if applying the transformation routine’
s inverse coordinate
transformation, followed immediately by the matching forward transformation, should always restore
the original set of coordinates. It indicates that AST may replace such a sequence of operations by an
identity Mapping (a UnitMap) if it is encountered while simplifying a compound Mapping (e.g. using
AST_SIMPLIFY). It is not necessary that both transformations have actually been implemented.