Author: bugman Date: Tue Nov 24 11:42:53 2009 New Revision: 9902 URL: http://svn.gna.org/viewcvs/relax?rev=9902&view=rev Log: Removed assemble_param_vector() and disassemble_param_vector() from the specific analysis API. Modified: 1.3/specific_fns/frame_order.py 1.3/specific_fns/model_free/main.py 1.3/specific_fns/model_free/mf_minimise.py 1.3/specific_fns/n_state_model.py 1.3/specific_fns/relax_fit.py Modified: 1.3/specific_fns/frame_order.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/frame_order.py?rev=9902&r1=9901&r2=9902&view=diff ============================================================================== --- 1.3/specific_fns/frame_order.py (original) +++ 1.3/specific_fns/frame_order.py Tue Nov 24 11:42:53 2009 @@ -50,7 +50,7 @@ class Frame_order(API_base): """Class containing the specific methods of the Frame Order theories.""" - def __assemble_param_vector(self): + def _assemble_param_vector(self): """Assemble and return the parameter vector. @return: The parameter vector. @@ -364,7 +364,7 @@ """ # Get the parameter vector. - param_vector = self.__assemble_param_vector() + param_vector = self._assemble_param_vector() # Get the data structures for optimisation using the tensors as base data sets. full_tensors, red_tensors, red_tensor_err, full_in_ref_frame = self.__minimise_setup_tensors() @@ -395,7 +395,7 @@ """Calculate the chi-squared value for the current parameter values.""" # Assemble the parameter vector. - param_vector = self.__assemble_param_vector() + param_vector = self._assemble_param_vector() # Get the data structures for optimisation using the tensors as base data sets. full_tensors, red_tensors, red_tensor_err, full_in_ref_frame = self.__minimise_setup_tensors() @@ -818,7 +818,7 @@ warn(RelaxWarning("Constraints are as of yet not implemented - turning this option off.")) # Assemble the parameter vector. - param_vector = self.__assemble_param_vector() + param_vector = self._assemble_param_vector() # Get the data structures for optimisation using the tensors as base data sets. full_tensors, red_tensors, red_tensor_err, full_in_ref_frame = self.__minimise_setup_tensors(sim_index) @@ -874,7 +874,7 @@ """ # Count the number of parameters. - param_vector = self.__assemble_param_vector() + param_vector = self._assemble_param_vector() k = len(param_vector) # The number of data points. Modified: 1.3/specific_fns/model_free/main.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/main.py?rev=9902&r1=9901&r2=9902&view=diff ============================================================================== --- 1.3/specific_fns/model_free/main.py (original) +++ 1.3/specific_fns/model_free/main.py Tue Nov 24 11:42:53 2009 @@ -195,7 +195,7 @@ return param_names - def assemble_param_vector(self, spin=None, spin_id=None, sim_index=None, model_type=None): + def _assemble_param_vector(self, spin=None, spin_id=None, sim_index=None, model_type=None): """Assemble the model-free parameter vector (as numpy array). If the spin argument is supplied, then the spin_id argument will be ignored. @@ -1347,7 +1347,7 @@ spin = None # Assemble the parameter values and return them. - return self.assemble_param_vector(spin=spin, sim_index=sim_index, model_type=model_type) + return self._assemble_param_vector(spin=spin, sim_index=sim_index, model_type=model_type) def is_spin_param(self, name): @@ -1896,7 +1896,7 @@ return None, None, None # Count the number of parameters. - param_vector = self.assemble_param_vector(spin=spin) + param_vector = self._assemble_param_vector(spin=spin) k = len(param_vector) # Count the number of data points. @@ -1908,7 +1908,7 @@ # Global stats. elif global_stats: # Count the number of parameters. - param_vector = self.assemble_param_vector() + param_vector = self._assemble_param_vector() k = len(param_vector) # Count the number of data points. Modified: 1.3/specific_fns/model_free/mf_minimise.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/model_free/mf_minimise.py?rev=9902&r1=9901&r2=9902&view=diff ============================================================================== --- 1.3/specific_fns/model_free/mf_minimise.py (original) +++ 1.3/specific_fns/model_free/mf_minimise.py Tue Nov 24 11:42:53 2009 @@ -141,7 +141,7 @@ raise RelaxError("Negative error for spin '" + repr(spin.num) + " " + spin.name + "', calculation not possible.") # Create the initial parameter vector. - param_vector = self.assemble_param_vector(spin=spin, sim_index=sim_index) + param_vector = self._assemble_param_vector(spin=spin, sim_index=sim_index) # Repackage the spin. if sim_index == None: @@ -167,7 +167,7 @@ num_params = [len(spin.params)] # Repackage the parameter values as a local model (ignore if the diffusion tensor is not fixed). - param_values = [self.assemble_param_vector(model_type='mf')] + param_values = [self._assemble_param_vector(model_type='mf')] # Convert to Numeric arrays. relax_data = [array(spin.relax_data, float64)] @@ -209,7 +209,7 @@ spin.chi2 = chi2 - def disassemble_param_vector(self, model_type, param_vector=None, spin=None, spin_id=None, sim_index=None): + def _disassemble_param_vector(self, model_type, param_vector=None, spin=None, spin_id=None, sim_index=None): """Disassemble the model-free parameter vector. @param model_type: The model-free model type. This must be one of 'mf', 'local_tm', @@ -865,14 +865,14 @@ # Parameter vector and diagonal scaling. if min_algor == 'back_calc': # Create the initial parameter vector. - param_vector = self.assemble_param_vector(spin=spin, model_type=model_type) + param_vector = self._assemble_param_vector(spin=spin, model_type=model_type) # Diagonal scaling. scaling_matrix = None else: # Create the initial parameter vector. - param_vector = self.assemble_param_vector(spin=spin, sim_index=sim_index) + param_vector = self._assemble_param_vector(spin=spin, sim_index=sim_index) # The number of parameters. num_params = len(param_vector) @@ -988,7 +988,7 @@ param_vector = dot(scaling_matrix, param_vector) # Disassemble the parameter vector. - self.disassemble_param_vector(model_type, param_vector=param_vector, spin=spin, sim_index=sim_index) + self._disassemble_param_vector(model_type, param_vector=param_vector, spin=spin, sim_index=sim_index) # Monte Carlo minimisation statistics. if sim_index != None: @@ -1205,7 +1205,7 @@ # Repackage the parameter values for minimising just the diffusion tensor parameters. if model_type == 'diff': - param_values.append(self.assemble_param_vector(model_type='mf')) + param_values.append(self._assemble_param_vector(model_type='mf')) # Convert to numpy arrays. for k in xrange(len(relax_data)): Modified: 1.3/specific_fns/n_state_model.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/n_state_model.py?rev=9902&r1=9901&r2=9902&view=diff ============================================================================== --- 1.3/specific_fns/n_state_model.py (original) +++ 1.3/specific_fns/n_state_model.py Tue Nov 24 11:42:53 2009 @@ -53,7 +53,7 @@ class N_state_model(API_base): """Class containing functions for the N-state model.""" - def __assemble_param_vector(self, sim_index=None): + def _assemble_param_vector(self, sim_index=None): """Assemble all the parameters of the model into a single array. @param sim_index: The index of the simulation to optimise. This should be None if @@ -201,7 +201,7 @@ return list - def __disassemble_param_vector(self, param_vector=None, data_types=None, sim_index=None): + def _disassemble_param_vector(self, param_vector=None, data_types=None, sim_index=None): """Disassemble the parameter vector and place the values into the relevant variables. For the 2-domain N-state model, the parameters are stored in the probability and Euler angle @@ -1379,7 +1379,7 @@ self.__update_model() # Create the initial parameter vector. - param_vector = self.__assemble_param_vector(sim_index=sim_index) + param_vector = self._assemble_param_vector(sim_index=sim_index) # Determine if alignment tensors or RDCs are to be used. data_types = self.__base_data_types() @@ -1444,7 +1444,7 @@ param_vector = dot(scaling_matrix, param_vector) # Disassemble the parameter vector. - self.__disassemble_param_vector(param_vector=param_vector, data_types=data_types, sim_index=sim_index) + self._disassemble_param_vector(param_vector=param_vector, data_types=data_types, sim_index=sim_index) # Monte Carlo minimisation statistics. if sim_index != None: Modified: 1.3/specific_fns/relax_fit.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/relax_fit.py?rev=9902&r1=9901&r2=9902&view=diff ============================================================================== --- 1.3/specific_fns/relax_fit.py (original) +++ 1.3/specific_fns/relax_fit.py Tue Nov 24 11:42:53 2009 @@ -45,7 +45,7 @@ class Relax_fit(API_base): """Class containing functions for relaxation curve fitting.""" - def assemble_param_vector(self, spin=None, sim_index=None): + def _assemble_param_vector(self, spin=None, sim_index=None): """Assemble the exponential curve parameter vector (as a numpy array). @keyword spin: The spin data container. @@ -144,7 +144,7 @@ """ # Create the initial parameter vector. - param_vector = self.assemble_param_vector(spin=spin) + param_vector = self._assemble_param_vector(spin=spin) # Create a scaling matrix. scaling_matrix = self.assemble_scaling_matrix(spin=spin, scaling=False) @@ -340,7 +340,7 @@ return 0.0 - def disassemble_param_vector(self, param_vector=None, spin=None, sim_index=None): + def _disassemble_param_vector(self, param_vector=None, spin=None, sim_index=None): """Disassemble the parameter vector. @keyword param_vector: The parameter vector. @@ -611,7 +611,7 @@ continue # Create the initial parameter vector. - param_vector = self.assemble_param_vector(spin=spin) + param_vector = self._assemble_param_vector(spin=spin) # Diagonal scaling. scaling_matrix = self.assemble_scaling_matrix(spin=spin, scaling=scaling) @@ -703,7 +703,7 @@ param_vector = dot(scaling_matrix, param_vector) # Disassemble the parameter vector. - self.disassemble_param_vector(param_vector=param_vector, spin=spin, sim_index=sim_index) + self._disassemble_param_vector(param_vector=param_vector, spin=spin, sim_index=sim_index) # Monte Carlo minimisation statistics. if sim_index != None: