mailr11245 - /1.3/generic_fns/grace.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on June 15, 2010 - 17:05:
Author: bugman
Date: Tue Jun 15 17:05:56 2010
New Revision: 11245

URL: http://svn.gna.org/viewcvs/relax?rev=11245&view=rev
Log:
Per point comments are now included in the Grace files.


Modified:
    1.3/generic_fns/grace.py

Modified: 1.3/generic_fns/grace.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/grace.py?rev=11245&r1=11244&r2=11245&view=diff
==============================================================================
--- 1.3/generic_fns/grace.py (original)
+++ 1.3/generic_fns/grace.py Tue Jun 15 17:05:56 2010
@@ -334,6 +334,13 @@
     @type norm:             bool
     """
 
+    # Comment columns.
+    comment_col = 2
+    if graph_type in ['xydx', 'xydy']:
+        comment_col = 3
+    elif graph_type == 'xydxdy':
+        comment_col = 4
+
     # Loop over the graphs.
     for gi in range(len(data)):
         # Loop over the data sets of the graph.
@@ -371,6 +378,12 @@
 
                     # Write the error.
                     file.write(" %-30s" % (error/norm_fact))
+
+                # The comment if given.
+                try:
+                    file.write("%30s \"# %s\"" % ('', point[comment_col]))
+                except IndexError:
+                    pass
 
                 # End the point.
                 file.write("\n")




Related Messages


Powered by MHonArc, Updated Tue Jun 15 19:00:03 2010