mailr23897 - /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:35:
Author: tlinnet
Date: Thu Jun 12 20:35:10 2014
New Revision: 23897

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

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=23897&r1=23896&r2=23897&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:35:10 2014
@@ -462,6 +462,9 @@
             if model in [MODEL_DPL94]:
                 self.r1_a = multiply.outer( self.r1.reshape(self.NE, 
self.NS, self.NM), self.no_nd_struct )
 
+            # Extract the frequencies to numpy array.
+            self.frqs_a = multiply.outer( 
asarray(self.frqs).reshape(self.NE, self.NS, self.NM), self.no_nd_struct )
+
             # Loop over the experiment types.
             for ei in range(self.NE):
                 # Loop over the spins.
@@ -477,8 +480,6 @@
                                 # Extract cpmg_frqs and num_disp_points from 
lists.
                                 
self.cpmg_frqs_a[ei][si][mi][oi][:num_disp_points] = 
self.cpmg_frqs[ei][mi][oi]
                                 
self.num_disp_points_a[ei][si][mi][oi][:num_disp_points] = 
self.num_disp_points[ei][si][mi][oi]
-                                # Extract the frequencies to numpy array.
-                                
self.frqs_a[ei][si][mi][oi][:num_disp_points] = self.frqs[ei][si][mi]
 
                                 # Make a spin 1/0 file.
                                 
self.disp_struct[ei][si][mi][oi][:num_disp_points] = ones(num_disp_points)
@@ -501,7 +502,6 @@
                                     self.disp_struct[ei][si][mi][oi][di] = 
1.0
 
                                     # Extract the frequencies to numpy array.
-                                    self.frqs_a[ei][si][mi][oi][di] = 
self.frqs[ei][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 23:20:03 2014