mailr12666 - in /branches/relax_data: generic_fns/relax_data.py prompt/relax_data.py


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

Header


Content

Posted by edward on March 01, 2011 - 18:27:
Author: bugman
Date: Tue Mar  1 18:27:24 2011
New Revision: 12666

URL: http://svn.gna.org/viewcvs/relax?rev=12666&view=rev
Log:
Converted the relax_data.temp_calibration() user function back and front end 
to the new design.


Modified:
    branches/relax_data/generic_fns/relax_data.py
    branches/relax_data/prompt/relax_data.py

Modified: branches/relax_data/generic_fns/relax_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_data/generic_fns/relax_data.py?rev=12666&r1=12665&r2=12666&view=diff
==============================================================================
--- branches/relax_data/generic_fns/relax_data.py (original)
+++ branches/relax_data/generic_fns/relax_data.py Tue Mar  1 18:27:24 2011
@@ -812,15 +812,12 @@
     cdp.exp_info.temp_calibration_setup(ri_id, method)
 
 
-
-def temp_control(ri_label=None, frq_label=None, method=None):
+def temp_control(ri_id=None, method=None):
     """Set the temperature control method.
 
-    @param ri_label:    The relaxation data type, ie 'R1', 'R2', or 'NOE'.
-    @type ri_label:     str
-    @param frq_label:   The field strength label.
-    @type frq_label:    str
-    @param method:      The temperature control method.
+    @keyword ri_id:     The relaxation data ID string.
+    @type ri_id:        str
+    @keyword method:    The temperature control method.
     @type method:       str
     """
 
@@ -831,10 +828,9 @@
     if not exists_mol_res_spin_data():
         raise RelaxNoSequenceError
 
-    # Test if relaxation data corresponding to 'ri_label' and 'frq_label' 
already exists.
-    if not test_labels(ri_label, frq_label):
-        raise RelaxNoRiError(ri_label, frq_label)
-
+    # Test if data exists.
+    if not hasattr(cdp, 'ri_ids') or ri_id not in cdp.ri_ids:
+        raise RelaxNoRiError(ri_id)
 
     # Check the values, and warn if not in the list.
     valid = ['single scan interleaving', 'temperature compensation block', 
'single scan interleaving and temperature compensation block', 'single fid 
interleaving', 'single experiment interleaving', 'no temperature control 
applied']
@@ -846,7 +842,7 @@
         cdp.exp_info = ExpInfo()
 
     # Store the method.
-    cdp.exp_info.temp_control_setup(ri_label, frq_label, method)
+    cdp.exp_info.temp_control_setup(ri_id, method)
 
 
 def update_data_structures_spin(spin=None, ri_label=None, frq_label=None, 
frq=None, value=None, error=None):

Modified: branches/relax_data/prompt/relax_data.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_data/prompt/relax_data.py?rev=12666&r1=12665&r2=12666&view=diff
==============================================================================
--- branches/relax_data/prompt/relax_data.py (original)
+++ branches/relax_data/prompt/relax_data.py Tue Mar  1 18:27:24 2011
@@ -380,15 +380,13 @@
         relax_data.temp_calibration(ri_id=ri_id, method=method)
 
 
-    def temp_control(self, ri_label=None, frq_label=None, method=None):
+    def temp_control(self, ri_id=None, frq_id=None, method=None):
         """Specify the temperature control method used.
 
         Keyword Arguments
         ~~~~~~~~~~~~~~~~~
 
-        ri_label:  The relaxation data type, ie 'R1', 'R2', or 'NOE'.
-
-        frq_label:  The field strength label.
+        ri_id:  The relaxation data ID string.
 
         method:  The control method.
 
@@ -410,18 +408,16 @@
         # Function intro text.
         if self._exec_info.intro:
             text = self._exec_info.ps3 + "relax_data.temp_control("
-            text = text + "ri_label=" + repr(ri_label)
-            text = text + ", frq_label=" + repr(frq_label)
+            text = text + "ri_id=" + repr(ri_id)
             text = text + ", method=" + repr(method) + ")"
             print(text)
 
         # The argument checks.
-        arg_check.is_str(ri_label, 'relaxation label')
-        arg_check.is_str(frq_label, 'frequency label')
+        arg_check.is_str(ri_id, 'relaxation label')
         arg_check.is_str(method, 'temperature control method')
 
         # Execute the functional code.
-        relax_data.temp_control(ri_label=ri_label, frq_label=frq_label, 
method=method)
+        relax_data.temp_control(ri_id=ri_id, method=method)
 
 
     def write(self, ri_label=None, frq_label=None, file=None, dir=None, 
force=False):




Related Messages


Powered by MHonArc, Updated Tue Mar 01 18:40:01 2011