Author: bugman Date: Thu Feb 2 17:04:32 2012 New Revision: 15291 URL: http://svn.gna.org/viewcvs/relax?rev=15291&view=rev Log: Changed the mcint flag to the quad_int flag. This is a variable of the frame order data pipes, and is used to switch numerical optimisation techniques. Modified: branches/frame_order_testing/maths_fns/frame_order.py branches/frame_order_testing/specific_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=15291&r1=15290&r2=15291&view=diff ============================================================================== --- branches/frame_order_testing/maths_fns/frame_order.py (original) +++ branches/frame_order_testing/maths_fns/frame_order.py Thu Feb 2 17:04:32 2012 @@ -50,7 +50,7 @@ class Frame_order: """Class containing the target function of the optimisation of Frame Order matrix components.""" - def __init__(self, model=None, init_params=None, full_tensors=None, full_in_ref_frame=None, rdcs=None, rdc_errors=None, rdc_weights=None, rdc_vect=None, rdc_const=None, pcs=None, pcs_errors=None, pcs_weights=None, pcs_atoms=None, temp=None, frq=None, paramag_centre=None, scaling_matrix=None, num_int_pts=500, pivot=None, pivot_opt=False, mcint=True): + def __init__(self, model=None, init_params=None, full_tensors=None, full_in_ref_frame=None, rdcs=None, rdc_errors=None, rdc_weights=None, rdc_vect=None, rdc_const=None, pcs=None, pcs_errors=None, pcs_weights=None, pcs_atoms=None, temp=None, frq=None, paramag_centre=None, scaling_matrix=None, num_int_pts=500, pivot=None, pivot_opt=False, quad_int=True): """Set up the target functions for the Frame Order theories. @keyword model: The name of the Frame Order model. @@ -93,8 +93,8 @@ @type pivot: numpy rank-1, 3D array or None @keyword pivot_opt: A flag which if True will allow the pivot point of the motion to be optimised. @type pivot_opt: bool - @keyword mcint: A flag which if True will activate the rough Monte Carlo numerical integration rather than the scipy.integrate quad(), dblquad() and tplquad() integration methods. - @type mcint: bool + @keyword quad_int: A flag which if True will perform high precision numerical integration via the scipy.integrate quad(), dblquad() and tplquad() integration methods rather than the rough quasi-random numerical integration. + @type quad_int: bool """ # Model test. @@ -271,7 +271,7 @@ self.d2rdc_theta = zeros((self.total_num_params, self.total_num_params, self.num_align, self.num_rdc), float64) # The Sobol' sequence data and target function aliases (quasi-random integration). - if mcint: + if not quad_int: if model == 'pseudo-ellipse': self.create_sobol_data(n=self.num_int_pts, dims=['theta', 'phi', 'sigma']) self.func = self.func_pseudo_ellipse_qrint Modified: branches/frame_order_testing/specific_fns/frame_order.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/specific_fns/frame_order.py?rev=15291&r1=15290&r2=15291&view=diff ============================================================================== --- branches/frame_order_testing/specific_fns/frame_order.py (original) +++ branches/frame_order_testing/specific_fns/frame_order.py Thu Feb 2 17:04:32 2012 @@ -1004,12 +1004,12 @@ cdp.params = [] # Scipy quadratic numerical integration. - if cdp.model in ['rotor']: - cdp.mcint = False - - # Simple Monte Carlo integration. + if cdp.model in []: + cdp.quad_int = True + + # Quasi-random numerical integration. else: - cdp.mcint = True + cdp.quad_int = False # Update the model. self._update_model() @@ -1130,7 +1130,7 @@ cdp.num_int_pts = 200000 # Set up the optimisation function. - target = frame_order.Frame_order(model=cdp.model, init_params=param_vector, full_tensors=full_tensors, full_in_ref_frame=full_in_ref_frame, rdcs=rdcs, rdc_errors=rdc_err, rdc_weights=rdc_weight, rdc_vect=rdc_vect, rdc_const=rdc_const, pcs=pcs, pcs_errors=pcs_err, pcs_weights=pcs_weight, pcs_atoms=pcs_atoms, temp=temp, frq=frq, paramag_centre=paramag_centre, scaling_matrix=scaling_matrix, pivot=pivot, pivot_opt=pivot_opt, num_int_pts=cdp.num_int_pts, mcint=cdp.mcint) + target = frame_order.Frame_order(model=cdp.model, init_params=param_vector, full_tensors=full_tensors, full_in_ref_frame=full_in_ref_frame, rdcs=rdcs, rdc_errors=rdc_err, rdc_weights=rdc_weight, rdc_vect=rdc_vect, rdc_const=rdc_const, pcs=pcs, pcs_errors=pcs_err, pcs_weights=pcs_weight, pcs_atoms=pcs_atoms, temp=temp, frq=frq, paramag_centre=paramag_centre, scaling_matrix=scaling_matrix, pivot=pivot, pivot_opt=pivot_opt, num_int_pts=cdp.num_int_pts, quad_int=cdp.quad_int) # Return the data. return target, param_vector, data_types, scaling_matrix