mailRe: r24152 - /branches/disp_spin_speed/lib/dispersion/ns_cpmg_2site_3d.py


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

Header


Content

Posted by Edward d'Auvergne on June 23, 2014 - 09:05:
Hi Troels,

I'm now back and have started to quickly check your commits over the
last 4 days.  For this change, such debugging code does not need to be
added to the repository.  It is better that it stays in your local
checked out copy.

Cheers,

Edward



On 19 June 2014 17:41,  <tlinnet@xxxxxxxxxxxxx> wrote:
Author: tlinnet
Date: Thu Jun 19 17:41:45 2014
New Revision: 24152

URL: http://svn.gna.org/viewcvs/relax?rev=24152&view=rev
Log:
Implemented test, to see if 3D exchange matrixes are the same.

This can be tested while running systemtest 
test_hansen_cpmg_data_to_ns_cpmg_2site_3D.

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_cpmg_2site_3d.py

Modified: branches/disp_spin_speed/lib/dispersion/ns_cpmg_2site_3d.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/lib/dispersion/ns_cpmg_2site_3d.py?rev=24152&r1=24151&r2=24152&view=diff
==============================================================================
--- branches/disp_spin_speed/lib/dispersion/ns_cpmg_2site_3d.py (original)
+++ branches/disp_spin_speed/lib/dispersion/ns_cpmg_2site_3d.py Thu Jun 19 
17:41:45 2014
@@ -60,7 +60,7 @@


 # relax module imports.
-from lib.dispersion.ns_matrices import rcpmg_3d
+from lib.dispersion.ns_matrices import rcpmg_3d, rcpmg_3d_rankN
 from lib.float import isNaN
 from lib.linear_algebra.matrix_exponential import matrix_exponential

@@ -128,6 +128,8 @@
     # Extract the total numbers of experiments, number of spins, number of 
magnetic field strength, number of offsets, maximum number of dispersion 
point.
     NE, NS, NM, NO, ND = back_calc.shape

+    R_mat = rcpmg_3d_rankN(R1A=r10a, R1B=r10b, R2A=r20a, R2B=r20b, pA=pA, 
pB=pB, dw=dw, k_AB=k_AB, k_BA=k_BA, tcp=tcp)
+
     # Loop over the spins
     for si in range(NS):
         # Loop over the spectrometer frequencies.
@@ -154,7 +156,22 @@
                 Mint = M0

                 # This matrix is a propagator that will evolve the 
magnetization with the matrix R for a delay tcp.
-                Rexpo = matrix_exponential(R*tcp_si_mi_di)
+                R_tcp = R*tcp_si_mi_di
+                R_mat_i = R_mat[0, si, mi, 0, di]
+
+                # Test if they are equal.
+                diff = R_tcp - R_mat_i
+                if abs(sum(diff)) > 1.e-14:
+                    import sys
+                    print "oh no"
+                    print R_tcp
+                    print R_mat_i
+                    print diff
+                    print abs(sum(diff))
+                    print si, mi, di
+                    sys.exit()
+
+                Rexpo = matrix_exponential(R_tcp)

                 # The essential evolution matrix.
                 # This is the first round.


_______________________________________________
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



Related Messages


Powered by MHonArc, Updated Mon Jun 23 09:20:16 2014