mailr7175 - in /branches/rdc_analysis/test_suite/unit_tests: _maths_fns/test_n_state_model.py _specific_fns/test_n_state_model.py


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

Header


Content

Posted by edward on August 12, 2008 - 14:47:
Author: bugman
Date: Tue Aug 12 14:34:12 2008
New Revision: 7175

URL: http://svn.gna.org/viewcvs/relax?rev=7175&view=rev
Log:
Fixes for all the N-state model unit tests.


Modified:
    
branches/rdc_analysis/test_suite/unit_tests/_maths_fns/test_n_state_model.py
    
branches/rdc_analysis/test_suite/unit_tests/_specific_fns/test_n_state_model.py

Modified: 
branches/rdc_analysis/test_suite/unit_tests/_maths_fns/test_n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/test_suite/unit_tests/_maths_fns/test_n_state_model.py?rev=7175&r1=7174&r2=7175&view=diff
==============================================================================
--- 
branches/rdc_analysis/test_suite/unit_tests/_maths_fns/test_n_state_model.py 
(original)
+++ 
branches/rdc_analysis/test_suite/unit_tests/_maths_fns/test_n_state_model.py 
Tue Aug 12 14:34:12 2008
@@ -51,12 +51,12 @@
         full_in_ref_frame = [1, 1, 1]
 
         # Set up the class.
-        model = N_state_opt(N=2, init_params=init_params, 
full_tensors=full_tensors, red_data=red_data, red_errors=err, 
full_in_ref_frame=full_in_ref_frame)
+        model = N_state_opt(model='2-domain', N=2, init_params=init_params, 
full_tensors=full_tensors, red_data=red_data, red_errors=err, 
full_in_ref_frame=full_in_ref_frame)
 
         # Call the target function 3 times.
         for i in xrange(3):
             # Target function.
-            chi2 = model.func(init_params)
+            chi2 = model.func_2domain(init_params)
 
             # Test that the chi2 value is zero each time!
             self.assertEqual(chi2, 0.0)
@@ -81,12 +81,12 @@
         full_in_ref_frame = [1, 1, 1]
 
         # Set up the class.
-        model = N_state_opt(N=2, init_params=init_params, 
full_tensors=full_tensors, red_data=red_data, red_errors=err, 
full_in_ref_frame=full_in_ref_frame)
+        model = N_state_opt(model='2-domain', N=2, init_params=init_params, 
full_tensors=full_tensors, red_data=red_data, red_errors=err, 
full_in_ref_frame=full_in_ref_frame)
 
         # Call the target function 3 times.
         for i in xrange(3):
             # Target function.
-            chi2 = model.func(init_params)
+            chi2 = model.func_2domain(init_params)
 
             # Test that the chi2 value is zero each time!
             self.assertEqual(chi2, 1.0)
@@ -111,12 +111,12 @@
         full_in_ref_frame = [1, 1, 1]
 
         # Set up the class.
-        model = N_state_opt(N=2, init_params=init_params, 
full_tensors=full_tensors, red_data=red_data, red_errors=err, 
full_in_ref_frame=full_in_ref_frame)
+        model = N_state_opt(model='2-domain', N=2, init_params=init_params, 
full_tensors=full_tensors, red_data=red_data, red_errors=err, 
full_in_ref_frame=full_in_ref_frame)
 
         # Call the target function 3 times.
         for i in xrange(3):
             # Target function.
-            chi2 = model.func(init_params)
+            chi2 = model.func_2domain(init_params)
 
             # Test that the chi2 value is zero each time!
             self.assertAlmostEqual(chi2, 0.0)
@@ -141,12 +141,12 @@
         full_in_ref_frame = [1, 1, 1]
 
         # Set up the class.
-        model = N_state_opt(N=2, init_params=init_params, 
full_tensors=full_tensors, red_data=red_data, red_errors=err, 
full_in_ref_frame=full_in_ref_frame)
+        model = N_state_opt(model='2-domain', N=2, init_params=init_params, 
full_tensors=full_tensors, red_data=red_data, red_errors=err, 
full_in_ref_frame=full_in_ref_frame)
 
         # Call the target function 3 times.
         for i in xrange(3):
             # Target function.
-            chi2 = model.func(init_params)
+            chi2 = model.func_2domain(init_params)
 
             # Test that the chi2 value is zero each time!
             self.assertAlmostEqual(chi2, 0.0)

Modified: 
branches/rdc_analysis/test_suite/unit_tests/_specific_fns/test_n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/test_suite/unit_tests/_specific_fns/test_n_state_model.py?rev=7175&r1=7174&r2=7175&view=diff
==============================================================================
--- 
branches/rdc_analysis/test_suite/unit_tests/_specific_fns/test_n_state_model.py
 (original)
+++ 
branches/rdc_analysis/test_suite/unit_tests/_specific_fns/test_n_state_model.py
 Tue Aug 12 14:34:12 2008
@@ -37,8 +37,8 @@
     n_state_model_fns = n_state_model.N_state_model()
 
 
-    def test_assemble_param_vector(self):
-        """Test the operation of the 
specific_fns.n_state_model.assemble_param_vector() method."""
+    def test___assemble_param_vector(self):
+        """Test the operation of the 
specific_fns.n_state_model.__assemble_param_vector() method."""
 
         # Alias the current data pipe.
         cdp = ds[ds.current_pipe]
@@ -51,7 +51,7 @@
         cdp.gamma = [1.0, 3*pi/2, 2*pi]
 
         # Get the parameter vector.
-        param_vector = self.n_state_model_fns.assemble_param_vector()
+        param_vector = 
self.n_state_model_fns._N_state_model__assemble_param_vector()
 
         # The correct result.
         vector_true = [0.1, 0.3, 0.0, pi/2, 1.0, pi/2, pi, 3*pi/2, pi, 
3*pi/2, 2*pi]
@@ -62,8 +62,8 @@
             self.assertEqual(param_vector[i], vector_true[i])
 
 
-    def test_disassemble_param_vector(self):
-        """Test the operation of the 
specific_fns.n_state_model.disassemble_param_vector() method."""
+    def test___disassemble_param_vector(self):
+        """Test the operation of the 
specific_fns.n_state_model.__disassemble_param_vector() method."""
 
         # Alias the current data pipe.
         cdp = ds[ds.current_pipe]
@@ -79,7 +79,7 @@
         param_vector = [0.1, 0.3, 0.0, pi/2, 1.0, pi/2, pi, 3*pi/2, pi, 
3*pi/2, 2*pi]
 
         # Disassemble the parameter vector.
-        self.n_state_model_fns.disassemble_param_vector(param_vector)
+        
self.n_state_model_fns._N_state_model__disassemble_param_vector(param_vector)
 
         # Check the probabilities.
         self.assertEqual(cdp.probs, [0.1, 0.3, 0.6])




Related Messages


Powered by MHonArc, Updated Tue Aug 12 15:00:18 2008