Author: bugman Date: Wed May 21 21:40:48 2008 New Revision: 6192 URL: http://svn.gna.org/viewcvs/relax?rev=6192&view=rev Log: Updated the overfit_deselect() method to the new design. Modified: 1.3/specific_fns/relax_fit.py Modified: 1.3/specific_fns/relax_fit.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/relax_fit.py?rev=6192&r1=6191&r2=6192&view=diff ============================================================================== --- 1.3/specific_fns/relax_fit.py (original) +++ 1.3/specific_fns/relax_fit.py Wed May 21 21:40:48 2008 @@ -812,24 +812,23 @@ spin.params = params - def overfit_deselect(self, run): - """Function for deselecting residues without sufficient data to support minimisation""" - - # Test the sequence data exists: - if not relax_data_store.res.has_key(run): - raise RelaxNoSequenceError, run - - # Loop over residue data: - for residue in relax_data_store.res[run]: - - # Check for sufficient data - if not hasattr(residue, 'intensities'): - residue.select = 0 + def overfit_deselect(self): + """Deselect spins which have insufficient data to support minimisation.""" + + # Test the sequence data exists. + if not exists_mol_res_spin_data(): + raise RelaxNoSequenceError + + # Loop over spin data. + for spin in spin_loop(): + # Check if data exists. + if not hasattr(spin, 'intensities'): + spin.select = 0 continue - # Require 3 or more data points - if len(residue.intensities) < 3: - residue.select = 0 + # Require 3 or more data points. + if len(spin.intensities) < 3: + spin.select = 0 continue