The ?? is a ?? which is specialised for representing moments in time. In this section we examine the additional properties and behaviour of a TimeFrame that distinguish it from a basic Frame (§7).
As for a ??, a ?? is a ?? (§7) and also a ?? (§5), so it inherits all the properties and behaviour of these two ancestral classes. When used as a Mapping, a TimeFrame implements a unit transformation, exactly like a basic Frame (§7.3) or a ??, so this aspect of its behaviour is not of great importance.
When used as a Frame, however, a TimeFrame represents a wide range of different 1-dimensional coordinate system which can be used to describe moments in time. Absolute times and relative (i.e. elapsed) times are supported (attribute ??), as are a range of different time scales (attribute ??). An absolute or relative value in any time scale can be represented in different forms such as Modified Julian Date, Julian ??, etc (attribute ??). AST extends the definition of these systems to allow them to be used with any unit of time (attribute Unit). The TimeFrame class also allows times to formatted as either a simple floating point value or as a Gregorian date and time of day (attribute Format).
The ?? constructor function is particularly simple and a TimeFrame with default attributes is created as follows:
Such a TimeFrame would represent the default coordinate system which is Modified Julian Date (with the usual units of days) in the International Atomic Time (TAI) time scale.
By setting the ?? attribute appropriately, the ?? can represent Julian Date, Modified Julian Date, Julian ?? or Besselian Epoch (the time scale is specified by a separate attribute called ??).
Selection of a particular coordinate system is performed simply by setting a value for the TimeFrame’s (character string) System attribute. This setting is most conveniently done when the TimeFrame is created. For example, a TimeFrame representing Julian Epoch would be created by:
Note that specifying “SystemJEPOCH” also changes the associated default Unit (from days to years). This is because the default value of the TimeFrame’s Unit attribute depends on the System attribute setting.
You may change the System value at any time, although this is not usually needed. The values supported are set out in the attribute’s description in Appendix C.
Time coordinate systems require some additional free parameters to identify a particular coordinate system from amongst a broader class of related coordinate systems. For example, all TimeFrames are qualified by the time scale (that is, the physical process used to define the flow of time), and some require the position of the observer’s clock.
In AST, these free parameters are represented by additional ?? attributes, each of which has a default appropriate to (i.e. defined by) the setting of the main ?? attribute. Each of these qualifying attributes may, however, be assigned an explicit value so as to select a particular coordinate system. Note, it is usually best to assign explicit values whenever possible rather than relying on defaults. Attribute should only be left at their default value if you “don’t care” what value is used. In certain circumstances (particularly, when aligning two Frames), a default value for an attribute may be replaced by the value from another similar ??. Such value replacement can be prevented by assigning an explicit value to the attribute, rather than simply relying on the default.
The main TimeFrame attributes which qualify the System attribute are:
For further details of these attributes you should consult their descriptions in Appendix C and for details of the System settings for which they are relevant, see the description of the System attribute (also in Appendix C).
Note that it does no harm to assign values to qualifying attributes which are not relevant to the main System or TimeScale value. Any such values are stored, but are not used unless the System and/or TimeScale value is later set so that they become relevant.