[Rivet-svn] r3144 - trunk/bin

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Fri Jun 10 13:03:07 BST 2011


Author: buckley
Date: Fri Jun 10 13:03:07 2011
New Revision: 3144

Log:
Fix typos in use of physics coord transformation... still something wrong, though :(

Modified:
   trunk/bin/make-plots

Modified: trunk/bin/make-plots
==============================================================================
--- trunk/bin/make-plots	Fri Jun 10 12:40:01 2011	(r3143)
+++ trunk/bin/make-plots	Fri Jun 10 13:03:07 2011	(r3144)
@@ -928,18 +928,21 @@
     def draw(self,coors):
         out = ""
         out += ('\n%\n% Special\n%\n')
+        import re
+        regex = re.compile(r'^(.*?)(\\physics[xy]?coor)\(([^,]+),([^,]+)\)(.*)')
         for i in range(len(self.data)):
-            import re
-            regex = re.compile(r'^(.*?)(\\physics[xy]?coor)\(([^,]+),([^,]+)\)(.*)')
             while regex.search(self.data[i]):
                 match = regex.search(self.data[i])
                 xcoor, ycoor = float(match.group(3)), float(match.group(4))
-                if match.group(2) in ["physicscoor", "physicsxcoor"]:
-                    xcoor = coors.strphys2frameX(xcoor)
-                if match.group(2) in ["physicscoor", "physicsycoor"]:
-                    ycoor = coors.strphys2frameY(ycoor)
-                line = "%s(%1.2e,%1.2e)%s" % (match.group(1), xcoor, ycoor, match.group(5))
+                if match.group(2)[1:] in ["physicscoor", "physicsxcoor"]:
+                    print xcoor, coors.phys2frameX(xcoor)
+                    xcoor = coors.phys2frameX(xcoor)
+                if match.group(2)[1:] in ["physicscoor", "physicsycoor"]:
+                    ycoor = coors.phys2frameY(ycoor)
+                line = "%s(%1.2e, %1.2e)%s" % (match.group(1), xcoor, ycoor, match.group(5))
+                print line
                 self.data[i] = line
+            print self.data[i]
             out += self.data[i]+'\n'
         return out
 


More information about the Rivet-svn mailing list