Author: bugman Date: Thu May 30 16:50:09 2013 New Revision: 19797 URL: http://svn.gna.org/viewcvs/relax?rev=19797&view=rev Log: Modified the dispersion calculate() method for the R2eff values to use the analytic equation. For the R2eff/R1rho values calculated for the fixed time period dispersion experiments via the calc user function, the very slow and tedious bootstrapping approach has been replaced by the very quick direct error calculation. The two techniques produce the same results as the bootstrap simulation number approaches infinity. 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=19797&r1=19796&r2=19797&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp/__init__.py (original) +++ branches/relax_disp/specific_analyses/relax_disp/__init__.py Thu May 30 16:50:09 2013 @@ -940,10 +940,6 @@ # Initialise the data structures. if not hasattr(spin, 'r2eff'): spin.r2eff = {} - if not hasattr(spin, 'r2eff_sim'): - spin.r2eff_sim = [] - for i in range(cdp.bootstrap_sim_num): - spin.r2eff_sim.append({}) if not hasattr(spin, 'r2eff_err'): spin.r2eff_err = {} @@ -976,19 +972,8 @@ # Calculate the R2eff value. spin.r2eff[param_key] = calc_two_point_r2eff(relax_time=time, I_ref=ref_intensity, I=intensity) - # Bootstrapping error propagation. - values = [] - for i in range(cdp.bootstrap_sim_num): - # Randomise the data. - I_ref = gauss(ref_intensity, ref_intensity_err) - I = gauss(intensity, intensity_err) - - # Calculate the simulation R2eff value. - spin.r2eff_sim[i][param_key] = calc_two_point_r2eff(relax_time=time, I_ref=I_ref, I=I) - values.append(spin.r2eff_sim[i][param_key]) - - # The standard deviation. - spin.r2eff_err[param_key] = std(values) + # The R2eff error. + spin.r2eff_err[param_key] = sqrt((ref_intensity_err / ref_intensity)**2 + (intensity_err / intensity)**2) / time def constraint_algorithm(self):