Author: bugman Date: Sat Jun 8 00:17:09 2013 New Revision: 19965 URL: http://svn.gna.org/viewcvs/relax?rev=19965&view=rev Log: Fixes for the dispersion specific model_statistics() method. This now handles spin clustering correctly. Modified: branches/relax_disp/specific_analyses/relax_disp/__init__.py Modified: branches/relax_disp/specific_analyses/relax_disp/__init__.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/__init__.py?rev=19965&r1=19964&r2=19965&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp/__init__.py (original) +++ branches/relax_disp/specific_analyses/relax_disp/__init__.py Sat Jun 8 00:17:09 2013 @@ -1472,15 +1472,16 @@ spin_ids = model_info spins = spin_ids_to_containers(spin_ids) - # Take the number of parameters from the first spin. - k = len(spins[0].params) - - # The number of points and chi-squared is the sum from all spins. + # The number of parameters for the cluster. + k = param_num(spins=spins) + + # The number of points from all spins. n = 0 - chi2 = 0.0 for spin in spins: n += len(spin.r2eff) - chi2 += spin.chi2 + + # Take the chi-squared from the first spin of the cluster. + chi2 = spins[0].chi2 # Return the values. return k, n, chi2