mailr25262 - /trunk/target_functions/relax_fit.c


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on August 26, 2014 - 09:18:
Author: bugman
Date: Tue Aug 26 09:18:02 2014
New Revision: 25262

URL: http://svn.gna.org/viewcvs/relax?rev=25262&view=rev
Log:
The exponential curve-fitting gradient is now scaled by the scaling matrix.


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=25262&r1=25261&r2=25262&view=diff
==============================================================================
--- trunk/target_functions/relax_fit.c  (original)
+++ trunk/target_functions/relax_fit.c  Tue Aug 26 09:18:02 2014
@@ -153,11 +153,11 @@
     /* The chi-squared gradient */
     dchi2(dchi2_vals, values, back_calc, back_calc_grad, sd, num_times, 
num_params);
 
-    /* Convert to a Python list */
+    /* Convert to a Python list, and scale the values. */
     PyObject *list = PyList_New(0);
     Py_INCREF(list);
     for (i = 0; i < num_params; i++) {
-        PyList_Append(list, PyFloat_FromDouble(dchi2_vals[i]));
+        PyList_Append(list, PyFloat_FromDouble(dchi2_vals[i] * 
scaling_matrix[i]));
     }
 
     /* Return the Jacobian */




Related Messages


Powered by MHonArc, Updated Tue Aug 26 09:20:03 2014