###
The Syntax for Unit Strings

Conversion between units systems relies on the use of a specific syntax for the Unit attribute. If the value of the Unit attribute does not conform to this syntax, then an error will be reported if an attempt is made to use it to determine an inter-unit MappingMapping (this will never happen if the Unit attribute is passive).

The adopted syntax is that described in FITS-WCS paper I "Representation of World Coordinate in FITS" by Greisen & Calabretta. We distinguish here between “basic” units and “derived” units: derived units are defined in terms of other units (either derived or basic), whereas basic units have no such definitions. Derived units may be represented by their own symbol (e.g. “Jy”—the Jansky) or by a mathematical expression which combines other symbols and constants to form a definition of the unit (e.g. “km/s”—kilometres per second). Unit symbols may be prefixed by a string representing a standard multiple or sub-multiple.

In addition to the unit symbols listed in FITS-WCS Paper I, any other arbitrary unit symbol may be used, with the proviso that it will not be possible to convert between Frames using such units. The exception to this is if both Frames refer to the same unknown unit string. For instance, an axis with unknown unit symbol "flop" could be converted to an axis with unit "Mflop" (Mega-flop).

Unit symbols (optionally prefixed with a multiple or sub-multiple) can be combined together using a limited range of mathematical operators and functions, to produce new units. Such expressions may also contain parentheses and numerical constants (these may optionally use “scientific” notation including an “E” character to represent the power of 10).

The following tables list the symbols for the basic and derived units which may be included in a units string, the standard prefixes for multiples and sub-multiples, and the strings which may be used to represent mathematical operators and functions.

Basic units
Quantity | Symbol | FullFull Name
length | m | metre
mass | g | gram
time | s | second
plane angle | rad | radian
solid angle | sr | steradian
temperature | K | Kelvin
electric current | A | Ampere
amount of substance | mol | mole
luminous intensity | cd | candela

Derived units
Quantity | Symbol | Full Name | Definition
area | barn | barn | 1.0E-28 m**2
area | pix | pixel |
area | pixel | pixel |
electric capacitance | F | Farad | C/V
electric charge | C | Coulomb | A s
electric conductance | S | Siemens | A/V
electric potential | V | Volt | J/C
electric resistance | Ohm | Ohm | V/A
energy | J | Joule | N m
energy | Ry | Rydberg | 13.605692 eV
energy | eV | electron-Volt | 1.60217733E-19 J
energy | erg | erg | 1.0E-7 J
events | count | count |
events | ct | count |
events | ph | photon |
events | photon | photon |
flux density | Jy | Jansky | 1.0E-26 W /m**2 /Hz
flux density | R | Rayleigh | 1.0E10/(4*PI) photon.m**-2 /s/sr
flux density | mag | magnitude |
force | N | Newton | kg m/s**2
frequency | Hz | Hertz | 1/s
illuminance | lx | lux | lm/m**2
inductance | H | Henry | Wb/A
length | AU | astronomical unit | 1.49598E11 m
length | Angstrom | Angstrom | 1.0E-10 m
length | lyr | light year | 9.460730E15 m
length | pc | parsec | 3.0867E16 m
length | solRad | solar radius | 6.9599E8 m
luminosity | solLum | solar luminosity | 3.8268E26 W
luminous flux | lm | lumen | cd sr
magnetic field | G | Gauss | 1.0E-4 T
magnetic flux | Wb | Weber | V s
mass | solMass | solar mass | 1.9891E30 kg
mass | u | unified atomic mass unit | 1.6605387E-27 kg
magnetic flux density | T | Tesla | Wb/m**2
plane angle | arcmin | arc-minute | 1/60 deg
plane angle | arcsec | arc-second | 1/3600 deg
plane angle | mas | milli-arcsecond | 1/3600000 deg
plane angle | deg | degree | pi/180 rad
power | W | Watt | J/s
pressure, stress | Pa | Pascal | N/m**2
time | a | year | 31557600 s
time | d | day | 86400 s
time | h | hour | 3600 s
time | yr | year | 31557600 s
time | min | minute | 60 s
| D | Debye | 1.0E-29/3 C.m

Prefixes for multiples & sub-multiples
Sub-multiple | Name | Prefix | Sub-multiple | Name | Prefix
132#132 | deci | d | 133#133 | deca | da
134#134 | centi | c | 135#135 | hecto | h
136#136 | milli | m | 137#137 | kilo | k
138#138 | micro | u | 139#139 | mega | M
140#140 | nano | n | 141#141 | giga | G
142#142 | pico | p | 143#143 | tera | T
144#144 | femto | f | 145#145 | peta | P
146#146 | atto | a | 147#147 | exa | E
148#148 | zepto | z | 149#149 | zetta | Z
150#150 | yocto | y | 151#151 | yotta | Y

Mathematical operators & functions
String | Meaning
sym1 sym2 | multiplication (a space)
sym1*sym2 | multiplication (an asterisk)
sym1.sym2 | multiplication (a dot)
sym1/sym2 | division
sym1**y | exponentiation (100#100 must be a numerical constant)
sym1`^`y | exponentiation (100#100 must be a numerical constant)
log(sym1) | common logarithm
ln(sym1) | natural logarithm
exp(sym1) | exponential
sqrt(sym1) | square root