mailr24168 - /branches/disp_spin_speed/lib/dispersion/ns_r1rho_2site.py


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

Header


Content

Posted by tlinnet on June 19, 2014 - 20:52:
Author: tlinnet
Date: Thu Jun 19 20:52:51 2014
New Revision: 24168

URL: http://svn.gna.org/viewcvs/relax?rev=24168&view=rev
Log:
Added a check, that the pre- relax_time multiplied multidimensional array, 
equal the previous.

It does, to the sum of 1.0e-13.

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion 
models for Clustered analysis.

Modified:
    branches/disp_spin_speed/lib/dispersion/ns_r1rho_2site.py

Modified: branches/disp_spin_speed/lib/dispersion/ns_r1rho_2site.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/lib/dispersion/ns_r1rho_2site.py?rev=24168&r1=24167&r2=24168&view=diff
==============================================================================
--- branches/disp_spin_speed/lib/dispersion/ns_r1rho_2site.py   (original)
+++ branches/disp_spin_speed/lib/dispersion/ns_r1rho_2site.py   Thu Jun 19 
20:52:51 2014
@@ -104,7 +104,7 @@
     NE, NS, NM, NO = num_points.shape
 
     # The matrix that contains all the contributions to the evolution, i.e. 
relaxation, exchange and chemical shift evolution.
-    R_mat = rr1rho_3d_rankN(R1=r1, r1rho_prime=r1rho_prime, pA=pA, pB=pB, 
dw=dw, omega=omega, offset=offset, w1=spin_lock_fields, k_AB=k_AB, k_BA=k_BA)
+    R_mat = rr1rho_3d_rankN(R1=r1, r1rho_prime=r1rho_prime, pA=pA, pB=pB, 
dw=dw, omega=omega, offset=offset, w1=spin_lock_fields, k_AB=k_AB, k_BA=k_BA, 
relax_time=relax_time)
 
     # Loop over spins.
     for si in range(NS):
@@ -138,9 +138,12 @@
                     # The matrix that contains all the contributions to the 
evolution, i.e. relaxation, exchange and chemical shift evolution.
                     rr1rho_3d(matrix=matrix, R1=r1_i, 
r1rho_prime=r1rho_prime_i[j], pA=pA, pB=pB, wA=dA, wB=dB, 
w1=spin_lock_fields_i[j], k_AB=k_AB, k_BA=k_BA)
 
+                    matrix_time = matrix*relax_time_i[j]
+
                     R_mat_i = R_mat[0, si, mi, oi, j]
-                    diff = matrix - R_mat_i
-                    if sum(diff) != 0.0:
+                    diff = matrix_time - R_mat_i
+                    if abs(sum(diff)) > 1.0e-13:
+                        print sum(diff)
                         import sys
                         sys.exit()
 
@@ -151,7 +154,7 @@
                     M0[2] = cos(theta)    # The A state initial Z 
magnetisation.
 
                     # This matrix is a propagator that will evolve the 
magnetization with the matrix R.
-                    Rexpo = matrix_exponential(matrix*relax_time_i[j])
+                    Rexpo = matrix_exponential(matrix_time)
 
                     # Magnetization evolution.
                     MA = dot(M0, dot(Rexpo, M0))




Related Messages


Powered by MHonArc, Updated Thu Jun 19 21:00:02 2014