Author: bugman
Date: Wed Sep 17 17:11:28 2014
New Revision: 25872
URL: http://svn.gna.org/viewcvs/relax?rev=25872&view=rev
Log:
Changed the creation of the Sobol' points in the frame order target function.
For increased accuracy of the numerical PCS integration, the first 1000 points
of the Sobol'
sequence are now skipped to avoid any bias. For speed, the axis order of the
Sobol' torsion-tilt
angles has been swapped so that the numpy.swapaxes() function call is no longer
required in the
lib.frame_order.*.pcs_numeric_int_*() functions.
Modified:
branches/frame_order_cleanup/target_functions/frame_order.py
Modified: branches/frame_order_cleanup/target_functions/frame_order.py
URL:
http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/target_functions/frame_order.py?rev=25872&r1=25871&r2=25872&view=diff
==============================================================================
--- branches/frame_order_cleanup/target_functions/frame_order.py
(original)
+++ branches/frame_order_cleanup/target_functions/frame_order.py Wed Sep
17 17:11:28 2014
@@ -25,7 +25,7 @@
# Python module imports.
from copy import deepcopy
from math import acos, cos, pi, sin, sqrt
-from numpy import add, array, dot, float64, ones, outer, subtract, transpose,
uint8, zeros
+from numpy import add, array, dot, float64, ones, outer, subtract, swapaxes,
transpose, uint8, zeros
# relax module imports.
from extern.sobol.sobol_lib import i4_sobol_generate
@@ -1208,12 +1208,12 @@
total_num = int(self.sobol_max_points * self.sobol_oversample * 10**m)
# Initialise.
- self.sobol_angles = zeros((total_num, m), float64)
+ self.sobol_angles = zeros((m, total_num), float64)
self.Ri_prime = zeros((total_num, 3, 3), float64)
self.Ri2_prime = zeros((total_num, 3, 3), float64)
# The Sobol' points.
- points = i4_sobol_generate(m, total_num, 0)
+ points = i4_sobol_generate(m, total_num, 1000)
# Loop over the points.
for i in range(total_num):
@@ -1225,22 +1225,22 @@
# The tilt angle - the angle of rotation about the x-y plane
rotation axis.
if dims[j] in ['theta']:
theta = acos(2.0*points[j, i] - 1.0)
- self.sobol_angles[i, j] = theta
+ self.sobol_angles[j, i] = theta
# The angle defining the x-y plane rotation axis.
if dims[j] in ['phi']:
phi = 2.0 * pi * points[j, i]
- self.sobol_angles[i, j] = phi
+ self.sobol_angles[j, i] = phi
# The 1st torsion angle - the angle of rotation about the z'
axis (or y' for the double motion models).
if dims[j] in ['sigma']:
sigma = 2.0 * pi * (points[j, i] - 0.5)
- self.sobol_angles[i, j] = sigma
+ self.sobol_angles[j, i] = sigma
# The 2nd torsion angle - the angle of rotation about the x'
axis.
if dims[j] in ['sigma2']:
sigma2 = 2.0 * pi * (points[j, i] - 0.5)
- self.sobol_angles[i, j] = sigma2
+ self.sobol_angles[j, i] = sigma2
# Pre-calculate the rotation matrices for the double motion models.
if 'sigma2' in dims:
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits