Hi Seb, Ideally, you would send in the Python string and have it converted into a C character array. This would be done in the initialisation (the setup function), and be stored as a global variable (extern). Just try giving it a go, getting that variable sent in to the C code.
Regards, Edward On 25 August 2011 17:19, <[email protected]> wrote: > Author: semor > Date: Thu Aug 25 17:19:49 2011 > New Revision: 14459 > > URL: http://svn.gna.org/viewcvs/relax?rev=14459&view=rev > Log: > Maybe found a way to switch from one equation to the other. > > This approach, not general, uses the number of parameters as a > test to the use of either the 2-parameter equation 'exp_2param_neg' or > the 3-parameter equation 'exp_3param_inv_neg'... > > It is not clear if it works, but, at least, the code compiles... > > > 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=14459&r1=14458&r2=14459&view=diff > ============================================================================== > --- branches/inversion-recovery/maths_fns/relax_fit.c (original) > +++ branches/inversion-recovery/maths_fns/relax_fit.c Thu Aug 25 17:19:49 2011 > @@ -124,9 +124,9 @@ > } > > /* Back calculated the peak intensities */ > - if(model == exp_2param_neg) > + if(sizeof(num_params) == 2) > exp_2param_neg(params, relax_times, back_calc, num_times); > - if(model == exp_3param_inv_neg) > + if(sizeof(num_params) == 3) > exp_3param_inv_neg(params, relax_times, back_calc, num_times); > > /* Calculate and return the chi-squared value */ > @@ -151,9 +151,9 @@ > return NULL; > > /* Back calculated the peak intensities */ > - if(model == exp_2param_neg) > + if(sizeof(num_params) == 2) > exp_2param_neg(params, relax_times, back_calc, num_times); > - if(model == exp_3param_inv_neg) > + if(sizeof(num_params) == 3) > exp_3param_inv_neg(params, relax_times, back_calc, num_times); > > > > > _______________________________________________ > 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 > _______________________________________________ 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

