mailr7265 - /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 September 24, 2008 - 19:02:
Author: bugman
Date: Wed Sep 24 19:02:47 2008
New Revision: 7265

URL: http://svn.gna.org/viewcvs/relax?rev=7265&view=rev
Log:
Propagation of the spin_id variable.


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=7265&r1=7264&r2=7265&view=diff
==============================================================================
--- 1.3/generic_fns/grace.py (original)
+++ 1.3/generic_fns/grace.py Wed Sep 24 19:02:47 2008
@@ -318,7 +318,7 @@
     # Multiple data sets.
     if multi:
         # Write the header.
-        write_multi_header(data, file=file, x_data_type=x_data_type, 
y_data_type=y_data_type, x_return_units=x_return_units, 
y_return_units=y_return_units, x_return_grace_string=x_return_grace_string, 
y_return_grace_string=y_return_grace_string, norm=norm)
+        write_multi_header(data, file=file, spin_id=spin_id, 
x_data_type=x_data_type, y_data_type=y_data_type, 
x_return_units=x_return_units, y_return_units=y_return_units, 
x_return_grace_string=x_return_grace_string, 
y_return_grace_string=y_return_grace_string, norm=norm)
 
         # Write the data.
         write_multi_data(data, file=file, graph_type=graph_type, norm=norm)
@@ -326,7 +326,7 @@
     # Single data set.
     else:
         # Write the header.
-        write_header(file=file, x_data_type=x_data_type, 
y_data_type=y_data_type, x_return_units=x_return_units, 
y_return_units=y_return_units, x_return_grace_string=x_return_grace_string, 
y_return_grace_string=y_return_grace_string)
+        write_header(file=file, spin_id=spin_id, x_data_type=x_data_type, 
y_data_type=y_data_type, x_return_units=x_return_units, 
y_return_units=y_return_units, x_return_grace_string=x_return_grace_string, 
y_return_grace_string=y_return_grace_string)
 
         # Write the data.
         write_data(data, file=file, graph_type=graph_type)
@@ -386,11 +386,13 @@
     file.write("&\n")
 
 
-def write_header(file=None, x_data_type=None, y_data_type=None, 
x_return_units=None, y_return_units=None, x_return_grace_string=None, 
y_return_grace_string=None):
+def write_header(file=None, spin_id=None, x_data_type=None, 
y_data_type=None, x_return_units=None, y_return_units=None, 
x_return_grace_string=None, y_return_grace_string=None):
     """Write the grace header.
 
     @keyword file:                  The file object to write the data to.
     @type file:                     file object
+    @keyword spin_id:               The spin identification string.
+    @type spin_id:                  str
     @keyword x_data_type:           The category of the X-axis data.
     @type x_data_type:              str
     @keyword y_data_type:           The category of the Y-axis data.
@@ -415,7 +417,7 @@
     # X-axis set up.
     if x_data_type == 'spin':
         # Determine the sequence data type.
-        seq_type = determine_seq_type(data)
+        seq_type = determine_seq_type(data, spin_id=spin_id)
 
         # Residue only data.
         if seq_type == 'res':
@@ -550,13 +552,15 @@
         file.write("&\n")
 
 
-def write_multi_header(data, file=None, x_data_type=None, y_data_type=None, 
x_return_units=None, y_return_units=None, x_return_grace_string=None, 
y_return_grace_string=None, norm=False):
+def write_multi_header(data, file=None, spin_id=None, x_data_type=None, 
y_data_type=None, x_return_units=None, y_return_units=None, 
x_return_grace_string=None, y_return_grace_string=None, norm=False):
     """Write the grace header.
 
     @param data:                    The graph numerical data.
     @type data:                     list of lists of float
     @keyword file:                  The file object to write the data to.
     @type file:                     file object
+    @keyword spin_id:               The spin identification string.
+    @type spin_id:                  str
     @keyword x_data_type:           The category of the X-axis data.
     @type x_data_type:              str
     @keyword y_data_type:           The category of the Y-axis data.
@@ -584,7 +588,7 @@
     # X-axis set up.
     if x_data_type == 'spin':
         # Determine the sequence data type.
-        seq_type = determine_seq_type(data)
+        seq_type = determine_seq_type(data, spin_id=spin_id)
 
         # Residue only data.
         if seq_type == 'res':




Related Messages


Powered by MHonArc, Updated Wed Sep 24 19:20:01 2008