mailr25355 - /trunk/specific_analyses/relax_disp/estimate_r2eff.py


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

Header


Content

Posted by tlinnet on August 27, 2014 - 21:08:
Author: tlinnet
Date: Wed Aug 27 21:08:45 2014
New Revision: 25355

URL: http://svn.gna.org/viewcvs/relax?rev=25355&view=rev
Log:
Inserted checks for C module is available in module for estimateing R2eff 
error.

task #7822(https://gna.org/task/index.php?7822): Implement user function to 
estimate R2eff and associated errors for exponential curve fitting.

Modified:
    trunk/specific_analyses/relax_disp/estimate_r2eff.py

Modified: trunk/specific_analyses/relax_disp/estimate_r2eff.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/estimate_r2eff.py?rev=25355&r1=25354&r2=25355&view=diff
==============================================================================
--- trunk/specific_analyses/relax_disp/estimate_r2eff.py        (original)
+++ trunk/specific_analyses/relax_disp/estimate_r2eff.py        Wed Aug 27 
21:08:45 2014
@@ -69,6 +69,10 @@
     @keyword verbosity:     The amount of information to print.  The higher 
the value, the greater the verbosity.
     @type verbosity:        int
     """
+
+    # Check that the C modules have been compiled.
+    if not C_module_exp_fn:
+        raise RelaxError("Relaxation curve fitting is not available.  Try 
compiling the C modules on your platform.")
 
     # Perform checks.
     check_model_type(model=MODEL_R2EFF)
@@ -606,6 +610,10 @@
     # Perform checks.
     check_model_type(model=MODEL_R2EFF)
 
+    # Check that the C modules have been compiled.
+    if not C_module_exp_fn and method == 'minfx':
+        raise RelaxError("Relaxation curve fitting is not available.  Try 
compiling the C modules on your platform.")
+
     # Set class scipy setting.
     E = Exp(verbosity=verbosity)
     E.set_settings_leastsq(ftol=ftol, xtol=xtol, maxfev=maxfev, 
factor=factor)
@@ -870,6 +878,10 @@
     @return:        Packed list with optimised parameter, parameter error 
set to 'inf', chi2, iter_count, f_count, g_count, h_count, warning
     @rtype:         list
     """
+
+    # Check that the C modules have been compiled.
+    if not C_module_exp_fn:
+        raise RelaxError("Relaxation curve fitting is not available.  Try 
compiling the C modules on your platform.")
 
     # Initial guess for minimisation. Solved by linear least squares.
     x0 = asarray( E.estimate_x0_exp() )




Related Messages


Powered by MHonArc, Updated Wed Aug 27 21:20:02 2014