Hi,

Eh eh !
At least I tried to get an easy answer..!

You'll see it pass if I find it !


Séb  :)


On 11-08-25 3:42 PM, Edward d'Auvergne wrote:
Hi,

I'm not sure, you might have to play around with that one a little.
I'm not sure if you would do it from the Python side or C side.

Regards,

Edward


On 25 August 2011 15:38, Sébastien Morin<[email protected]>  wrote:
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, [email protected] 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
[email protected]

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


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

This is the relax-devel mailing list
[email protected]

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-devel


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


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

This is the relax-devel mailing list
[email protected]

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-devel

Reply via email to