mailr23802 - /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 10, 2014 - 20:58:
Author: tlinnet
Date: Tue Jun 10 20:58:15 2014
New Revision: 23802

URL: http://svn.gna.org/viewcvs/relax?rev=23802&view=rev
Log:
Made special ei, si, mi, and oi numpy structure array.

This is for rapid speed-up of numpy array creation in 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=23802&r1=23801&r2=23802&view=diff
==============================================================================
--- branches/disp_spin_speed/target_functions/relax_disp.py     (original)
+++ branches/disp_spin_speed/target_functions/relax_disp.py     Tue Jun 10 
20:58:15 2014
@@ -413,6 +413,12 @@
             self.zeros_a = zeros(self.numpy_array_shape, float64)
             self.ones_a = ones(self.numpy_array_shape, float64)
 
+            # Create special numpy structures.
+            self.ei_struct = zeros(self.numpy_array_shape[:1], float64)
+            self.si_struct = zeros(self.numpy_array_shape[:2], float64)
+            self.mi_struct = zeros(self.numpy_array_shape[:3], float64)
+            self.oi_struct = zeros(self.numpy_array_shape[:4], float64)
+
             # Create numpy arrays to pass to the lib function.
             # All numpy arrays have to have same shape to allow to multiply 
together.
             # The dimensions should be [ei][si][mi][oi][di]. 
[Experiment][spins][spec. frq][offset][disp points].




Related Messages


Powered by MHonArc, Updated Tue Jun 10 21:00:02 2014