Frame Attributes

We will now briefly outline the various attributes associated with a FrameFrame (this is, of course, in addition to those inherited from the MappingMapping class). We will not delve too deeply into the details of each attribute, for which you should consult the appropriate description in Appendix C. Instead, we aim simply to sketch the range of facilities available:

NaxesNaxes

A read-only integer giving the number of Frame axes.

TitleTitle

A string describing the coordinate system which the Frame represents.

Label(axis)Label(axis)

A label string for each axis.

Unit(axis)Unit(axis)

A string describing the physical units on each axis. You can choose whether to make this attribute “active” or “passive” (using astSetActiveUnitastSetActiveUnit ). If active, its value will be taken into account when finding the Mapping between two Frames (e.g. a scaling of 0.001 would be used to connect two axis with units of “km” and “m”). If passive, its value is ignored. Its use is described in more detail in §7.14.

Symbol(axis)Symbol(axis)

A string containing a “short form” symbol (e.g. like “X” or “Y”) used to represent the quantity plotted on each axis.

Digits/Digits(axis)Digits/Digits(axis)

The preferred number of digits of precision to be used when formatting values for display on each axis.

Format(axis)Format(axis)

A string containing a format specifier which determines exactly how values should be formatted for display on each axis (§7.6). If this attribute is un-set, the formatting is based on the Digits value, otherwise the Format string over-rides the Digits value.

Direction(axis)Direction(axis)

A boolean (integer) value which indicates in which direction each axis should be plotted. If it is non-zero (the default), the axis should be plotted in the conventional direction—i.e. increasing to the right for the abscissa and increasing upwards for the ordinate. If it is zero, the axis should be plotted in reverse. This attribute is provided as a hint only and programs are free to ignore it if they wish.

DomainDomain

A character string which identifies the physical domain to which the Frame's coordinate system applies. The primary purpose of this attribute is to prevent unwanted conversions from occurring between coordinate systems which are not related. Its use is described in more detail in §7.12.

SystemSystem

A character string which identifies the specific coordinate system used to describe positions within the physical domain represented by the Frame. For a simple Frame, this attribute currently has a fixed value of “Cartesian”, but could in principle be extended to include options such as “Polar”, “Cylindrical”, etc. More specialised Frames such as the SkyFrameSkyFrame, TimeFrameTimeFrame and SpecFrameSpecFrame, re-define the allowed values to be appropriate to the domain which they describe. For instance, the SkyFrame allows values such as “FK4” and “Galactic”, and the SpecFrame allows values such as “frequency” and “wavelength”.

EpochEpoch

This value is used to qualify a coordinate system by giving the moment in time when the coordinates are correct. Usually, this will be the date of observation. The Epoch value is important in cases where coordinates systems move with respect to each other over time. An example of two such coordinate systems are the FK4 and FK5 celestial coordinate systems.

ObsLonObsLon

Specifies the longitude of the observer (assumed to be on the surface of the earth). The basic Frame class does not use this value, but specialised sub-classes may. For instance, the SpecFrame class uses it to calculate the relative velocity of the observer and the centre of the earth for use in converting between standards of rest.

ObsLatObsLat

Specifies the latitude of the observer. Use in conjunction with ObsLon.

There are also some further Frame attributes, not described above, which are important when Frames are used as templates to search for other Frames. Their use goes beyond the present discussion.