mailr14454 - /branches/inversion-recovery/maths_fns/relax_fit.c


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

Header


Content

Posted by sebastien . morin on August 25, 2011 - 15:35:
Author: semor
Date: Thu Aug 25 15:35:55 2011
New Revision: 14454

URL: http://svn.gna.org/viewcvs/relax?rev=14454&view=rev
Log:
Added a switch in the C code for curve fitting.

The switch will allow the use of specific equations depending on 
the model chosen.

However, it is still not functional...  :(


Modified:
    branches/inversion-recovery/maths_fns/relax_fit.c

Modified: branches/inversion-recovery/maths_fns/relax_fit.c
URL: 
http://svn.gna.org/viewcvs/relax/branches/inversion-recovery/maths_fns/relax_fit.c?rev=14454&r1=14453&r2=14454&view=diff
==============================================================================
--- branches/inversion-recovery/maths_fns/relax_fit.c (original)
+++ branches/inversion-recovery/maths_fns/relax_fit.c Thu Aug 25 15:35:55 2011
@@ -124,7 +124,10 @@
     }
 
     /* Back calculated the peak intensities */
-    exp_2param_neg(params, relax_times, back_calc, num_times);
+    if(model == exp_2param_neg)
+        exp_2param_neg(params, relax_times, back_calc, num_times);
+    if(model == exp_3param_inv_neg)
+        exp_3param_inv_neg(params, relax_times, back_calc, num_times);
 
     /* Calculate and return the chi-squared value */
     return Py_BuildValue("f", chi2(values,sd,back_calc,num_times));
@@ -148,7 +151,11 @@
         return NULL;
 
     /* Back calculated the peak intensities */
-    exp_2param_neg(params, relax_times, back_calc, num_times);
+    if(model == exp_2param_neg)
+        exp_2param_neg(params, relax_times, back_calc, num_times);
+    if(model == exp_3param_inv_neg)
+        exp_3param_inv_neg(params, relax_times, back_calc, num_times);
+
 
     return NULL;
 }




Related Messages


Powered by MHonArc, Updated Thu Aug 25 16:40:02 2011