Author: bugman Date: Fri Oct 2 12:15:57 2015 New Revision: 27945 URL: http://svn.gna.org/viewcvs/relax?rev=27945&view=rev Log: Merged revisions 24715-24717 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_cleanup ........ r24715 | bugman | 2014-07-24 16:47:36 +0200 (Thu, 24 Jul 2014) | 5 lines Turned on the optimisation in the Frame_order.test_cam_rigid system test. This is to catch a number of failures in the frame order grid search. ........ r24716 | bugman | 2014-07-24 16:50:44 +0200 (Thu, 24 Jul 2014) | 5 lines Activated the grid search in the frame order system tests using the CaM synthetic data. This is set to one increment so that the tests can complete in a reasonable time. ........ r24717 | bugman | 2014-07-24 16:53:06 +0200 (Thu, 24 Jul 2014) | 6 lines Fix for the specific_analyses.frame_order.optimisation.grid_row() function. This can now handle the case of a single grid increment. The change is similar to r163 in the minfx project (https://mail.gna.org/public/minfx-commits/2014-07/msg00015.html). ........ Modified: trunk/ (props changed) trunk/specific_analyses/frame_order/optimisation.py trunk/test_suite/system_tests/frame_order.py trunk/test_suite/system_tests/scripts/frame_order/cam/base_script.py Propchange: trunk/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Fri Oct 2 12:15:57 2015 @@ -1 +1 @@ -/branches/frame_order_cleanup:1-23195,23197-23205,23208-23646,23650-23673,23682-23709,23713-23783,23807-23812,23856-23887,23935-23983,23985-24322,24327-24346,24352-24411,24433-24509,24514-24520,24522-24524,24530-24539,24560-24667,24709-24713 +/branches/frame_order_cleanup:1-23195,23197-23205,23208-23646,23650-23673,23682-23709,23713-23783,23807-23812,23856-23887,23935-23983,23985-24322,24327-24346,24352-24411,24433-24509,24514-24520,24522-24524,24530-24539,24560-24667,24709-24713,24715-24717 Modified: trunk/specific_analyses/frame_order/optimisation.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/frame_order/optimisation.py?rev=27945&r1=27944&r2=27945&view=diff ============================================================================== --- trunk/specific_analyses/frame_order/optimisation.py (original) +++ trunk/specific_analyses/frame_order/optimisation.py Fri Oct 2 12:15:57 2015 @@ -73,24 +73,33 @@ # Linear grid. if dist_type == None: + # Handle a single increment. + if incs == 1: + row.append((lower + upper) / 2.0) + # Loop over the increments. - for i in range(incs): - # The row. - row.append(lower + i * (upper - lower) / (incs - 1.0)) + else: + for i in range(incs): + row.append(lower + i * (upper - lower) / (incs - 1.0)) # Inverse cos distribution. elif dist_type == 'acos': + # Handle a single increment. + if incs == 1: + row.append((lower + upper) / 2.0) + # Generate the increment values of v from cos(upper) to cos(lower). - v = zeros(incs, float64) - val = (cos(lower) - cos(upper)) / (incs - 1.0) - for i in range(incs): - v[-i-1] = cos(upper) + float(i) * val - - # Generate the distribution. - row = arccos(v) + else: + v = zeros(incs, float64) + val = (cos(lower) - cos(upper)) / (incs - 1.0) + for i in range(incs): + v[-i-1] = cos(upper) + float(i) * val + + # Generate the distribution. + row = arccos(v) # Remove the last point. - if not end_point: + if incs != 1 and not end_point: row = row[:-1] # Return the row (as a list). Modified: trunk/test_suite/system_tests/frame_order.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/frame_order.py?rev=27945&r1=27944&r2=27945&view=diff ============================================================================== --- trunk/test_suite/system_tests/frame_order.py (original) +++ trunk/test_suite/system_tests/frame_order.py Fri Oct 2 12:15:57 2015 @@ -575,7 +575,7 @@ """Test the rigid frame order model of CaM.""" # The flags, execute the script, and then check the chi2 value. - self.flags() + self.flags(opt=True) self.interpreter.run(script_file=self.cam_path+'rigid.py') self.check_chi2(0.081171019382935666) Modified: trunk/test_suite/system_tests/scripts/frame_order/cam/base_script.py URL: http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/frame_order/cam/base_script.py?rev=27945&r1=27944&r2=27945&view=diff ============================================================================== --- trunk/test_suite/system_tests/scripts/frame_order/cam/base_script.py (original) +++ trunk/test_suite/system_tests/scripts/frame_order/cam/base_script.py Fri Oct 2 12:15:57 2015 @@ -196,8 +196,8 @@ # Optimise. if hasattr(status, 'flag_opt') and status.flag_opt: - #self._execute_uf(uf_name='grid_search', inc=11) - self._execute_uf(uf_name='minimise', min_algor='simplex', constraints=True, max_iter=1) + self._execute_uf(uf_name='minimise.grid_search', inc=1) + self._execute_uf(uf_name='minimise.execute', min_algor='simplex', constraints=True, max_iter=1) # Test Monte Carlo simulations. self._execute_uf(uf_name='monte_carlo.setup', number=3)