Author: bugman Date: Fri Jul 18 11:51:54 2014 New Revision: 24566 URL: http://svn.gna.org/viewcvs/relax?rev=24566&view=rev Log: Modified the specific analysis parameter object grid_lower() and grid_upper() methods. These now accept the model information from the model_loop() API method and send that into an grid lower and upper functions. These functions will require the information to pull out the correct spin, spin cluster, or other information from the current data pipe to determine what the bounds should be. Modified: branches/zooming_grid_search/specific_analyses/parameter_object.py Modified: branches/zooming_grid_search/specific_analyses/parameter_object.py URL: http://svn.gna.org/viewcvs/relax/branches/zooming_grid_search/specific_analyses/parameter_object.py?rev=24566&r1=24565&r2=24566&view=diff ============================================================================== --- branches/zooming_grid_search/specific_analyses/parameter_object.py (original) +++ branches/zooming_grid_search/specific_analyses/parameter_object.py Fri Jul 18 11:51:54 2014 @@ -532,13 +532,15 @@ return self._err[name] - def grid_lower(self, name): + def grid_lower(self, name, model_info=None): """Return the default lower grid bound for the parameter. - @param name: The name of the parameter. - @type name: str - @return: The lower bound for the grid search. - @rtype: int + @param model_info: The model information from the model_loop() specific API method. If the lower bound is a function, this information is sent into it. + @type model_info: int + @param name: The name of the parameter. + @type name: str + @return: The lower bound for the grid search. + @rtype: int """ # Parameter check. @@ -546,19 +548,21 @@ # Call any function or method. if isinstance(self._grid_lower[name], FunctionType) or isinstance(self._grid_lower[name], MethodType): - return self._grid_lower[name]() + return self._grid_lower[name](model_info) # Return the value. return self._grid_lower[name] - def grid_upper(self, name): + def grid_upper(self, name, model_info=None): """Return the default upper grid bound for the parameter. - @param name: The name of the parameter. - @type name: str - @return: The upper bound for the grid search. - @rtype: int + @param model_info: The model information from the model_loop() specific API method. If the upper bound is a function, this information is sent into it. + @type model_info: int + @param name: The name of the parameter. + @type name: str + @return: The upper bound for the grid search. + @rtype: int """ # Parameter check. @@ -566,7 +570,7 @@ # Call any function or method. if isinstance(self._grid_upper[name], FunctionType) or isinstance(self._grid_upper[name], MethodType): - return self._grid_upper[name]() + return self._grid_upper[name](model_info) # Return the value. return self._grid_upper[name]