When a TimeMap is first created (using AST_TIMEMAP), it simply performs a unit (null) Mapping. By using AST_TIMEADD (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 AST_TIMEADD 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.
AST A Library for Handling World Coordinate Systems in Astronomy