mailRe: r14454 - /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 Sébastien Morin on August 25, 2011 - 15:39:
Hi Ed,

Any idea how to pass the selected model from the python part of relax to the C code, such that the C code uses the appropriate equation..?

The function where the equation is chosen is relax_fit.select_model().


Séb  :)


On 11-08-25 3:35 PM, sebastien.morin@xxxxxxxxx wrote:
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;
  }


_______________________________________________
relax (http://nmr-relax.com)

This is the relax-commits mailing list
relax-commits@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

--
Sébastien Morin, Ph.D.
Postdoctoral Fellow, S. Grzesiek NMR Laboratory
Department of Structural Biology
Biozentrum, Universität Basel
Klingelbergstrasse 70
4056 Basel
Switzerland




Related Messages


Powered by MHonArc, Updated Thu Aug 25 18:00:13 2011