Author: bugman Date: Thu May 30 17:45:52 2013 New Revision: 19798 URL: http://svn.gna.org/viewcvs/relax?rev=19798&view=rev Log: Bug fix for the peak intensity error analysis in the dispersion auto-analysis. Now the error analysis is split based on the magnetic field strength. Previously the analysis was a mess with the split often being individual spectra. Modified: branches/relax_disp/auto_analyses/relax_disp.py Modified: branches/relax_disp/auto_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/auto_analyses/relax_disp.py?rev=19798&r1=19797&r2=19798&view=diff ============================================================================== --- branches/relax_disp/auto_analyses/relax_disp.py (original) +++ branches/relax_disp/auto_analyses/relax_disp.py Thu May 30 17:45:52 2013 @@ -31,6 +31,7 @@ from lib.text.sectioning import title, subtitle from pipe_control.pipes import has_pipe from prompt.interpreter import Interpreter +from specific_analyses.relax_disp.disp_data import loop_frq from specific_analyses.relax_disp.variables import CPMG_EXP, FIXED_TIME_EXP, MODEL_CR72, MODEL_LM63, MODEL_R2EFF from status import Status; status = Status() @@ -110,50 +111,24 @@ def error_analysis(self): - """Perform an error analysis of the peak intensities. - - The error analysis is separated into subsets for each spectrometer frequency and dispersion point. - """ - - # The number of spectrometer field strengths. - frqs = [None] - if hasattr(cdp, 'spectrometer_frq_list'): - frqs = cdp.spectrometer_frq_list - - # Dispersion points. - if cdp.exp_type in CPMG_EXP: - disp_points = cdp.cpmg_frqs - else: - disp_points = cdp.spin_lock_nu1 - fields = unique_elements(disp_points.values()) - fields.sort() - - # Fixed relaxation time periods. - if cdp.exp_type in FIXED_TIME_EXP: - fields = [None] - - # Loop over the spectrometer frequencies, then the dispersion points. - for frq in frqs: - for field in fields: - # Generate a list of spectrum IDs matching the frequency and field. - ids = [] - for id in cdp.spectrum_ids: - # Check that the spectrometer frequency matches. - match_frq = True - if frq != None and cdp.spectrometer_frq[id] != frq: - match_frq = False - - # Check that the dispersion point matches. - match_disp_point = True - if field != None and disp_points[id] != field: - match_disp_point = False - - # Add the ID. - if match_frq and match_disp_point: - ids.append(id) - - # Run the error analysis on the subset. - self.interpreter.spectrum.error_analysis(subset=ids) + """Perform an error analysis of the peak intensities for each field strength separately.""" + + # Loop over the spectrometer frequencies. + for frq in loop_frq(): + # Generate a list of spectrum IDs matching the frequency. + ids = [] + for id in cdp.spectrum_ids: + # Check that the spectrometer frequency matches. + match_frq = True + if frq != None and cdp.spectrometer_frq[id] != frq: + match_frq = False + + # Add the ID. + if match_frq: + ids.append(id) + + # Run the error analysis on the subset. + self.interpreter.spectrum.error_analysis(subset=ids) def optimise(self):