Author: bugman Date: Thu Jul 24 11:24:26 2014 New Revision: 24698 URL: http://svn.gna.org/viewcvs/relax?rev=24698&view=rev Log: Completed the Relax_fit.test_zooming_grid_search system test. Now only a single spin is optimised. The zooming levels increase in integer increments from 0 to 50 so that the final zoomed grid is insanely small (as the curve-fitting C modules are incredibly fast, this test is nevertheless relatively quick). The final zooming grid search parameter values are checked to see if they are the same as those optimised in the Relax_fit.test_curve_fitting_height system test to demonstrate the success of the algorithm. Modified: branches/zooming_grid_search/test_suite/system_tests/relax_fit.py branches/zooming_grid_search/test_suite/system_tests/scripts/relax_fit_zooming_grid.py Modified: branches/zooming_grid_search/test_suite/system_tests/relax_fit.py URL: http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/test_suite/system_tests/relax_fit.py?rev=24698&r1=24697&r2=24698&view=diff ============================================================================== --- branches/zooming_grid_search/test_suite/system_tests/relax_fit.py (original) +++ branches/zooming_grid_search/test_suite/system_tests/relax_fit.py Thu Jul 24 11:24:26 2014 @@ -27,7 +27,7 @@ # relax module imports. from data_store import Relax_data_store; ds = Relax_data_store() import dep_check -from pipe_control.mol_res_spin import spin_index_loop, spin_loop +from pipe_control.mol_res_spin import return_spin, spin_index_loop, spin_loop from pipe_control import pipes from lib.errors import RelaxError from status import Status; status = Status() @@ -250,4 +250,8 @@ # Execute the script. self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'relax_fit_zooming_grid.py') - # Check the curve-fitting results. + # Check the curve-fitting results (the values are from the optimisation of test_curve_fitting_height()). + spin = return_spin(":4@N") + self.assertAlmostEqual(spin.chi2, 2.9169526515678883) + self.assertAlmostEqual(spin.rx, 8.0814894974893967) + self.assertAlmostEqual(spin.i0/1e6, 1996050.9699629977/1e6) Modified: branches/zooming_grid_search/test_suite/system_tests/scripts/relax_fit_zooming_grid.py URL: http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/test_suite/system_tests/scripts/relax_fit_zooming_grid.py?rev=24698&r1=24697&r2=24698&view=diff ============================================================================== --- branches/zooming_grid_search/test_suite/system_tests/scripts/relax_fit_zooming_grid.py (original) +++ branches/zooming_grid_search/test_suite/system_tests/scripts/relax_fit_zooming_grid.py Thu Jul 24 11:24:26 2014 @@ -78,7 +78,13 @@ # Set the relaxation curve type. relax_fit.select_model('exp') -# Zooming grid search. -for zoom in [0, 1, 2, 3]: - minimise.grid_search(inc=7) - minimise.grid_zoom(level=zoom) +# Only select a single spin for speed. +select.spin(':4', change_all=True) + +# Zooming grid search, starting with a zoom level of 0 for the original grid. +for zoom in range(50): + # Set the zoom level. + minimise.grid_zoom(level=zoom/0.5) + + # The grid search. + minimise.grid_search(inc=11)