mailRe: r24154 - /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:09:
Hi Troels,

Your commit messages need to be more descriptive.  When relax users
read the release notes and see "Added intermediate step with for
loops" they will have no idea what that is about.

Cheers,

Edward



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

URL: http://svn.gna.org/viewcvs/relax?rev=24154&view=rev
Log:
Added intermediate step with for loops.

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=24154&r1=24153&r2=24154&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:51 2014
@@ -131,6 +131,25 @@
     # The matrix R that contains all the contributions to the evolution, 
i.e. relaxation, exchange and chemical shift evolution.
     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)

+    # Holds the Rexpo.
+    Rexpo_mat = R_mat * 0.0
+    # Loop over the spins
+    for si in range(NS):
+        # Loop over the spectrometer frequencies.
+        for mi in range(NM):
+            # Extract number of points.
+            num_points_si_mi = int(num_points[0, si, mi, 0])
+
+            # Loop over the time points, back calculating the R2eff values.
+            for di in range(num_points_si_mi):
+
+                # This matrix is a propagator that will evolve the 
magnetization with the matrix R for a delay tcp.
+                R_mat_i = R_mat[0, si, mi, 0, di]
+
+                # Store the Rexpo.  Is it not possible to find the matrix 
exponential of higher dimensional data?
+                Rexpo = matrix_exponential(R_mat_i)
+                Rexpo_mat[0, si, mi, 0, di] = Rexpo
+
     # Loop over the spins
     for si in range(NS):
         # Loop over the spectrometer frequencies.
@@ -150,9 +169,7 @@
                 Mint = M0

                 # This matrix is a propagator that will evolve the 
magnetization with the matrix R for a delay tcp.
-                R_mat_i = R_mat[0, si, mi, 0, di]
-
-                Rexpo = matrix_exponential(R_mat_i)
+                Rexpo = Rexpo_mat[0, si, mi, 0, di]

                 # 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