Author: bugman Date: Sat Jul 5 19:03:36 2008 New Revision: 6762 URL: http://svn.gna.org/viewcvs/relax?rev=6762&view=rev Log: Fixes for the overfit_deselect() method. The diffusion tensor object is now correctly referenced and the params variable can be None. Modified: 1.3/specific_fns/model_free/main.py 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=6762&r1=6761&r2=6762&view=diff ============================================================================== --- 1.3/specific_fns/model_free/main.py (original) +++ 1.3/specific_fns/model_free/main.py Sat Jul 5 19:03:36 2008 @@ -1712,9 +1712,9 @@ def overfit_deselect(self): - """Function for deselecting residues without sufficient data to support minimisation""" - - # Test sequence data exists. + """Deselect spins which have insufficient data to support minimisation.""" + + # Test if sequence data exists. if not exists_mol_res_spin_data(): raise RelaxNoSequenceError @@ -1723,7 +1723,7 @@ # Is structural data required? need_vect = False - if hasattr(cdp, 'diff') and (cdp.diff_tensor.type == 'spheroid' or cdp.diff_tensor.type == 'ellipsoid'): + if hasattr(cdp, 'diff_tensor') and (cdp.diff_tensor.type == 'spheroid' or cdp.diff_tensor.type == 'ellipsoid'): need_vect = True # Loop over the sequence. @@ -1737,7 +1737,7 @@ spin.select = False # Require at least as many data points as params to prevent over-fitting. - elif hasattr(spin, 'params') and len(spin.params) > len(spin.relax_data): + elif hasattr(spin, 'params') and spin.params and len(spin.params) > len(spin.relax_data): spin.select = False # Test for structural data if required.