Author: bugman Date: Fri Jun 7 11:41:54 2013 New Revision: 19937 URL: http://svn.gna.org/viewcvs/relax?rev=19937&view=rev Log: Improvements to the relax_disp.plot_disp_curves user function. The back-calculated R2eff/R1rho values are now included in the plot as separate sets. In addition, the residuals have also been added to allow for a visual statistical comparison. 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=19937&r1=19936&r2=19937&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp/__init__.py (original) +++ branches/relax_disp/specific_analyses/relax_disp/__init__.py Fri Jun 7 11:41:54 2013 @@ -661,7 +661,47 @@ err = True data[-1][-1].append(spin.r2eff_err[key]) - # FIXME: Add the back-calculated data as a second set. + # Add the back-calculated data. + for frq in loop_frq(): + # Add a new set for the data at each frequency. + data.append([]) + + # Loop over the dispersion points. + for disp_point in loop_point(): + # The data key. + key = return_param_key_from_data(frq=frq, point=disp_point) + + # No data present. + if not hasattr(spin, 'r2eff_bc') or key not in spin.r2eff_bc: + continue + + # Add the data. + data[-1].append([disp_point, spin.r2eff_bc[key]]) + + # Handle the errors. + if err: + data[-1][-1].append(None) + + # Add the residuals for statistical comparison. + for frq in loop_frq(): + # Add a new set for the data at each frequency. + data.append([]) + + # Loop over the dispersion points. + for disp_point in loop_point(): + # The data key. + key = return_param_key_from_data(frq=frq, point=disp_point) + + # No data present. + if key not in spin.r2eff or not hasattr(spin, 'r2eff_bc') or key not in spin.r2eff_bc: + continue + + # Add the data. + data[-1].append([disp_point, spin.r2eff[key] - spin.r2eff_bc[key]]) + + # Handle the errors. + if err: + data[-1][-1].append(None) # The axis labels. if cdp.exp_type == 'CPMG':