mailr24299 - /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 tlinnet on June 25, 2014 - 02:14:
Author: tlinnet
Date: Wed Jun 25 02:14:45 2014
New Revision: 24299

URL: http://svn.gna.org/viewcvs/relax?rev=24299&view=rev
Log:
Lowered the looping in NS CPMG 2site 3D, by preforming the inital dot product.

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=24299&r1=24298&r2=24299&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 Wed Jun 25 
02:14:45 2014
@@ -328,8 +328,11 @@
                 # This matrix is a propagator that will evolve the 
magnetization with the matrix R for a delay tcp.
                 evolution_matrix_T_i = evolution_matrix_T_mat[0, si, mi, 0, 
di]
 
+                # Do the initial evolution.
+                Mint_T_i = dot(Mint_T_i, evolution_matrix_T_i)
+
                 # Loop over the CPMG elements, propagating the magnetisation.
-                for j in range(power_si_mi_di):
+                for j in range(power_si_mi_di - 1):
                     Mint_T_i = dot(Mint_T_i, evolution_matrix_T_i)
 
                 # The next lines calculate the R2eff using a two-point 
approximation, i.e. assuming that the decay is mono-exponential.




Related Messages


Powered by MHonArc, Updated Wed Jun 25 02:20:03 2014