Author: bugman Date: Fri Sep 6 15:26:29 2013 New Revision: 20902 URL: http://svn.gna.org/viewcvs/relax?rev=20902&view=rev Log: Bug fixes for the specific_analyses.relax_disp.checks.get_times() function. The function is now more tolerant if certain data has now been set up yet. Modified: branches/relax_disp/specific_analyses/relax_disp/checks.py Modified: branches/relax_disp/specific_analyses/relax_disp/checks.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/specific_analyses/relax_disp/checks.py?rev=20902&r1=20901&r2=20902&view=diff ============================================================================== --- branches/relax_disp/specific_analyses/relax_disp/checks.py (original) +++ branches/relax_disp/specific_analyses/relax_disp/checks.py Fri Sep 6 15:26:29 2013 @@ -229,12 +229,20 @@ for type in cdp.exp_type_list: times[type] = [] - # No experiment types set. + # Not set up yet. if not hasattr(cdp, 'exp_type') or not hasattr(cdp, 'spectrum_ids') or not hasattr(cdp, 'relax_times'): return times # Loop over all spectra IDs. for id in cdp.spectrum_ids: + # No time set. + if id not in cdp.relax_times: + continue + + # No type set. + if id not in cdp.exp_type: + continue + # Count the number of times. if cdp.relax_times[id] not in times[cdp.exp_type[id]]: times[cdp.exp_type[id]].append(cdp.relax_times[id])