Author: bugman Date: Fri Apr 11 09:57:14 2014 New Revision: 22711 URL: http://svn.gna.org/viewcvs/relax?rev=22711&view=rev Log: Simplified the pipe_control.minimise.minimise() function. The specific API object only needs to be fetched once. Modified: trunk/pipe_control/minimise.py Modified: trunk/pipe_control/minimise.py URL: http://svn.gna.org/viewcvs/relax/trunk/pipe_control/minimise.py?rev=22711&r1=22710&r2=22711&view=diff ============================================================================== --- trunk/pipe_control/minimise.py (original) +++ trunk/pipe_control/minimise.py Fri Apr 11 09:57:14 2014 @@ -183,12 +183,14 @@ # Test if the current data pipe exists. pipes.test() + # The specific analysis API object. + api = return_api() + # Re-package the minimisation algorithm, options, and constraints for the generic_minimise() calls within the specific code. if constraints: min_options = [min_algor] # Determine the constraint algorithm to use. - api = return_api() min_algor = api.constraint_algorithm() else: min_options = [] @@ -200,9 +202,6 @@ min_options.append(hessian_type) min_options = tuple(min_options) - # The specific analysis API object. - api = return_api() - # Deselect spins lacking data: api.overfit_deselect()