Units of Measure
Units of measure come up in two difference contexts in the PDS4 archive: As the value of the <unit> attribute in a table field or array element description; and as qualifiers for label meta-data values.
If you're looking for valid units to use for label attributes of a particular type, see Unit Classes Standard Values.
Values of <unit> Attributes
When specifying units for data objects, as in fields of tables or elements of arrays, you should use SI units unless there is a compelling reason to use a unit better known to the community. In forming units of measure, follow these guidelines from the PDS4 Standards Reference:
- Use standard SI abbreviations for units for everything that can be expressed in ASCII characters.
- Use the explicit UTF-8 character for the "micro sign" character "µ" (U+00B5); not the English letter "u".
- Use "*" to explicitly indicate multiplication.
- Use "/" to indicate division.
- Use "**" to indicate exponentiation.
- Avoid negative exponents as far as possible.
- Limit use of parentheses to one pair for the numerator and one pair for the denominator if possible.
Note: As of this writing, the actual value of <unit> attributes is not validated by schemas or software. If you have questions about the appropriate use of units for data fields, please contact your SBN consultant sooner rather than later.
Finally, note that the <unit> attribute is always optional. If the quantity you are describing is unitless, then omit the <unit> attribute. Never use
<unit>None</unit> in PDS4 labels.
Units of Label Attributes
When a label attribute has a unit (as field lengths and object offsets do, for example), you will always be required to specify it. This is done using an XML attribute in the tag. For example, the location of the start of a data field is specified using the offset attribute with a unit of bytes:
The value of the "unit=" XML attribute comes from a standard value list contained in the PDS4 master schema.
The Underlying Design
The PDS4 master schema defines classes of units with names like Units_of_Length and Units_of_Angle. These classes contain fairly short lists of standard units, any of which can be used as the value of the "unit=" XML attribute when that type of unit is called for. When you are defining new attributes in a mission dictionary, these unit classes are available for your use as well.
- [ These unit classes enable software to perform specific scaling operations on attribute values as they are ingested into a database so that, for example, a web search can support searching on wavelength even when some labels give wavelength in angstroms while others use nanometers. ]
In general, unit values are specified using the standard abbreviations where those abbreviations can be expressed using only ASCII characters. The notable exception is anything beginning with the "micro-" prefix. Do not use an ASCII 'u' character to indicate "micro–"; spell it out instead (that is, "micrometer", not "um").
The standard value lists for the PDS4 unit classes are defined on the Unit Classes Standard Values page, for ready reference.