Author: bugman Date: Tue Sep 25 14:03:50 2012 New Revision: 17553 URL: http://svn.gna.org/viewcvs/relax?rev=17553&view=rev Log: Added the data_check Boolean argument to all of the specific analysis overfit_deselect() methods. This allows the unit tests to pass. Modified: trunk/specific_fns/api_base.py trunk/specific_fns/api_common.py trunk/specific_fns/consistency_tests.py trunk/specific_fns/jw_mapping.py trunk/specific_fns/model_free/main.py trunk/specific_fns/noe/main.py trunk/specific_fns/relax_fit.py Modified: trunk/specific_fns/api_base.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_fns/api_base.py?rev=17553&r1=17552&r2=17553&view=diff ============================================================================== --- trunk/specific_fns/api_base.py (original) +++ trunk/specific_fns/api_base.py Tue Sep 25 14:03:50 2012 @@ -463,8 +463,12 @@ raise RelaxImplementError('num_instances') - def overfit_deselect(self): - """Deselect models with insufficient data for minimisation.""" + def overfit_deselect(self, data_check=True): + """Deselect models with insufficient data for minimisation. + + @keyword data_check: A flag to signal if the presence of base data is to be checked for. + @type data_check: bool + """ # Not implemented. raise RelaxImplementError('overfit_deselect') Modified: trunk/specific_fns/api_common.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_fns/api_common.py?rev=17553&r1=17552&r2=17553&view=diff ============================================================================== --- trunk/specific_fns/api_common.py (original) +++ trunk/specific_fns/api_common.py Tue Sep 25 14:03:50 2012 @@ -208,7 +208,7 @@ return count_spins() - def _overfit_deselect_dummy(self): + def _overfit_deselect_dummy(self, data_check=True): """Dummy method, normally for deselecting spins with insufficient data for minimisation.""" Modified: trunk/specific_fns/consistency_tests.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_fns/consistency_tests.py?rev=17553&r1=17552&r2=17553&view=diff ============================================================================== --- trunk/specific_fns/consistency_tests.py (original) +++ trunk/specific_fns/consistency_tests.py Tue Sep 25 14:03:50 2012 @@ -286,8 +286,12 @@ default_value_doc.add_table(_table.label) - def overfit_deselect(self): - """Deselect spins which have insufficient data to support calculation.""" + def overfit_deselect(self, data_check=True): + """Deselect spins which have insufficient data to support calculation. + + @keyword data_check: A flag to signal if the presence of base data is to be checked for. + @type data_check: bool + """ # Print out. print("\n\nOver-fit spin deselection.\n") Modified: trunk/specific_fns/jw_mapping.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_fns/jw_mapping.py?rev=17553&r1=17552&r2=17553&view=diff ============================================================================== --- trunk/specific_fns/jw_mapping.py (original) +++ trunk/specific_fns/jw_mapping.py Tue Sep 25 14:03:50 2012 @@ -270,8 +270,12 @@ default_value_doc.add_table(_table.label) - def overfit_deselect(self): - """Deselect spins which _have insufficient data to support calculation.""" + def overfit_deselect(self, data_check=True): + """Deselect spins which _have insufficient data to support calculation. + + @keyword data_check: A flag to signal if the presence of base data is to be checked for. + @type data_check: bool + """ # Print out. print("\n\nOver-fit spin deselection.\n") Modified: trunk/specific_fns/model_free/main.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_fns/model_free/main.py?rev=17553&r1=17552&r2=17553&view=diff ============================================================================== --- trunk/specific_fns/model_free/main.py (original) +++ trunk/specific_fns/model_free/main.py Tue Sep 25 14:03:50 2012 @@ -1933,7 +1933,11 @@ def overfit_deselect(self, data_check=True): - """Deselect spins which have insufficient data to support minimisation.""" + """Deselect spins which have insufficient data to support minimisation. + + @keyword data_check: A flag to signal if the presence of base data is to be checked for. + @type data_check: bool + """ # Print out. print("\n\nOver-fit spin deselection.\n") Modified: trunk/specific_fns/noe/main.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_fns/noe/main.py?rev=17553&r1=17552&r2=17553&view=diff ============================================================================== --- trunk/specific_fns/noe/main.py (original) +++ trunk/specific_fns/noe/main.py Tue Sep 25 14:03:50 2012 @@ -140,8 +140,12 @@ spin.noe_err = sqrt((sat_err * ref)**2 + (ref_err * sat)**2) / ref**2 - def overfit_deselect(self): - """Deselect spins which have insufficient data to support calculation.""" + def overfit_deselect(self, data_check=True): + """Deselect spins which have insufficient data to support calculation. + + @keyword data_check: A flag to signal if the presence of base data is to be checked for. + @type data_check: bool + """ # Print out. print("\n\nOver-fit spin deselection.\n") Modified: trunk/specific_fns/relax_fit.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_fns/relax_fit.py?rev=17553&r1=17552&r2=17553&view=diff ============================================================================== --- trunk/specific_fns/relax_fit.py (original) +++ trunk/specific_fns/relax_fit.py Tue Sep 25 14:03:50 2012 @@ -803,8 +803,12 @@ spin.warning = warning - def overfit_deselect(self): - """Deselect spins which have insufficient data to support minimisation.""" + def overfit_deselect(self, data_check=True): + """Deselect spins which have insufficient data to support minimisation. + + @keyword data_check: A flag to signal if the presence of base data is to be checked for. + @type data_check: bool + """ # Print out. print("\n\nOver-fit spin deselection.\n")