Author: bugman Date: Tue Aug 2 10:22:42 2011 New Revision: 14052 URL: http://svn.gna.org/viewcvs/relax?rev=14052&view=rev Log: Added checks for sequence and spectral data for the Rx curve-fitting and NOE auto-analysis tabs. Modified: branches/gui_testing/gui/analyses/auto_noe.py branches/gui_testing/gui/analyses/auto_rx_base.py Modified: branches/gui_testing/gui/analyses/auto_noe.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/auto_noe.py?rev=14052&r1=14051&r2=14052&view=diff ============================================================================== --- branches/gui_testing/gui/analyses/auto_noe.py (original) +++ branches/gui_testing/gui/analyses/auto_noe.py Tue Aug 2 10:22:42 2011 @@ -32,7 +32,7 @@ # relax module imports. from auto_analyses.noe import NOE_calc from data import Relax_data_store; ds = Relax_data_store() -from generic_fns.mol_res_spin import are_spins_named +from generic_fns.mol_res_spin import are_spins_named, exists_mol_res_spin_data from generic_fns.pipes import has_pipe from status import Status; status = Status() @@ -147,6 +147,14 @@ # Results directory. data.save_dir = self.data.save_dir + # Check if sequence data is loaded + if not exists_mol_res_spin_data(): + missing.append("Sequence data") + + # Spectral data. + if not hasattr(cdp, 'spectrum_ids') or len(cdp.spectrum_ids) < 3: + missing.append("Spectral data") + # Return the container and list of missing data. return data, missing Modified: branches/gui_testing/gui/analyses/auto_rx_base.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/auto_rx_base.py?rev=14052&r1=14051&r2=14052&view=diff ============================================================================== --- branches/gui_testing/gui/analyses/auto_rx_base.py (original) +++ branches/gui_testing/gui/analyses/auto_rx_base.py Tue Aug 2 10:22:42 2011 @@ -33,7 +33,7 @@ # relax module imports. from auto_analyses.relax_fit import Relax_fit from data import Relax_data_store; ds = Relax_data_store() -from generic_fns.mol_res_spin import are_spins_named +from generic_fns.mol_res_spin import are_spins_named, exists_mol_res_spin_data from generic_fns.pipes import has_pipe from status import Status; status = Status() @@ -147,6 +147,14 @@ # File root. data.file_root = '%s.%s' % (self.analysis_type, frq) + # Check if sequence data is loaded + if not exists_mol_res_spin_data(): + missing.append("Sequence data") + + # Spectral data. + if not hasattr(cdp, 'spectrum_ids') or len(cdp.spectrum_ids) < 3: + missing.append("Spectral data") + # Increment size. data.inc = gui_to_int(self.grid_inc.GetValue())