mailr23805 - /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:24 2014
New Revision: 23805

URL: http://svn.gna.org/viewcvs/relax?rev=23805&view=rev
Log:
Replaced self.spins_a with self.disp_struct.

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=23805&r1=23804&r2=23805&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:24 2014
@@ -430,7 +430,7 @@
             self.num_disp_points_a = deepcopy(self.zeros_a)
 
             self.frqs_a = deepcopy(self.zeros_a)
-            self.spins_a = deepcopy(self.zeros_a)
+            self.disp_struct = deepcopy(self.zeros_a)
             self.not_spins_a = deepcopy(self.ones_a)
             self.has_missing = False
 
@@ -457,7 +457,7 @@
                             self.frqs_a[ei][si][mi][oi][:num_disp_points] = 
self.frqs[ei][si][mi]
                             
                             # Make a spin 1/0 file.
-                            self.spins_a[ei][si][mi][oi][:num_disp_points] = 
ones(num_disp_points)
+                            
self.disp_struct[ei][si][mi][oi][:num_disp_points] = ones(num_disp_points)
                             
self.not_spins_a[ei][si][mi][oi][:num_disp_points] = zeros(num_disp_points)
 
                             for di in 
range(self.num_disp_points[ei][si][mi][oi]):
@@ -555,7 +555,7 @@
         dw_axis = tile(dw_axis, (1, 1, self.numpy_array_shape[2], 
self.numpy_array_shape[3], self.numpy_array_shape[4]))
 
         # Convert dw from ppm to rad/s.
-        dw_frq_a = dw_axis*self.spins_a*self.frqs_a
+        dw_frq_a = dw_axis*self.disp_struct*self.frqs_a
 
         # Reshape R20A and R20B to per experiment, spin and frequency.
         R20A_axis = R20A.reshape(self.numpy_array_shape[0], 
self.numpy_array_shape[1], self.numpy_array_shape[2])
@@ -566,14 +566,14 @@
         R20B_axis = R20B_axis[:,:,:,None,None]
 
         # Tile R20A and R20B according to maximum of dispersion points. 
Multiply with spin structure array.
-        R20A_axis = tile(R20A_axis, (1, 1, 1, self.numpy_array_shape[3], 
self.numpy_array_shape[4])) * self.spins_a
-        R20B_axis = tile(R20B_axis, (1, 1, 1, self.numpy_array_shape[3], 
self.numpy_array_shape[4])) * self.spins_a
+        R20A_axis = tile(R20A_axis, (1, 1, 1, self.numpy_array_shape[3], 
self.numpy_array_shape[4])) * self.disp_struct
+        R20B_axis = tile(R20B_axis, (1, 1, 1, self.numpy_array_shape[3], 
self.numpy_array_shape[4])) * self.disp_struct
 
         ## Back calculate the R2eff values.
         r2eff_CR72(r20a=R20A_axis, r20b=R20B_axis, pA=pA, dw=dw_frq_a, 
kex=kex, cpmg_frqs=self.cpmg_frqs_a, back_calc=self.back_calc_a, 
num_points=self.num_disp_points_a)
 
         # Clean the data for all values, which is left over at the end of 
arrays.
-        self.back_calc_a = self.back_calc_a*self.spins_a
+        self.back_calc_a = self.back_calc_a*self.disp_struct
 
         ## For all missing data points, set the back-calculated value to the 
measured values so that it has no effect on the chi-squared value.
         if self.has_missing:




Related Messages


Powered by MHonArc, Updated Tue Jun 10 21:20:01 2014