[SciPy-user] Units in SciPy
Duncan Child
duncan at enthought.com
Fri Apr 1 17:22:50 EST 2005
Hi all,
After reading all the emails I think the problem splits down like this:
1) Algebra of Units
It feels like you should be able to divide a distance by a time and get
a velocity. If you then try and add a velocity to a temperature you
should get an error.
This may be what Gary had in mind when he said "I've tried units
packages in other systems. (notably Mathcad) After 30 minutes I abandon
them. Much typing, little payback."
2) Quantities (Robert's "numerical quantities tagged with their unit
system")
This is what I need to provide to scientists who are developing
libraries of geophysical algorithms. They know what units they expect eg
their algoritm needs a velocity in m/s. As long as I can tag the data
that flows through the system with a description of what it's units are
then I can add a 'shim' that will do the necessary unit conversions.
The problem is that some of the units packages are targetted towards
'units algebra' and then punt on issues like temperature gradients which
makes it hard for me to tag all the quantities. In fact, I would almost
be better off passing around a string because that would at least allow
me to hack around the special cases in my 'shim' code.
3) Map Projections
Describing lat lon data is harder because if you don't also specify the
datum (effectively where you are assuming the center of the Earth is)
your position can be miscontrued by 100s of meters. To convert from lat
lon to xy you have to specify a bunch of parameters so this is trickier
than converting something like meters to km. So I am not sure where this
type of data fits in relation to the more usual conversions.
Summary:
1) no one has suggested a better approach than than the one we are
already using for Quantities
2) Enthought has not overlooked a clearly superior implementation of a
units package that we could include in SciPy
3) Frink is indeed very cool.
4) POSC has a fairly complete database of units http://www.posc.org/UConvert
Regards,
Duncan
More information about the SciPy-User
mailing list