mailr25858 - /trunk/specific_analyses/relax_disp/optimisation.py


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

Header


Content

Posted by tlinnet on September 16, 2014 - 19:45:
Author: tlinnet
Date: Tue Sep 16 19:45:57 2014
New Revision: 25858

URL: http://svn.gna.org/viewcvs/relax?rev=25858&view=rev
Log:
Another math domain checking, if ref intensity is set to 0.0, then points are 
skipped, rather than raising an Error.

This can happen for extremely bad dispersion data.

Task #7826 (https://gna.org/task/index.php?7826): Write an python class for 
the repeated analysis of dispersion data.

Modified:
    trunk/specific_analyses/relax_disp/optimisation.py

Modified: trunk/specific_analyses/relax_disp/optimisation.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/optimisation.py?rev=25858&r1=25857&r2=25858&view=diff
==============================================================================
--- trunk/specific_analyses/relax_disp/optimisation.py  (original)
+++ trunk/specific_analyses/relax_disp/optimisation.py  Tue Sep 16 19:45:57 
2014
@@ -288,7 +288,7 @@
 
             # Check for math domain errors or log for values less than 0.0.
             log_val = float(intensity) / ref_intensity
-            if log_val <= 0.0 :
+            if log_val <= 0.0 or ref_intensity == 0.0:
                 spin_string = generate_spin_string(spin=spin, 
mol_name=mol_name, res_num=resi, res_name=resn)
                 msg = "Math log(I / I_ref) domain error for spin '%s' in 
R2eff value calculation for fixed relaxation time period data.  I=%3.3f, 
I_ref=%3.3f.  The point is skipped." % (spin_string, intensity, ref_intensity)
                 warn(RelaxWarning("%s" % msg))




Related Messages


Powered by MHonArc, Updated Tue Sep 16 20:00:03 2014