Author: bugman Date: Tue Sep 22 15:00:25 2009 New Revision: 9560 URL: http://svn.gna.org/viewcvs/relax?rev=9560&view=rev Log: Another clean out of the grid search setup. Modified: 1.3/specific_fns/relax_fit.py Modified: 1.3/specific_fns/relax_fit.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/relax_fit.py?rev=9560&r1=9559&r2=9560&view=diff ============================================================================== --- 1.3/specific_fns/relax_fit.py (original) +++ 1.3/specific_fns/relax_fit.py Tue Sep 22 15:00:25 2009 @@ -454,32 +454,30 @@ elif isinstance(inc, int): inc = [inc]*n - # Minimisation options initialisation. - default_bounds = False + # Set up the default bounds. if not lower: + # Init. lower = [] - default_bounds = True - if not upper: upper = [] - j = 0 - - # Loop over the parameters. - for i in xrange(len(spin.params)): - # Relaxation rate (from 0 to 20 s^-1). - if spin.params[i] == 'Rx' and default_bounds: - lower.append(0.0) - upper.append(20.0) - - # Intensity - elif search('^I', spin.params[i]) and default_bounds: - # Find the position of the first time point. - pos = cdp.relax_times.index(min(cdp.relax_times)) - - # Defaults. - lower.append(0.0) - upper.append(average(spin.intensities[pos])) - - # Parameter scaling. + + # Loop over the parameters. + for i in range(n): + # Relaxation rate (from 0 to 20 s^-1). + if spin.params[i] == 'Rx': + lower.append(0.0) + upper.append(20.0) + + # Intensity + elif search('^I', spin.params[i]): + # Find the position of the first time point. + pos = cdp.relax_times.index(min(cdp.relax_times)) + + # Defaults. + lower.append(0.0) + upper.append(average(spin.intensities[pos])) + + # Parameter scaling. + for i in range(n): lower[i] = lower[i] / scaling_matrix[i, i] upper[i] = upper[i] / scaling_matrix[i, i]