Author: bugman Date: Wed Nov 20 19:56:24 2013 New Revision: 21561 URL: http://svn.gna.org/viewcvs/relax?rev=21561&view=rev Log: Bug fix for the dispersion specific model_information() method. This can now handle deselected spins with no data. Modified: branches/relax_disp/specific_analyses/relax_disp/api.py Modified: branches/relax_disp/specific_analyses/relax_disp/api.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/api.py?rev=21561&r1=21560&r2=21561&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp/api.py (original) +++ branches/relax_disp/specific_analyses/relax_disp/api.py Wed Nov 20 19:56:24 2013 @@ -1071,8 +1071,12 @@ for spin in spins: n += len(spin.r2eff) - # Take the chi-squared from the first spin of the cluster. - chi2 = spins[0].chi2 + # Take the chi-squared from the first spin of the cluster (which has a value). + chi2 = None + for spin in spins: + if hasattr(spin, 'chi2'): + chi2 = spin.chi2 + break # Return the values. return k, n, chi2