mailr24201 - /branches/disp_spin_speed/lib/dispersion/ns_mmq_2site.py


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

Header


Content

Posted by tlinnet on June 20, 2014 - 12:00:
Author: tlinnet
Date: Fri Jun 20 12:00:18 2014
New Revision: 24201

URL: http://svn.gna.org/viewcvs/relax?rev=24201&view=rev
Log:
Fix for using the old matrix_exponential of m1.

Onye:
- test_korzhnev_2005_15n_sq_data

Is still failing.
That still uses the matrix_exponential_rankN.

There seems to be a problem with matrix_exponential_rankN, when doing
complex numbers.

Maybe the dtype has to get fixed?
Use it as a input argument?

It must be the einsum

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

Modified: branches/disp_spin_speed/lib/dispersion/ns_mmq_2site.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/lib/dispersion/ns_mmq_2site.py?rev=24201&r1=24200&r2=24201&view=diff
==============================================================================
--- branches/disp_spin_speed/lib/dispersion/ns_mmq_2site.py     (original)
+++ branches/disp_spin_speed/lib/dispersion/ns_mmq_2site.py     Fri Jun 20 
12:00:18 2014
@@ -223,12 +223,6 @@
     # Equivalent to Z-.
     M2_mat = matrix_exponential_rankN(m2_mat).astype(complex64)
 
-    # The complex conjugates M1* and M2*
-    # Equivalent to D+*.
-    M1_mat_star = conj(M1_mat)
-    # Equivalent to Z-*.
-    M2_mat_star = conj(M2_mat)
-
     # Loop over spins.
     for si in range(NS):
         # Loop over the spectrometer frequencies.
@@ -239,17 +233,22 @@
 
                 # Loop over the time points, back calculating the R2eff 
values.
                 for i in range(num_points_i):
+                    m1_mat_i = m1_mat[si, mi, oi, i]
+                    m2_mat_i = m2_mat[si, mi, oi, i]
+
                     # The M1 and M2 matrices.
                     # Equivalent to D+.
-                    M1_i = M1_mat[si, mi, oi, i]
+                    #M1_i = M1_mat[si, mi, oi, i]
+                    M1_i = matrix_exponential(m1_mat_i)    # Equivalent to 
D+.
                     # Equivalent to Z-.
-                    M2_i = M1_mat[si, mi, oi, i]
+                    #M2_i = M1_mat[si, mi, oi, i]
+                    M2_i = matrix_exponential(m2_mat_i)    # Equivalent to 
Z-.
 
                     # The complex conjugates M1* and M2*
                     # Equivalent to D+*.
-                    M1_star_i = M1_mat_star[si, mi, oi, i]
+                    M1_star_i = conj(M1_i)    # Equivalent to D+*.
                     # Equivalent to Z-*.
-                    M2_star_i = M2_mat_star[si, mi, oi, i]
+                    M2_star_i = conj(M2_i)    # Equivalent to Z-*.
 
                     # Repetitive dot products (minimised for speed).
                     M1_M2 = dot(M1_i, M2_i)




Related Messages


Powered by MHonArc, Updated Fri Jun 20 15:40:02 2014