Author: bugman Date: Mon Oct 8 22:38:18 2012 New Revision: 17772 URL: http://svn.gna.org/viewcvs/relax?rev=17772&view=rev Log: Deleted the now unused _update_sim_set() method of the diffusion tensor data structure. Modified: branches/tensor_data/data/diff_tensor.py Modified: branches/tensor_data/data/diff_tensor.py URL: http://svn.gna.org/viewcvs/relax/branches/tensor_data/data/diff_tensor.py?rev=17772&r1=17771&r2=17772&view=diff ============================================================================== --- branches/tensor_data/data/diff_tensor.py (original) +++ branches/tensor_data/data/diff_tensor.py Mon Oct 8 22:38:18 2012 @@ -663,81 +663,6 @@ raise RelaxError("The diffusion tensor is a read-only object. The diffusion tensor set() method must be used instead.") - def _update_sim_set(self, param_name, slice_obj): - """Update the Monte Carlo simulation data lists when a simulation value is set. - - @param param_name: The MC sim parameter name which is being set. - @type param_name: str - @param slice_obj: For Python 2, the index of the Monte Carlo simulation which was set. Or for Python 3, a slice object. - @type slice_obj: int or slice object - """ - - # Python 3 support. - if py_version == 3: - if slice_obj.start != slice_obj.stop: - raise RelaxError("The slice object %s cannot be handled." % slice_obj) - - # The index of the object. - index = slice_obj.start - - # Python 2. - else: - index = slice_obj - - # Loop over the targets. - for target, update_if_set, depends in dependency_generator(self.type): - # Only update if the parameter name is within the 'update_if_set' list. - if not param_name in update_if_set: - continue - - # Get the function for calculating the value. - fn = globals()['calc_'+target] - - # Get all the dependencies if possible. - missing_dep = 0 - deps = () - for dep_name in depends: - # Modify the dependency name. - if dep_name not in ['type', 'spheroid_type']: - dep_name = dep_name+'_sim' - - # Test if the MC sim object exists. - if not hasattr(self, dep_name): - missing_dep = 1 - break - - # Get the MC dependency. - dep_obj = getattr(self, dep_name) - - # The diffusion tensor type. - if dep_name in ['type', 'spheroid_type']: - deps = deps+(dep_obj,) - continue - - # Test if the MC sim dependency is long enough. - if len(dep_obj) <= index: - missing_dep = 1 - break - - # Place the value corresponding to the index into the 'deps' array. - deps = deps+(dep_obj[index],) - - # Only update the MC simulation object if its dependencies exist. - if not missing_dep: - # Get the target object. - target_obj = getattr(self, target+'_sim') - - # Missing data. - skip = False - for i in range(len(deps)): - if deps[i] == None: - skip = True - - # Calculate and set the value. - if not skip: - target_obj.set_untouchable_item(slice_obj, fn(*deps)) - - def _update_object(self, param_name, target, update_if_set, depends, category): """Function for updating the target object, its error, and the MC simulations.