Author: semor Date: Wed Jan 16 18:55:37 2008 New Revision: 4801 URL: http://svn.gna.org/viewcvs/relax?rev=4801&view=rev Log: Introduced the count_spins() function into the consitency tests code. This change is part of the shifting to the new design. I was explained in a post by Edward d'Auvergne at: https://mail.gna.org/public/relax-devel/2008-01/msg00041.html (Message-id: <7f080ed10801111043g7954a49fic72f433110d4cfbc@xxxxxxxxxxxxxx>) Modified: branches/consistency_tests_1.3/specific_fns/consistency_tests.py Modified: branches/consistency_tests_1.3/specific_fns/consistency_tests.py URL: http://svn.gna.org/viewcvs/relax/branches/consistency_tests_1.3/specific_fns/consistency_tests.py?rev=4801&r1=4800&r2=4801&view=diff ============================================================================== --- branches/consistency_tests_1.3/specific_fns/consistency_tests.py (original) +++ branches/consistency_tests_1.3/specific_fns/consistency_tests.py Wed Jan 16 18:55:37 2008 @@ -28,7 +28,7 @@ # relax module imports. from data import Data as relax_data_store from base_class import Common_functions -from generic_fns.selection import exists_mol_res_spin_data, spin_loop +from generic_fns.selection import count_spins, exists_mol_res_spin_data, spin_loop from maths_fns.consistency_tests import Consistency from relax_errors import RelaxError, RelaxFuncSetupError, RelaxNoPipeError, RelaxNoSequenceError, RelaxNoValueError from physical_constants import N15_CSA, NH_BOND_LENGTH @@ -264,15 +264,8 @@ def num_instances(self): """Function for returning the number of instances.""" - # Alias the current data pipe. - cdp = relax_data_store[relax_data_store.current_pipe] - - # Test if sequence data is loaded. - if not exists_mol_res_spin_data(): - return 0 - # Return the number of residues. - return len(cdp.res) + return count_spins() def overfit_deselect(self):