Author: bugman Date: Thu Feb 2 15:13:54 2012 New Revision: 15288 URL: http://svn.gna.org/viewcvs/relax?rev=15288&view=rev Log: Saved a lot of memory with the Sobol sequence generation by using float16 and not keeping raw points. Modified: branches/frame_order_testing/maths_fns/frame_order.py Modified: branches/frame_order_testing/maths_fns/frame_order.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/maths_fns/frame_order.py?rev=15288&r1=15287&r2=15288&view=diff ============================================================================== --- branches/frame_order_testing/maths_fns/frame_order.py (original) +++ branches/frame_order_testing/maths_fns/frame_order.py Thu Feb 2 15:13:54 2012 @@ -26,7 +26,7 @@ # Python module imports. from copy import deepcopy from math import acos, pi, sqrt -from numpy import array, dot, float64, ones, transpose, zeros +from numpy import array, dot, float16, float64, ones, transpose, zeros from numpy.linalg import norm # relax module imports. @@ -1723,22 +1723,21 @@ m = len(dims) # Initialise. - self.sobol_raw = zeros((n, m), float64) - self.sobol_angles = zeros((n, m), float64) + self.sobol_angles = zeros((n, m), float16) # Loop over the points. for i in range(n): # The raw point. - self.sobol_raw[i], seed = i4_sobol(m, i) + point, seed = i4_sobol(m, i) # Loop over the dimensions, converting the points to angles. for j in range(m): if dims[j] in ['theta']: - self.sobol_angles[i, j] = 2.0 * pi * self.sobol_raw[i, j] + self.sobol_angles[i, j] = 2.0 * pi * point[j] if dims[j] in ['phi']: - self.sobol_angles[i, j] = acos(2.0*self.sobol_raw[i, j] - 1.0) + self.sobol_angles[i, j] = acos(2.0*point[j] - 1.0) if dims[j] in ['sigma']: - self.sobol_angles[i, j] = 2.0 * pi * (self.sobol_raw[i, j] - 0.5) + self.sobol_angles[i, j] = 2.0 * pi * (point[j] - 0.5) def reduce_and_rot(self, ave_pos_alpha=None, ave_pos_beta=None, ave_pos_gamma=None, daeg=None):