mailr23895 - /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:06 2014
New Revision: 23895

URL: http://svn.gna.org/viewcvs/relax?rev=23895&view=rev
Log:
Moved the multi dimensional expansion of inv_relax_times out of for loop.

This can be done for all structures, which does not have missing points.

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=23895&r1=23894&r2=23895&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:06 2014
@@ -455,6 +455,10 @@
             self.r20b_struct = deepcopy(zeros_a)
             self.no_nd_struct = ones([self.NO, self.ND], float64)
 
+            if model not in [MODEL_DPL94]:
+                # Expand relax times.
+                self.inv_relax_times_a = 1.0 / multiply.outer( 
self.relax_times.reshape(self.NE, self.NS, self.NM), self.no_nd_struct )
+
             if model in [MODEL_DPL94]:
                 self.r1_a = multiply.outer( self.r1.reshape(self.NE, 
self.NS, self.NM), self.no_nd_struct )
 
@@ -472,7 +476,6 @@
                             if model not in [MODEL_DPL94]:
                                 # 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.inv_relax_times_a[ei][si][mi][oi][:num_disp_points] = 1.0 / 
self.relax_times[ei][mi]
                                 
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]




Related Messages


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