Author: tlinnet Date: Sat Dec 6 10:51:36 2014 New Revision: 26969 URL: http://svn.gna.org/viewcvs/relax?rev=26969&view=rev Log: Re-inserted the error_analysis() function in the auto class of relaxation dispersion. This function only checks if the error analysis has not been be performed before, and then decides to call the user function spectrum.error_analysis_per_field(). The implementation can be tested with. relax -d -s Relax_disp.test_estimate_r2eff_err_auto Modified: trunk/auto_analyses/relax_disp.py Modified: trunk/auto_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/relax_disp.py?rev=26969&r1=26968&r2=26969&view=diff ============================================================================== --- trunk/auto_analyses/relax_disp.py (original) +++ trunk/auto_analyses/relax_disp.py Sat Dec 6 10:51:36 2014 @@ -220,6 +220,35 @@ warn(RelaxWarning("This could make the numerical analysis with model '%s', 5 to 6 times slower." % (model))) + def error_analysis(self): + """Perform an error analysis of the peak intensities for each field strength separately.""" + + # Printout. + section(file=sys.stdout, text="Error analysis", prespace=2) + + # Check if intensity errors have already been calculated by the user. + precalc = True + for spin in spin_loop(skip_desel=True): + # No structure. + if not hasattr(spin, 'peak_intensity_err'): + precalc = False + break + + # Determine if a spectrum ID is missing from the list. + for id in cdp.spectrum_ids: + if id not in spin.peak_intensity_err: + precalc = False + break + + # Skip. + if precalc: + print("Skipping the error analysis as it has already been performed.") + return + + # Perform the error analysis. + self.interpreter.spectrum.error_analysis_per_field() + + def name_pipe(self, prefix): """Generate a unique name for the data pipe. @@ -524,7 +553,7 @@ # Peak intensity error analysis. if MODEL_R2EFF in self.models: - self.interpreter.spectrum.error_analysis_per_field() + self.error_analysis() # R1 parameter fitting. if self.r1_fit: