API Reference for Enthought Tool Suite 3.2.0

Methods to handle unit conversion into/outoff function components.

Component decorators wrap standard python functions with "conversion" routines that can either change or add information to functions before the actual python function call is made. A standard need for this is unit conversion. There are a couple of common cases that we run into in scientific applications. The first is that we want to take objects that have one set of units and convert their data to another set of units before handing them into the function. This is important if a function was written expecting data in a specific set of units (ie. m/s instead of ft/s). convert_units() does this as well as adding units to non-united objects. On output, it is common to want to take objects that may not have units associated with them and convert them to a 'united' object that has units assoicated with them set_units() does this.

Function summary

Functions

Imported Names

Local nameRefers to
ndarraynumpy.ndarray
UnitArrayenthought.numerical_modeling.units.unit_array.UnitArray
unitsenthought.units
UnitScalarenthought.numerical_modeling.units.unit_scalar.UnitScalar

© Copyright 2002-2009 Enthought, Inc.