[Relax-commits] r2300 - in /1.0: ./ generic_fns/ maths_fns/ prompt/ sample_scripts/ specific_fns/ (January 09, 2006 - 03:40)

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

 

Author: bugman
Date: Mon Jan  9 03:39:10 2006
New Revision: 2300

URL: http://svn.gna.org/viewcvs/relax?rev=2300&view=rev
Log:
A huge number of changes for the relaxation curve fitting functions.

As C code has been added, the compilation of that code, as well as the functions of the clean_up
script have been placed into a Makefile.  The command 'make' will compile the C code into a python
module in the format of a binary shared object '*.so'.  The command 'make clean' will remove all the
byte compiled python files '*.pyc', any backup files created by certain editors '*.bak', all
compiled object files '*.o', and all compiled shared object files '*.so'.  These 'rm' commands are
identical to those that were in the 'clean_up' script, hence the script has been deleted.
Rudimentary make rules for the creation of the relax manual, relax HTML manual, and creating a relax
distribution file have been added, although these rules don't work properly yet.

A rudimentary C file 'maths_fns/exp_fn.c' and C header file 'maths_fns/exp_fn.h' has been created
for the optimisation of the parameters of the exponential function.  The parameters are Rx (either
the R1 or R2) and I0 (the initial peak intensity).  The parameter Iinf (the intensity at infinity)
is used for the three parameter exponential of the inversion recovery experiment.  The header file
currently contains two define statements, one for PY_ARRAY_UNIQUE_SYMBOL needed to tie C code to
Python, and MAXPARAMS.  The C file contains the function 'exponential_fn()' for setting up prior to
optimisation, the function 'exponential_test_fn()' for testing the integration of C and Python, the
functions 'func()', 'dfunc()', and 'd2func()' for passing to the minimisation code, a method table
required for the functions called by Python, and the function 'initexp_fn()' used for initialising
the module in Python.

Reliance on Swig has been removed, therefore the file 'maths_fns/c_chi2.i' is unnecessary and has
been deleted.

For the specific relaxation curve fitting module 'specific_fns/relax_fit.py', the C code which has
been compiled into a shared object '*.so' is imported with a try statement so that relax will
function without compilation.  The flag 'C_module_exp_fn' has been added to __builtin__ so that if
there is a problem with the module, relaxation curve fitting will be disallowed in the run setup
function in 'generic_fns/runs.py'.

The class Relax_fit in 'specific_fns/relax_fit.py' is now subclassed with the class Common_functions
from 'specific_fns/base_class.py' being the base class.  Two functions have been shifted from the
model-free code of 'specific_fns/model_free.py' into 'specific_fns/base_class.py'.  These are the
functions 'return_value()' and 'set()' as these functions are identical in both relaxation curve
fitting and model-free analysis (or any specific code which would use minimisation).  Two functions
for each of these classes of analysis have been created called 'set_doc()' which include the
specific docstrings of the previous functions 'set()'.  This docstring is appended to some of the
docstrings in the user functions of the prompt.

The function 'ave_and_sd' has been added to 'specific_fns/relax_fit.py' to calculate the average
peak intensity for each time point as well as calculating the average standard deviation for all
duplicated spectra.  All mentions of model-free in the file have also been removed, the function
'default_value()' has been added, a few bugs have been removed from the 'read()' function, the
'minimise()' function has been updated, and the 'return_data_name()' function has been fixed to
include all parameters.

The 'return_data_name' and 'set' functions for relaxation curve fitting have been added to
'specific_fns/specific_setup.py'.

The indentation in 'generic_fns/value.py' has been fixed.

The 'set()' function in 'specific_fns/jw_mapping.py' has been fixed.


Added:
    1.0/Makefile
    1.0/maths_fns/exp_fn.c
    1.0/maths_fns/exp_fn.h
Removed:
    1.0/clean_up
    1.0/maths_fns/c_chi2.i
Modified:
    1.0/generic_fns/runs.py
    1.0/generic_fns/value.py
    1.0/prompt/value.py
    1.0/sample_scripts/relax_fit.py
    1.0/specific_fns/base_class.py
    1.0/specific_fns/jw_mapping.py
    1.0/specific_fns/model_free.py
    1.0/specific_fns/relax_fit.py
    1.0/specific_fns/specific_setup.py



Related Mails




Powered by MHonArc, Updated Mon Jan 09 05:40:04 2006