mailr24680 - in /branches/zooming_grid_search/test_suite/system_tests: model_free.py scripts/model_free/opt_tm_fns.py


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

Header


Content

Posted by edward on July 23, 2014 - 16:51:
Author: bugman
Date: Wed Jul 23 16:51:11 2014
New Revision: 24680

URL: http://svn.gna.org/viewcvs/relax?rev=24680&view=rev
Log:
Created two new model-free system tests.

These are Mf.test_m0_grid_with_grid_search and 
Mf.test_m0_grid_vs_m1_with_grid_search.  Their aim is
to better test the grid search in a model-free analysis when parameters are 
preset.


Modified:
    branches/zooming_grid_search/test_suite/system_tests/model_free.py
    
branches/zooming_grid_search/test_suite/system_tests/scripts/model_free/opt_tm_fns.py

Modified: branches/zooming_grid_search/test_suite/system_tests/model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/test_suite/system_tests/model_free.py?rev=24680&r1=24679&r2=24680&view=diff
==============================================================================
--- branches/zooming_grid_search/test_suite/system_tests/model_free.py  
(original)
+++ branches/zooming_grid_search/test_suite/system_tests/model_free.py  Wed 
Jul 23 16:51:11 2014
@@ -856,12 +856,36 @@
         self.script_exec(status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'model_free'+sep+'opt_tm0_grid.py')
 
 
+    def test_m0_grid_with_grid_search(self):
+        """Test the optimisation of the m0 model-free model against the tm0 
parameter grid, testing the grid search."""
+
+        # Initialise.
+        cdp._model = 'm0'
+        cdp._value_test = self.value_test
+        cdp._grid_search = True
+
+        # Setup the data pipe for optimisation.
+        self.script_exec(status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'model_free'+sep+'opt_tm0_grid.py')
+
+
     def test_m0_grid_vs_m1(self):
         """Test the optimisation of the m1 model-free model against the tm0 
parameter grid."""
 
         # Initialise.
         cdp._model = 'm1'
         cdp._value_test = self.value_test
+
+        # Setup the data pipe for optimisation.
+        self.script_exec(status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'model_free'+sep+'opt_tm0_grid.py')
+
+
+    def test_m0_grid_vs_m1_with_grid_search(self):
+        """Test the optimisation of the m1 model-free model against the tm0 
parameter grid."""
+
+        # Initialise.
+        cdp._model = 'm1'
+        cdp._value_test = self.value_test
+        cdp._grid_search = True
 
         # Setup the data pipe for optimisation.
         self.script_exec(status.install_path + 
sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'model_free'+sep+'opt_tm0_grid.py')

Modified: 
branches/zooming_grid_search/test_suite/system_tests/scripts/model_free/opt_tm_fns.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/test_suite/system_tests/scripts/model_free/opt_tm_fns.py?rev=24680&r1=24679&r2=24680&view=diff
==============================================================================
--- 
branches/zooming_grid_search/test_suite/system_tests/scripts/model_free/opt_tm_fns.py
       (original)
+++ 
branches/zooming_grid_search/test_suite/system_tests/scripts/model_free/opt_tm_fns.py
       Wed Jul 23 16:51:11 2014
@@ -139,6 +139,8 @@
         spin.rex = rex / (2.0 * pi * cdp.spectrometer_frq[cdp.ri_ids[0]])**2
 
     # Minimise.
+    if hasattr(cdp, '_grid_search') and cdp._grid_search:
+        interpreter.minimise.grid_search(inc=2)
     interpreter.minimise.execute('newton', 'gmw', 'back', constraints=False)
 
     # Check the values.




Related Messages


Powered by MHonArc, Updated Wed Jul 23 17:40:02 2014