mailr23893 - /branches/disp_spin_speed/target_functions/relax_disp.py


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

Header


Content

Posted by tlinnet on June 12, 2014 - 20:08:
Author: tlinnet
Date: Thu Jun 12 20:08:10 2014
New Revision: 23893

URL: http://svn.gna.org/viewcvs/relax?rev=23893&view=rev
Log:
Moved the expansion of the R1 structure out of the for loops.

This is to speed-up the __init__ of the class of the target function.

Task #7807 (https://gna.org/task/index.php?7807): Speed-up of dispersion 
models for Clustered analysis.

Modified:
    branches/disp_spin_speed/target_functions/relax_disp.py

Modified: branches/disp_spin_speed/target_functions/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/disp_spin_speed/target_functions/relax_disp.py?rev=23893&r1=23892&r2=23893&view=diff
==============================================================================
--- branches/disp_spin_speed/target_functions/relax_disp.py     (original)
+++ branches/disp_spin_speed/target_functions/relax_disp.py     Thu Jun 12 
20:08:10 2014
@@ -436,7 +436,6 @@
 
             # For R1rho data.
             if model in [MODEL_DPL94]:
-                self.r1_a = deepcopy(zeros_a)
                 self.tilt_angles_a = deepcopy(zeros_a)
                 self.spin_lock_omega1_squared_a = deepcopy(zeros_a)
                 self.phi_ex_struct = deepcopy(zeros_a)
@@ -455,6 +454,9 @@
             self.r20a_struct = deepcopy(zeros_a)
             self.r20b_struct = deepcopy(zeros_a)
             self.no_nd_struct = ones([self.NO, self.ND], float64)
+
+            if model in [MODEL_DPL94]:
+                self.r1_a = multiply.outer( self.r1.reshape(self.NE, 
self.NS, self.NM), self.no_nd_struct )
 
             # Loop over the experiment types.
             for ei in range(self.NE):
@@ -499,7 +501,6 @@
 
                                     # Extract the frequencies to numpy array.
                                     self.frqs_a[ei][si][mi][oi][di] = 
self.frqs[ei][si][mi]
-                                    self.r1_a[ei][si][mi][oi][di] = 
self.r1[si][mi]
                                     self.tilt_angles_a[ei][si][mi][oi][di] = 
self.tilt_angles[ei][si][mi][oi][di]
                                     
self.spin_lock_omega1_squared_a[ei][si][mi][oi][di] = 
self.spin_lock_omega1_squared[ei][mi][oi][di]
 




Related Messages


Powered by MHonArc, Updated Thu Jun 12 20:40:02 2014