User Tools

Site Tools


howtos:toolcoding:unit_of_measure_conversions

This is an old revision of the document!


There are two unit of measure parameters included with every TOOL object: the SI unit of measure (SIuom) and the alternate unit of measure (altUom).

The SIUom is the base units for the data and is the units that are used for storing the data and doing any math with that data, including interacting with other objects.

The altUom is the display and input units of measure that will be used anytime you interact with the data. Interacting would include: the display tools like table, and graph, entering data manually through these tools, and direct assignment in code in views. Each altUom should be setup in the measures table (see measures tab in Documenter) to specify how the conversion to the related SIUom should be done.

TOOL can handle unit of measure conversions across multiple objects seamlessly provided that the user defines the new measure in Documenter and properly specifies the unit of measure when defining the shape of a variable. The general steps to implement unit of measure conversions are:

  1. Define relevant altUom measures in Documenter
  2. Specify a unit of measure (altUom) for the source variable shape that matches the unit of measure of the source data
  3. Create a target variable with the same shape as the source variable but with the desired unit of measure (altUom)
  4. Set the target variable equal to the source variable

The target variable will be displayed in the desired unit of measure.

ADD EXAMPLE

howtos/toolcoding/unit_of_measure_conversions.1265405053.txt.gz · Last modified: 2010/02/05 21:24 by deryn.crockett