Author: bugman Date: Thu Aug 14 14:39:24 2008 New Revision: 7193 URL: http://svn.gna.org/viewcvs/relax?rev=7193&view=rev Log: Wrote the model_statistics() method. Modified: branches/rdc_analysis/specific_fns/n_state_model.py Modified: branches/rdc_analysis/specific_fns/n_state_model.py URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/specific_fns/n_state_model.py?rev=7193&r1=7192&r2=7193&view=diff ============================================================================== --- branches/rdc_analysis/specific_fns/n_state_model.py (original) +++ branches/rdc_analysis/specific_fns/n_state_model.py Thu Aug 14 14:39:24 2008 @@ -1169,6 +1169,34 @@ cdp.warning = warning + def model_statistics(self, instance=None, spin_id=None, global_stats=None): + """Return the k, n, and chi2 model statistics. + + k - number of parameters. + n - number of data points. + chi2 - the chi-squared value. + + + @keyword instance: This is the optimisation instance index. This should always be the + value of 1 for the N-state model. As it is ignored, this arg can be + anything. + @type instance: None or int + @keyword spin_id: The spin identification string. This is ignored in the N-state + model. + @type spin_id: None or str + @keyword global_stats: A parameter which determines if global or local statistics are + returned. For the N-state model, this argument is ignored. + @type global_stats: None or bool + @return: The optimisation statistics, in tuple format, of the number of + parameters (k), the number of data points (n), and the chi-squared + value (chi2). + @rtype: tuple of (int, int, float) + """ + + # Return the values. + return self.param_num(), self.num_data_points(), ds[ds.current_pipe].chi2 + + def number_of_states(self, N=None): """Set the number of states in the N-state model.