mailr19632 - /branches/relax_disp/lib/dispersion/equations.py


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

Header


Content

Posted by edward on May 03, 2013 - 14:28:
Author: bugman
Date: Fri May  3 14:28:41 2013
New Revision: 19632

URL: http://svn.gna.org/viewcvs/relax?rev=19632&view=rev
Log:
Created the lib.dispersion.calc_two_point_r2eff() function.

This is for calculating the R2eff/R1rho value for the fixed relaxation time 
data.


Modified:
    branches/relax_disp/lib/dispersion/equations.py

Modified: branches/relax_disp/lib/dispersion/equations.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/lib/dispersion/equations.py?rev=19632&r1=19631&r2=19632&view=diff
==============================================================================
--- branches/relax_disp/lib/dispersion/equations.py (original)
+++ branches/relax_disp/lib/dispersion/equations.py Fri May  3 14:28:41 2013
@@ -24,7 +24,31 @@
 """The relaxation dispersion equations."""
 
 # Python module imports.
-from math import tanh
+from math import log, tanh
+
+
+def calc_two_point_r2eff(relax_time=None, I_ref=None, I=None):
+    """Calculate the R2eff/R1rho value for the fixed relaxation time data.
+
+    The formula is:
+
+                  -1         / I1 \ 
+        R2eff = ------- * ln | -- | ,
+                relax_T      \ I0 /
+
+    where relax_T is the fixed delay time, I0 is the reference peak 
intensity when relax_T is zero, and I1 is the peak intensity in a spectrum of 
interest.
+
+
+    @keyword relax_time:    The fixed relaxation delay time in seconds.
+    @type relax_time:       float
+    @keyword I_ref:         The peak intensity in the reference spectrum.
+    @type I_ref:            float
+    @keyword I:             The peak intensity of interest.
+    @type I:                float
+    """
+
+    # Calculate and return the value (avoiding integer division problems).
+    return -1.0 / relax_time * log(float(I) / I_ref)
 
 
 def fast_2site(params=None, cpmg_frqs=None, back_calc=None, num_times=None):




Related Messages


Powered by MHonArc, Updated Fri May 03 15:00:02 2013