Author: bugman Date: Mon Jul 2 12:03:02 2012 New Revision: 17115 URL: http://svn.gna.org/viewcvs/relax?rev=17115&view=rev Log: Partial fix for bug #19887 (https://gna.org/bugs/?19887). The problem is that the number of peak height values was not the same for all spins! The error message was being caused by the math_fns.relax_fit C object 'setup' function being feed in incorrect values, causing relax to fail directly after the setup() call in specific_fns.relax_fit.minimise(). The number of points was being taken from cdp.relax_times, but in the Relax_fit.test_bug_19887_curvefit_fail system test, one of the 3 spins has 4 points rather than 5. Now the correct number is sent into setup(). Modified: trunk/specific_fns/relax_fit.py Modified: trunk/specific_fns/relax_fit.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_fns/relax_fit.py?rev=17115&r1=17114&r2=17115&view=diff ============================================================================== --- trunk/specific_fns/relax_fit.py (original) +++ trunk/specific_fns/relax_fit.py Mon Jul 2 12:03:02 2012 @@ -707,7 +707,7 @@ # The relaxation times. times.append(cdp.relax_times[key]) - setup(num_params=len(spin.params), num_times=len(cdp.relax_times), values=values, sd=errors, relax_times=times, scaling_matrix=scaling_matrix.tolist()) + setup(num_params=len(spin.params), num_times=len(values), values=values, sd=errors, relax_times=times, scaling_matrix=scaling_matrix.tolist()) # Setup the minimisation algorithm when constraints are present.