mailr26890 - /branches/relax_fit_c_class/test_suite/system_tests/relax_disp.py


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

Header


Content

Posted by edward on December 02, 2014 - 12:15:
Author: bugman
Date: Tue Dec  2 12:15:20 2014
New Revision: 26890

URL: http://svn.gna.org/viewcvs/relax?rev=26890&view=rev
Log:
Fix for the Relax_disp.test_finite_value system test.

For the rate of -500, the C module should return inf, as is now does.  
Therefore the system test has
been renamed to Relax_disp.test_infinite_value.


Modified:
    branches/relax_fit_c_class/test_suite/system_tests/relax_disp.py

Modified: branches/relax_fit_c_class/test_suite/system_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_fit_c_class/test_suite/system_tests/relax_disp.py?rev=26890&r1=26889&r2=26890&view=diff
==============================================================================
--- branches/relax_fit_c_class/test_suite/system_tests/relax_disp.py    
(original)
+++ branches/relax_fit_c_class/test_suite/system_tests/relax_disp.py    Tue 
Dec  2 12:15:20 2014
@@ -3720,26 +3720,6 @@
         self.assert_('test' not in cdp.clustering)
         self.assertEqual(cdp.clustering['free spins'], [':2@N'])
         self.assertEqual(cdp.clustering['cluster'], [':1@N', ':3@N'])
-
-
-    def test_finite_value(self):
-        """Test return from C code, when parameters are wrong.  This can 
happen, if minfx takes a wrong step."""
-
-        times = array([ 0.7,  1.,  0.8,  0.4,  0.9])
-        I = array([ 476.76174875,  372.43328777,  454.20339981,  
656.87936253,  419.16726341])
-        errors = array([  9.48032653,  11.34093541,   9.35149017,  
10.84867928,  12.17590736])
-
-        scaling_list = [1.0, 1.0]
-        model = Relax_fit(model='exp', num_params=2, num_times=len(times), 
values=I, sd=errors, relax_times=times, scaling_matrix=scaling_list)
-
-        R = - 500.
-        I0 = 1000.
-        params = array([R, I0])
-
-        chi2 = model.func(params)
-
-        print("The chi2 value returned from C-code for R=%3.2f and I0=%3.2f, 
then chi2=%3.2f"%(R, I0, chi2))
-        self.assertNotEqual(chi2, inf)
 
 
     def test_hansen_catia_input(self):
@@ -4948,6 +4928,26 @@
             self.assertEqual(spin2[i], lines[i])
 
 
+    def test_infinite_value(self):
+        """Test return from C code, when parameters are wrong.  This can 
happen, if minfx takes a wrong step."""
+
+        times = array([ 0.7,  1.,  0.8,  0.4,  0.9])
+        I = array([ 476.76174875,  372.43328777,  454.20339981,  
656.87936253,  419.16726341])
+        errors = array([  9.48032653,  11.34093541,   9.35149017,  
10.84867928,  12.17590736])
+
+        scaling_list = [1.0, 1.0]
+        model = Relax_fit(model='exp', num_params=2, num_times=len(times), 
values=I, sd=errors, relax_times=times, scaling_matrix=scaling_list)
+
+        R = - 500.
+        I0 = 1000.
+        params = array([R, I0])
+
+        chi2 = model.func(params)
+
+        print("The chi2 value returned from C-code for R=%3.2f and I0=%3.2f, 
then chi2=%3.2f"%(R, I0, chi2))
+        self.assertEqual(chi2, inf)
+
+
     def test_korzhnev_2005_15n_dq_data(self):
         """Optimisation of the Korzhnev et al., 2005 15N DQ CPMG data using 
the 'NS MMQ 2-site' model.
 




Related Messages


Powered by MHonArc, Updated Tue Dec 02 12:40:02 2014