Author: bugman Date: Tue Apr 2 12:38:54 2013 New Revision: 19304 URL: http://svn.gna.org/viewcvs/relax?rev=19304&view=rev Log: Ported the changes of r19302 to the consistency testing and J(w) mapping analyses. This is the code for checking for infinite relaxation rates imported from Bruker Dynamics Centre files. Modified: trunk/specific_analyses/consistency_tests.py trunk/specific_analyses/jw_mapping.py Modified: trunk/specific_analyses/consistency_tests.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/consistency_tests.py?rev=19304&r1=19303&r2=19304&view=diff ============================================================================== --- trunk/specific_analyses/consistency_tests.py (original) +++ trunk/specific_analyses/consistency_tests.py Tue Apr 2 12:38:54 2013 @@ -343,12 +343,24 @@ # Data checks. if data_check: - # The number of relaxation data points. + # The number of relaxation data points (and for infinite data). data_points = 0 + inf_data = False if hasattr(cdp, 'ri_ids') and hasattr(spin, 'ri_data'): for id in cdp.ri_ids: if id in spin.ri_data and spin.ri_data[id] != None: data_points += 1 + + # Infinite data! + if isInf(spin.ri_data[id]): + inf_data = True + + # Infinite data. + if inf_data: + warn(RelaxDeselectWarning(spin_id, 'infinite relaxation data')) + spin.select = False + deselect_flag = True + continue # Relaxation data must exist! if not hasattr(spin, 'ri_data'): @@ -357,7 +369,7 @@ deselect_flag = True continue - # Require 3 or more data points. + # Require 3 or more relaxation data points. if data_points < 3: warn(RelaxDeselectWarning(spin_id, 'insufficient relaxation data, 3 or more data points are required')) spin.select = False Modified: trunk/specific_analyses/jw_mapping.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/jw_mapping.py?rev=19304&r1=19303&r2=19304&view=diff ============================================================================== --- trunk/specific_analyses/jw_mapping.py (original) +++ trunk/specific_analyses/jw_mapping.py Tue Apr 2 12:38:54 2013 @@ -286,7 +286,7 @@ if verbose: print("\nOver-fit spin deselection:") - # Test the sequence data exists. + # Test if sequence data exists. if not exists_mol_res_spin_data(): raise RelaxNoSequenceError @@ -327,12 +327,24 @@ # Data checks. if data_check: - # The number of relaxation data points. + # The number of relaxation data points (and for infinite data). data_points = 0 + inf_data = False if hasattr(cdp, 'ri_ids') and hasattr(spin, 'ri_data'): for id in cdp.ri_ids: if id in spin.ri_data and spin.ri_data[id] != None: data_points += 1 + + # Infinite data! + if isInf(spin.ri_data[id]): + inf_data = True + + # Infinite data. + if inf_data: + warn(RelaxDeselectWarning(spin_id, 'infinite relaxation data')) + spin.select = False + deselect_flag = True + continue # Relaxation data must exist! if not hasattr(spin, 'ri_data'): @@ -341,7 +353,7 @@ deselect_flag = True continue - # Require 3 or more data points. + # Require 3 or more relaxation data points. if data_points < 3: warn(RelaxDeselectWarning(spin_id, 'insufficient relaxation data, 3 or more data points are required')) spin.select = False