mailr9962 - in /1.3: prompt/consistency_tests.py specific_fns/consistency_tests.py


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

Header


Content

Posted by edward on November 25, 2009 - 10:02:
Author: bugman
Date: Wed Nov 25 10:02:55 2009
New Revision: 9962

URL: http://svn.gna.org/viewcvs/relax?rev=9962&view=rev
Log:
Removal of set_frq() from the consistency testing analysis specific API.


Modified:
    1.3/prompt/consistency_tests.py
    1.3/specific_fns/consistency_tests.py

Modified: 1.3/prompt/consistency_tests.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/consistency_tests.py?rev=9962&r1=9961&r2=9962&view=diff
==============================================================================
--- 1.3/prompt/consistency_tests.py (original)
+++ 1.3/prompt/consistency_tests.py Wed Nov 25 10:02:55 2009
@@ -70,4 +70,4 @@
         check.is_num(frq, 'spectrometer frequency')
 
         # Execute the functional code.
-        consistency_tests_obj.set_frq(frq=frq)
+        consistency_tests_obj._set_frq(frq=frq)

Modified: 1.3/specific_fns/consistency_tests.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/consistency_tests.py?rev=9962&r1=9961&r2=9962&view=diff
==============================================================================
--- 1.3/specific_fns/consistency_tests.py (original)
+++ 1.3/specific_fns/consistency_tests.py Wed Nov 25 10:02:55 2009
@@ -36,6 +36,29 @@
 class Consistency_tests(API_base):
     """Class containing functions specific to consistency testing."""
 
+    def _set_frq(self, frq=None):
+        """Function for selecting which relaxation data to use in the 
consistency tests."""
+
+        # Test if the current pipe exists.
+        pipes.test()
+
+        # Test if the pipe type is set to 'ct'.
+        function_type = cdp.pipe_type
+        if function_type != 'ct':
+            raise 
RelaxFuncSetupError(specific_fns.setup.get_string(function_type))
+
+        # Test if the frequency has been set.
+        if hasattr(cdp, 'ct_frq'):
+            raise RelaxError("The frequency for the run has already been 
set.")
+
+        # Create the data structure if it doesn't exist.
+        if not hasattr(cdp, 'ct_frq'):
+            cdp.ct_frq = {}
+
+        # Set the frequency.
+        cdp.ct_frq = frq
+
+
     def calculate(self, verbosity=1, sim_index=None, spin_id=None):
         """Calculation of the consistency functions."""
 
@@ -477,29 +500,6 @@
         """
 
 
-    def set_frq(self, frq=None):
-        """Function for selecting which relaxation data to use in the 
consistency tests."""
-
-        # Test if the current pipe exists.
-        pipes.test()
-
-        # Test if the pipe type is set to 'ct'.
-        function_type = cdp.pipe_type
-        if function_type != 'ct':
-            raise 
RelaxFuncSetupError(specific_fns.setup.get_string(function_type))
-
-        # Test if the frequency has been set.
-        if hasattr(cdp, 'ct_frq'):
-            raise RelaxError("The frequency for the run has already been 
set.")
-
-        # Create the data structure if it doesn't exist.
-        if not hasattr(cdp, 'ct_frq'):
-            cdp.ct_frq = {}
-
-        # Set the frequency.
-        cdp.ct_frq = frq
-
-
     def set_error(self, spin, index, error):
         """Function for setting parameter errors."""
 




Related Messages


Powered by MHonArc, Updated Wed Nov 25 10:20:05 2009