Author: bugman Date: Fri Sep 19 12:04:28 2014 New Revision: 25919 URL: http://svn.gna.org/viewcvs/relax?rev=25919&view=rev Log: Improvements for the frame order overfit_deselect() API method. Three changes have been made: The print statements have been converted to RelaxWarnings; the spin IDs or spin ID pairs are now stored in a list and one RelaxWarning for the missing PCS data and one for the missing RDC data is now given; and the verbose flag is now used to determine if a RelaxWarning will be given. Modified: branches/frame_order_cleanup/specific_analyses/frame_order/api.py Modified: branches/frame_order_cleanup/specific_analyses/frame_order/api.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/specific_analyses/frame_order/api.py?rev=25919&r1=25918&r2=25919&view=diff ============================================================================== --- branches/frame_order_cleanup/specific_analyses/frame_order/api.py (original) +++ branches/frame_order_cleanup/specific_analyses/frame_order/api.py Fri Sep 19 12:04:28 2014 @@ -656,16 +656,22 @@ return # Loop over spin data, checking for PCS data. + ids = [] for spin, spin_id in spin_loop(return_id=True, skip_desel=True): if not hasattr(spin, 'pcs'): - print("No PCS data is present, deselecting the spin '%s'." % spin_id) spin.select = False + ids.append(spin_id) + if verbose and len(ids): + warn(RelaxWarning("No PCS data is present, deselecting the spins %s." % ids)) # Loop over the interatomic data containers, checking for RDC data. + ids = [] for interatom in interatomic_loop(selection1=domain_moving()): if not hasattr(interatom, 'rdc'): - print("No RDC data is present, deselecting the interatomic data container between spins '%s' and '%s'." % (interatom.spin_id1, interatom.spin_id2)) interatom.select = False + ids.append("%s - %s" % (interatom.spin_id1, interatom.spin_id2)) + if verbose and len(ids): + warn(RelaxWarning("No RDC data is present, deselecting the interatomic data containers between spin pairs %s." % ids) def return_error(self, data_id):