Once a transformation routine been registered, creating an IntraMap from it is simple:
INTEGER INTRAMAP
...
INTRAMAP = AST_INTRAMAP( 'SqrTran', 2, 2, ' ', STATUS );
We simply use the AST_INTRAMAP constructor function and pass it the
name of the transformation routine to use. This name is the same (case
sensitive) one that we associated with the routine when we registered
it using AST_INTRAREG ().
You can, of course, register any number of transformation routines and select which one to use whenever you create an IntraMap. You can also create any number of independent IntraMaps using each transformation routine. In this sense, each transformation routine you register effectively creates a new ``sub-class'' of IntraMap, from which you can create Objects just like any other class. However, an error will occur if you attempt to use a transformation routine that has not yet been registered.
The second and third arguments to AST_INTRAMAP are the numbers of input and output coordinates. These define the Nin and Nout attributes for the IntraMap that is created and they must match the corresponding numbers given when the transformation routine was registered.
The penultimate argument is the usual attribute initialisation
string. You may set attribute values for an IntraMap in exactly the
same way as for any other Mapping (, and
also see
).
AST A Library for Handling World Coordinate Systems in Astronomy