Author: bugman Date: Fri Apr 5 18:44:48 2013 New Revision: 19393 URL: http://svn.gna.org/viewcvs/relax?rev=19393&view=rev Log: Parameter scaling is now functional in the target_function.relax_fit.c code. Previously the scaling was not being used and the Python to C conversion was broken. Modified: trunk/target_functions/relax_fit.c Modified: trunk/target_functions/relax_fit.c URL: http://svn.gna.org/viewcvs/relax/trunk/target_functions/relax_fit.c?rev=19393&r1=19392&r2=19393&view=diff ============================================================================== --- trunk/target_functions/relax_fit.c (original) +++ trunk/target_functions/relax_fit.c Fri Apr 5 18:44:48 2013 @@ -83,7 +83,7 @@ /* Place the scaling matrix elements into the C array */ for (i = 0; i < num_params; i++) { /* Get the element */ - element = PySequence_GetItem(values_arg, i); + element = PySequence_GetItem(scaling_matrix_arg, i); /* Convert to a C double */ scaling_matrix[i] = PyFloat_AsDouble(element); @@ -119,6 +119,9 @@ /* Convert to a C double */ params[i] = PyFloat_AsDouble(element); + + /* Scale the parameter */ + params[i] = params[i] * scaling_matrix[i, i]; } /* Back calculated the peak intensities */