Author: bugman Date: Thu May 22 00:20:47 2008 New Revision: 6231 URL: http://svn.gna.org/viewcvs/relax?rev=6231&view=rev Log: Updated the set_error() method to the new design. Modified: 1.3/specific_fns/base_class.py Modified: 1.3/specific_fns/base_class.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/base_class.py?rev=6231&r1=6230&r2=6231&view=diff ============================================================================== --- 1.3/specific_fns/base_class.py (original) +++ 1.3/specific_fns/base_class.py Thu May 22 00:20:47 2008 @@ -198,14 +198,22 @@ return value, error - def set_error(self, run, instance, index, error): - """Function for setting parameter errors.""" - - # Arguments. - self.run = run - - # Skip deselected residues. - if not relax_data_store.res[self.run][instance].select: + def set_error(self, instance, index, error): + """Set the parameter errors. + + @param instance: The spin index. + @type instance: int + @param index: The index of the parameter to set the errors for. + @type index: int + @param error: The error value. + @type error: float + """ + + # Get the SpinContainer. + spin = return_spin_from_index(instance) + + # Skip deselected spins. + if not spin.select: return # Parameter increment counter. @@ -215,7 +223,7 @@ for param in self.data_names(set='params'): # Return the parameter array. if index == inc: - setattr(relax_data_store.res[self.run][instance], param + "_err", error) + setattr(spin, param + "_err", error) # Increment. inc = inc + 1