|
From: <li...@us...> - 2008-11-01 15:55:58
|
Revision: 570
http://pyphant.svn.sourceforge.net/pyphant/?rev=570&view=rev
Author: liehr
Date: 2008-11-01 15:55:56 +0000 (Sat, 01 Nov 2008)
Log Message:
-----------
FMFLoader2 bugfix: Units in LaTeX notation are also recognized in the metadata sections.
Modified Paths:
--------------
trunk/doc/demo/example.fmf
trunk/src/workers/fmfile/fmfile/FMFLoader2.py
Modified: trunk/doc/demo/example.fmf
===================================================================
--- trunk/doc/demo/example.fmf 2008-11-01 14:57:01 UTC (rev 569)
+++ trunk/doc/demo/example.fmf 2008-11-01 15:55:56 UTC (rev 570)
@@ -35,6 +35,8 @@
voltage: U = 1V
temperature in Celsius: T_C = 22 degC
temperature in Fahrenheit: T = 22 degF
+resistance: \omega = 2.0 kg*m^2*A^-2*s^-3
+resistance 2: \omega = 2.0 kg*m**2*A**-2*s**-3
[Physical Quantities with error]
voltage: U = 1 V +- 1 mV
current: I = 1 A +/- 0.001 A
@@ -42,6 +44,8 @@
work: A = 1 W +- 0.1%
voltage in brackets: U = (1 +- 0.001) V
current in brackets: I = (1 +- 0.1%) A
+trailing amplitude: \omega = (1 +- 0.01) 2 ohm
+trailing amplitude, relative error: \omega = (1 +- 1%) 2 ohm
estimated parameter: p = 1 \pm 0.1
another estimated parameter: p = 1 \pm 1%
[*table definitions]
Modified: trunk/src/workers/fmfile/fmfile/FMFLoader2.py
===================================================================
--- trunk/src/workers/fmfile/fmfile/FMFLoader2.py 2008-11-01 14:57:01 UTC (rev 569)
+++ trunk/src/workers/fmfile/fmfile/FMFLoader2.py 2008-11-01 15:55:56 UTC (rev 570)
@@ -243,7 +243,7 @@
elif not unit[0].isdigit():
unit = '1'+unit
try:
- unit = PhysicalQuantity(unit.encode('utf-8'))
+ unit = PhysicalQuantity(unit.encode('utf-8').replace('^','**'))
except:
unit = float(unit)
return unit
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|