mailr24304 - /branches/disp_spin_speed/lib/dispersion/ns_cpmg_2site_star.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 - 03:41:
Author: tlinnet
Date: Wed Jun 25 03:41:00 2014
New Revision: 24304

URL: http://svn.gna.org/viewcvs/relax?rev=24304&view=rev
Log:
Double speed in NS CPMG 2site star, after using numpy.linalg.matrix_power 
instead of the lib version in relax.

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

Modified: branches/disp_spin_speed/lib/dispersion/ns_cpmg_2site_star.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/lib/dispersion/ns_cpmg_2site_star.py?rev=24304&r1=24303&r2=24304&view=diff
==============================================================================
--- branches/disp_spin_speed/lib/dispersion/ns_cpmg_2site_star.py       
(original)
+++ branches/disp_spin_speed/lib/dispersion/ns_cpmg_2site_star.py       Wed 
Jun 25 03:41:00 2014
@@ -59,11 +59,11 @@
 # Python module imports.
 from numpy import add, array, conj, dot, einsum, fabs, float64, isfinite, 
log, min, multiply, sum
 from numpy.ma import fix_invalid, masked_where
+from numpy.linalg import matrix_power
 
 # relax module imports.
 from lib.float import isNaN
 from lib.dispersion.matrix_exponential import 
matrix_exponential_rank_NE_NS_NM_NO_ND_x_x
-from lib.linear_algebra.matrix_power import square_matrix_power
 
 # Repetitive calculations (to speed up calculations).
 m_r20a = array([
@@ -247,7 +247,7 @@
                 prop_2_i = prop_2_mat[0, si, mi, 0, di]
 
                 # Now create the total propagator that will evolve the 
magnetization under the CPMG train, i.e. it applies the above 
tau-180-tau-tau-180-tau so many times as required for the CPMG frequency 
under consideration.
-                prop_total = square_matrix_power(prop_2_i, power_si_mi_di)
+                prop_total = matrix_power(prop_2_i, power_si_mi_di)
 
                 # Now we apply the above propagator to the initial 
magnetization vector - resulting in the magnetization that remains after the 
full CPMG pulse train.  It is called M of t (t is the time after the CPMG 
train).
                 Moft = dot(prop_total, M0)




Related Messages


Powered by MHonArc, Updated Wed Jun 25 04:00:03 2014