Author: tlinnet
Date: Thu Jun 19 20:17:49 2014
New Revision: 24166
URL: http://svn.gna.org/viewcvs/relax?rev=24166&view=rev
Log:
Added a check in lib/dispersion/ns_r1hro_2site.py, to see if the newly
created multidimensional
ns matrix of rank NE][NS][NM][NO][ND][6][6], is equal to the previous
[6][6] matrix.
It is.
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=24166&r1=24165&r2=24166&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:17:49 2014
@@ -51,10 +51,10 @@
# Python module imports.
from math import atan2, cos, log, sin
-from numpy import dot
+from numpy import dot, sum
# relax module imports.
-from lib.dispersion.ns_matrices import rr1rho_3d
+from lib.dispersion.ns_matrices import rr1rho_3d, rr1rho_3d_rankN
from lib.float import isNaN
from lib.linear_algebra.matrix_exponential import matrix_exponential
@@ -103,6 +103,9 @@
# Extract shape of experiment.
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)
+
# Loop over spins.
for si in range(NS):
# Loop over the spectrometer frequencies.
@@ -135,6 +138,13 @@
# 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)
+ R_mat_i = R_mat[0, si, mi, oi, j]
+ diff = matrix - R_mat_i
+ if sum(diff) != 0.0:
+ import sys
+ sys.exit()
+
+
# The following lines rotate the magnetization
previous to spin-lock into the weff frame.
theta = atan2(spin_lock_fields_i[j], dA)
M0[0] = sin(theta) # The A state initial X
magnetisation.
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
relax-commits@xxxxxxx
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits