Author: bugman Date: Thu Apr 11 19:01:06 2013 New Revision: 19471 URL: http://svn.gna.org/viewcvs/relax?rev=19471&view=rev Log: Fixes for the spin clustering for relaxation dispersion. Both optimisation and Monte Carlo simulations were affected by these bugs. Modified: branches/relax_disp/specific_analyses/relax_disp.py Modified: branches/relax_disp/specific_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp.py?rev=19471&r1=19470&r2=19471&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp.py (original) +++ branches/relax_disp/specific_analyses/relax_disp.py Thu Apr 11 19:01:06 2013 @@ -984,7 +984,7 @@ spin_index = int(index / 2 / cdp.curve_count) # The curve index and key. - exp_index = int((index - spin_index * 2) / 2) + exp_index = int((index - spin_index * cdp.curve_count * 2) / 2) curve_key = self._exp_curve_key_from_index(exp_index) # All other parameters. @@ -1298,7 +1298,7 @@ # Get the grid search minimisation options. lower_new, upper_new = None, None if match('^[Gg]rid', min_algor): - grid_size, inc, lower_new, upper_new, sparseness = self._grid_search_setup(spins=spins, param_vector=param_vector, lower=lower, upper=upper, inc=inc, scaling_matrix=scaling_matrix) + grid_size, inc_new, lower_new, upper_new, sparseness = self._grid_search_setup(spins=spins, param_vector=param_vector, lower=lower, upper=upper, inc=inc, scaling_matrix=scaling_matrix) # Linear constraints. A, b = None, None @@ -1322,7 +1322,7 @@ # Grid search. if search('^[Gg]rid', min_algor): - results = grid(func=model.func, args=(), num_incs=inc, lower=lower_new, upper=upper_new, A=A, b=b, sparseness=sparseness, verbosity=verbosity) + results = grid(func=model.func, args=(), num_incs=inc_new, lower=lower_new, upper=upper_new, A=A, b=b, sparseness=sparseness, verbosity=verbosity) # Unpack the results. param_vector, chi2, iter_count, warning = results