Add a time coordinate conversion to a TimeMap


This function adds one of the standard time coordinate system conversions listed below to an existing TimeMap.

When a TimeMap is first created (using astTimeMap), it simply performs a unit (null) Mapping. By using astTimeAdd (repeatedly if necessary), one or more coordinate conversion steps may then be added, which the TimeMap will perform in sequence. This allows multi-step conversions between a variety of time coordinate systems to be assembled out of the building blocks provided by this class.

Normally, if a TimeMap s Invert attribute is zero (the default), then its forward transformation is performed by carrying out each of the individual coordinate conversions specified by astTimeAdd in the order given (i.e. with the most recently added conversion applied last).

This order is reversed if the TimeMap s Invert attribute is non-zero (or if the inverse transformation is requested by any other means) and each individual coordinate conversion is also replaced by its own inverse. This process inverts the overall effect of the TimeMap. In this case, the first conversion to be applied would be the inverse of the one most recently added.


void astTimeAdd( AstTimeMap this, const char cvt, int narg, const double args[] )


Pointer to the TimeMap.
Pointer to a null-terminated string which identifies the time coordinate conversion to be added to the TimeMap. See the " Available Conversions" section for details of those available.
The number of argument values supplied in the " args" array.
An array containing argument values for the time coordinate conversion. The number of arguments required, and hence the number of array elements used, depends on the conversion specified (see the " Available Conversions" section). This array is ignored and a NULL pointer may be supplied if no arguments are needed.


Available Conversions

The following strings (which are case-insensitive) may be supplied via the " cvt" parameter to indicate which time coordinate conversion is to be added to the TimeMap. Where arguments are needed by the conversion, they are listed in parentheses. Values for these arguments should be given, via the " args" array, in the order indicated. Units and argument names are described at the end of the list of conversions, and " MJD" means Modified Julian Date.

The units for the values processed by the above conversions are as follows:

The arguments used in the above conversions are the zero-points used by the astTransform function. The axis values supplied and returned by astTransform are offsets away from these zero-points: