4.3. UNITS
27
Table 4.4.
Characters and strings allowed to denote mathematical operations.
String
Meaning
Multiplication
str1 str2
Multiplication
str1*str2
Multiplication
str1.str2
Division
str1/str2
Raised to the power expr
str1**expr
Raised to the power expr
str1^expr
Raised to the power expr
str1expr
Common Logarithm (to base 10)
log(str1)
Natural Logarithm
ln(str1)
Exponential (estr1)
exp(str1)
Square root
sqrt(str1)
be subject to misinterpretation. A space character implies multiplication which can
also be conveyed explicitly with an asterisk or a period. Therefore, although spaces are
allowed as symbol separators, their use is discouraged. Note that, per IAU convention,
case is significant throughout. The IAU style manual forbids the use of more than one
solidus (/) character in a units string. However, since normal mathematical precedence
rules apply in this context, more than one solidus may be used but is discouraged.
A unit raised to a power is indicated by the unit string followed, with no intervening
spaces, by the optional symbols ** or ^ followed by the power given as a numeric
expression, called expr in Table 4.4. The power may be a simple integer, with or
without sign, optionally surrounded by parentheses. It may also be a decimal number
(e.g., 1.5, 0.5) or a ratio of two integers (e.g., 7/9), with or without sign, which must
be surrounded by parentheses. Thus meters squared may be indicated by m**(2),
m**+2, m+2, m2, m^2, m^(+2), etc. and per meter cubed may be indicated by m**-3,
m-3, m^(-3), /m3, and so forth. Meters to the three-halves power may be indicated
by m(1.5), m^(1.5), m**(1.5), m(3/2), m**(3/2), and m^(3/2), but not by m^3/2 or
m1.5.
4.3.2
Units in Comment Fields
If the units of the keyword value are specified in the comment of the header keyword, it
is recommended that the units string be enclosed in square brackets (i.e., enclosed by `['
and `]') at the beginning of the comment field, separated from the slash (`/') comment
FITS Standard