mailr9834 - /1.3/sample_scripts/full_analysis.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on October 28, 2009 - 13:49:
Author: bugman
Date: Wed Oct 28 13:48:59 2009
New Revision: 9834

URL: http://svn.gna.org/viewcvs/relax?rev=9834&view=rev
Log:
Added checks for insufficient or single field strength relaxation data.


Modified:
    1.3/sample_scripts/full_analysis.py

Modified: 1.3/sample_scripts/full_analysis.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/sample_scripts/full_analysis.py?rev=9834&r1=9833&r2=9834&view=diff
==============================================================================
--- 1.3/sample_scripts/full_analysis.py (original)
+++ 1.3/sample_scripts/full_analysis.py Wed Oct 28 13:48:59 2009
@@ -434,7 +434,10 @@
         # Relaxation data.
         if not isinstance(RELAX_DATA, list):
             raise RelaxError("The RELAX_DATA user variable '%s' must be a 
list." % RELAX_DATA)
+        labels = []
         for i in range(len(RELAX_DATA)):
+            if RELAX_DATA[i][1] not in labels:
+                labels.append(RELAX_DATA[i][1])
             if len(RELAX_DATA[i]) != 13:
                 raise RelaxError("The RELAX_DATA user variable component 
'%s' must be a list of 13 elements." % RELAX_DATA[i])
             if not isinstance(RELAX_DATA[i][0], str):
@@ -449,6 +452,12 @@
                 if RELAX_DATA[i][j] != None and not 
isinstance(RELAX_DATA[i][j], int):
                     raise RelaxError("The column components of the 
RELAX_DATA user variable '%s' must be either None or integers." % 
RELAX_DATA[i])
 
+        # Insufficient data.
+        if len(RELAX_DATA) <= 3:
+            raise RelaxError("Insufficient relaxation data, 4 or more data 
sets are essential for the execution of this script.")
+        if len(labels) == 1:
+            raise RelaxError("Relaxation data at multiple magnetic field 
strengths is essential for this analysis.")
+
         # Unresolved and exclude files.
         if UNRES and not isinstance(UNRES, str):
             raise RelaxError("The UNRES user variable '%s' is incorrectly 
set.  It should either be a string or None." % UNRES)




Related Messages


Powered by MHonArc, Updated Wed Oct 28 18:20:03 2009