Author: tlinnet
Date: Sun Jun 15 08:53:38 2014
New Revision: 23952
URL: http://svn.gna.org/viewcvs/relax?rev=23952&view=rev
Log:
Changed linked matrix/vector inner products into chained dot expressions.
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=23952&r1=23951&r2=23952&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 Sun Jun 15
08:53:38 2014
@@ -56,6 +56,7 @@
# Python module imports.
from numpy import dot, fabs, isfinite, log, min, ones, ndarray
from numpy.ma import fix_invalid, masked_less_equal, masked_where
+import numpy as np
# relax module imports.
from lib.dispersion.ns_matrices import rcpmg_3d
@@ -138,9 +139,7 @@
# Loop over the CPMG elements, propagating the magnetisation.
for j in range(2*power[i]):
- Mint = dot(Rexpo, Mint)
- Mint = dot(r180x, Mint)
- Mint = dot(Rexpo, Mint)
+ Mint = Rexpo.dot(r180x).dot(Rexpo).dot(Mint)
# The next lines calculate the R2eff using a two-point
approximation, i.e. assuming that the decay is mono-exponential.
Mx = Mint[1] / pA
_______________________________________________
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