mailr10831 - /branches/multi_processor_merge/specific_fns/model_free/multi_processor_commands.py


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

Header


Content

Posted by edward on February 22, 2010 - 22:42:
Author: bugman
Date: Mon Feb 22 22:42:39 2010
New Revision: 10831

URL: http://svn.gna.org/viewcvs/relax?rev=10831&view=rev
Log:
The subdivided grid search is now activated in the MF_grid_command class.


Modified:
    
branches/multi_processor_merge/specific_fns/model_free/multi_processor_commands.py

Modified: 
branches/multi_processor_merge/specific_fns/model_free/multi_processor_commands.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_processor_merge/specific_fns/model_free/multi_processor_commands.py?rev=10831&r1=10830&r2=10831&view=diff
==============================================================================
--- 
branches/multi_processor_merge/specific_fns/model_free/multi_processor_commands.py
 (original)
+++ 
branches/multi_processor_merge/specific_fns/model_free/multi_processor_commands.py
 Mon Feb 22 22:42:39 2010
@@ -31,7 +31,7 @@
 # relax module imports.
 from maths_fns.mf import Mf
 from minfx.generic import generic_minimise
-from minfx.grid import grid
+from minfx.grid import grid, grid_point_array
 from multi.processor import Capturing_exception, Memo, Result_command, 
Result_string, Slave_command
 
 
@@ -184,8 +184,13 @@
         @rtype:     tuple of numpy array, float, int, int, int, int, str
         """
 
-        # Grid search.
-        results = grid(func=self.mf.func, args=(), 
num_incs=self.opt_params.inc, lower=self.opt_params.lower, 
upper=self.opt_params.upper, A=self.opt_params.A, b=self.opt_params.b, 
verbosity=self.opt_params.verbosity)
+        # Normal grid search.
+        if not hasattr(self.opt_params, 'subdivision'):
+            results = grid(func=self.mf.func, args=(), 
num_incs=self.opt_params.inc, lower=self.opt_params.lower, 
upper=self.opt_params.upper, A=self.opt_params.A, b=self.opt_params.b, 
verbosity=self.opt_params.verbosity)
+
+        # Subdivided grid.
+        else:
+            results = grid_point_array(func=self.mf.func, args=(), 
points=self.opt_params.subdivision, verbosity=self.opt_params.verbosity)
 
         # Unpack the results.
         param_vector, func, iter, warning = results




Related Messages


Powered by MHonArc, Updated Tue Feb 23 00:40:02 2010