|
From: <li...@us...> - 2008-12-08 14:42:48
|
Revision: 582
http://pyphant.svn.sourceforge.net/pyphant/?rev=582&view=rev
Author: liehr
Date: 2008-12-08 14:42:45 +0000 (Mon, 08 Dec 2008)
Log Message:
-----------
FMFLoader accepts 'a.u.' or 'A.U.' as abbreviation of 'arbitrary units'.
Modified Paths:
--------------
trunk/doc/demo/readfmf.py
trunk/src/workers/fmfile/fmfile/FMFLoader.py
Modified: trunk/doc/demo/readfmf.py
===================================================================
--- trunk/doc/demo/readfmf.py 2008-12-05 11:46:43 UTC (rev 581)
+++ trunk/doc/demo/readfmf.py 2008-12-08 14:42:45 UTC (rev 582)
@@ -1,7 +1,13 @@
-from fmfile.FMFLoader2 import FMFLoader2
+import sys
+from fmfile.FMFLoader import FMFLoader
-worker = FMFLoader2()
-worker.paramFilename.value='example.fmf'
-result = worker.plugLoadFMF.getResult()
-print result
-print result.attributes
+worker = FMFLoader()
+if len(sys.argv) == 1:
+ filenames = ['example.fmf']
+else:
+ filenames = sys.argv[1:]
+for filename in filenames:
+ worker.paramFilename.value=filename
+ result = worker.plugLoadFMF.getResult()
+ print result
+ print result.attributes
Modified: trunk/src/workers/fmfile/fmfile/FMFLoader.py
===================================================================
--- trunk/src/workers/fmfile/fmfile/FMFLoader.py 2008-12-05 11:46:43 UTC (rev 581)
+++ trunk/src/workers/fmfile/fmfile/FMFLoader.py 2008-12-08 14:42:45 UTC (rev 582)
@@ -353,6 +353,8 @@
unit = '0'+unit
elif unit == '%':
unit = 0.01
+ elif unit == 'a.u.' or unit == 'A.U.':
+ unit = 1.0
elif not unit[0].isdigit():
unit = '1'+unit
try:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|