Format(axis)

Format specification for axis values

Description:

This attribute specifies the format to be used when displaying coordinate values associated with a particular Frame axis (i.e. to convert values from binary to character form). It is interpreted by the AST_FORMAT function and determines the formatting which it applies.

If no Format value is set for a Frame axis, a default value is supplied instead. This is based on the value of the Digits, or Digits(axis), attribute and is chosen so that it displays the requested number of digits of precision.

Type:
String.

Applicability

Frame
The Frame class interprets this attribute as a format specification string to be passed to the C " printf" function (e.g. " %1.7G" ) in order to format a single coordinate value (supplied as a double precision number).
SkyFrame
The SkyFrame class re-defines the syntax and default value of the Format string to allow the formatting of sexagesimal values as appropriate for the particular celestial coordinate system being represented. The syntax of SkyFrame Format strings is described (below) in the " SkyFrame Formats" section.
FrameSet
The Format attribute of a FrameSet axis is the same as that of its current Frame (as specified by the Current attribute). Note that the syntax of the Format string is also determined by the current Frame.
TimeFrame
The TimeFrame class extends the syntax of the Format string to allow the formatting of TimeFrame axis values as Gregorian calendar dates and times. The syntax of TimeFrame Format strings is described (below) in the " TimeFrame Formats" section.

Notes:

SkyFrame Formats

The Format string supplied for a SkyFrame should contain zero or more of the following characters. These may occur in any order, but the following is recommended for clarity:

All of the above format specifiers are case-insensitive. If several characters make conflicting requests (e.g. if both " i" and " b" appear), then the character occurring last takes precedence, except that " d" and " h" always override " t" .

If the format string starts with a percentage sign (%), then the whole format string is assumed to conform to the syntax defined by the Frame class, and the axis values is formated as a decimal radians value.

TimeFrame Formats

The Format string supplied for a TimeFrame should either use the syntax defined by the base Frame class (i.e. a C " printf" format string), or the extended " iso" syntax described below (the default value is inherited from the Frame class):