Author: bugman Date: Thu Jan 12 04:00:06 2006 New Revision: 2325 URL: http://svn.gna.org/viewcvs/relax?rev=2325&view=rev Log: Completion of the C code for the fitting of relaxation curves and preparation for Monte Carlo sims. The 'chi2()' C function is now declared in the 'func()' function as returning a double. Previously it was interpreting it the result as an int! The exponential back calculation function has been debugged. The function is I0 * exp(-t * Rx) and not I0 * exp(-t / Rx)! In 'maths_fns/c_chi2.c' the function 'square()' has been defined. The makefile 'maths_fns/Makefile' has been modified so that changes to 'maths_fns/relax_fit.h' will now cause recompilation of all C code. The spectral density function 'num_instances()' in 'specific_fns/jw_mapping.py' has been debugged. In 'specific_fns/relax_fit.py', the function 'ave_and_sd()' has been renamed to 'mean_and_error()'. The user function 'mean_and_error()' has been added to 'prompt/relax_fit.py'. Previously this was being called by the minimise function of 'specific_fns/relax_fit.py', ie both during the grid search and the minimisation. This function has to be called prior to optimisation. For Monte Carlo simulations, the function 'back_calc_I()' has been added to 'maths_fns/relax_fit.c'. This simply converts the C external variable 'back_calc[]' to a Numeric array and returns it. The code isn't fully functional yet. In addition, in the file 'specific_fns/relax_fit.py', the functions 'num_instances()', 'return_data()', 'set_selected_sim()', and 'sim_pack_data()' have been added for MC sims. The error function 'RelaxNoMfModelError' has been changed to 'RelaxNoModelError' to generalise it for both model-free analysis and relaxation curve fitting. The function 'sim_set_selected()' has been renamed to 'set_selected_sim()' in 'specific_fns/model_free.py'. Modified: 1.1/errors.py 1.1/maths_fns/Makefile 1.1/maths_fns/c_chi2.c 1.1/maths_fns/exponential.c 1.1/maths_fns/relax_fit.c 1.1/prompt/relax_fit.py 1.1/sample_scripts/relax_fit.py 1.1/specific_fns/jw_mapping.py 1.1/specific_fns/model_free.py 1.1/specific_fns/relax_fit.py 1.1/specific_fns/specific_setup.py