Hi, I've noticed how simple this num_instances() method is, and that in many parts of relax it just returns the spin count. So I have created a base class method and deleted the num_instances() methods in the specific_fns code (see https://mail.gna.org/public/relax-commits/2008-01/msg00563.html). You can therefore delete this method from your consistency_tests.py code.
Regards, Edward On Jan 16, 2008 6:55 PM, <[EMAIL PROTECTED]> wrote: > 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: > <[EMAIL PROTECTED]>) > > > 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): > > > _______________________________________________ > relax (http://nmr-relax.com) > > This is the relax-commits mailing list > [EMAIL PROTECTED] > > To unsubscribe from this list, get a password > reminder, or change your subscription options, > visit the list information page at > https://mail.gna.org/listinfo/relax-commits > _______________________________________________ relax (http://nmr-relax.com) This is the relax-devel mailing list [email protected] To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-devel

