mailr19971 - /branches/relax_disp/lib/dispersion/m61.py


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

Header


Content

Posted by edward on June 08, 2013 - 23:15:
Author: bugman
Date: Sat Jun  8 23:15:28 2013
New Revision: 19971

URL: http://svn.gna.org/viewcvs/relax?rev=19971&view=rev
Log:
Simplifications and comment fixes in the lib.dispersion.m61.r2eff_m61() 
function.


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

Modified: branches/relax_disp/lib/dispersion/m61.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/relax_disp/lib/dispersion/m61.py?rev=19971&r1=19970&r2=19971&view=diff
==============================================================================
--- branches/relax_disp/lib/dispersion/m61.py (original)
+++ branches/relax_disp/lib/dispersion/m61.py Sat Jun  8 23:15:28 2013
@@ -66,16 +66,20 @@
     @type num_poinst:           int
     """
 
-    # Loop over the time points, back calculating the R2eff values.
+    # Loop over the dispersion points, back calculating the R1rho values.
     for i in range(num_points):
         # Catch zeros (to avoid pointless mathematical operations).
         if phi_ex == 0.0 or kex == 0.0:
             back_calc[i] = r1rho_prime
+            continue
+
+        # Denominator.
+        denom = kex**2 + (2.0*pi*spin_lock_fields[i])**2
 
         # Avoid divide by zero.
-        elif kex == 0.0 and spin_lock_fields[i] == 0.0:
+        if denom == 0.0:
             back_calc[i] = 1e100
+            continue
 
-        # The full formula.
-        else:
-            back_calc[i] = r1rho_prime + sin(theta)**2 * phi_ex * kex / 
(kex**2 + (2.0*pi*spin_lock_fields[i])**2)
+        # R1rho calculation.
+        back_calc[i] = r1rho_prime + sin(theta)**2 * phi_ex * kex / denom




Related Messages


Powered by MHonArc, Updated Sat Jun 08 23:20:02 2013