mailr8775 - in /1.3/generic_fns: pcs.py rdc.py


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

Header


Content

Posted by edward on February 11, 2009 - 15:26:
Author: bugman
Date: Wed Feb 11 15:26:25 2009
New Revision: 8775

URL: http://svn.gna.org/viewcvs/relax?rev=8775&view=rev
Log:
The file data is now always checked.


Modified:
    1.3/generic_fns/pcs.py
    1.3/generic_fns/rdc.py

Modified: 1.3/generic_fns/pcs.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/pcs.py?rev=8775&r1=8774&r2=8775&view=diff
==============================================================================
--- 1.3/generic_fns/pcs.py (original)
+++ 1.3/generic_fns/pcs.py Wed Feb 11 15:26:25 2009
@@ -482,28 +482,28 @@
         # Strip the data of all comments and empty lines.
         file_data = strip(file_data)
 
-        # Test the validity of the PCS data.
-        for i in xrange(len(file_data)):
-            # Skip missing data.
-            if len(file_data[i]) <= min_col_num:
-                continue
-            elif data_col != None and file_data[i][data_col] == 'None':
-                continue
-            elif error_col != None and file_data[i][error_col] == 'None':
-                continue
-
-            # Test that the data are numbers.
-            try:
-                if res_num_col != None:
-                    int(file_data[i][res_num_col])
-                if spin_num_col != None:
-                    int(file_data[i][spin_num_col])
-                if data_col != None:
-                    float(file_data[i][data_col])
-                if error_col != None:
-                    float(file_data[i][error_col])
-            except ValueError:
-                raise RelaxError, "The PCS data in the line " + 
`file_data[i]` + " is invalid."
+    # Test the validity of the PCS data.
+    for i in xrange(len(file_data)):
+        # Skip missing data.
+        if len(file_data[i]) <= min_col_num:
+            continue
+        elif data_col != None and file_data[i][data_col] == 'None':
+            continue
+        elif error_col != None and file_data[i][error_col] == 'None':
+            continue
+
+        # Test that the data are numbers.
+        try:
+            if res_num_col != None:
+                int(file_data[i][res_num_col])
+            if spin_num_col != None:
+                int(file_data[i][spin_num_col])
+            if data_col != None:
+                float(file_data[i][data_col])
+            if error_col != None:
+                float(file_data[i][error_col])
+        except ValueError:
+            raise RelaxError, "The PCS data in the line " + `file_data[i]` + 
" is invalid."
 
 
     # Global (non-spin specific) data.

Modified: 1.3/generic_fns/rdc.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/rdc.py?rev=8775&r1=8774&r2=8775&view=diff
==============================================================================
--- 1.3/generic_fns/rdc.py (original)
+++ 1.3/generic_fns/rdc.py Wed Feb 11 15:26:25 2009
@@ -438,28 +438,28 @@
         # Strip the data of all comments and empty lines.
         file_data = strip(file_data)
 
-        # Test the validity of the RDC data.
-        for i in xrange(len(file_data)):
-            # Skip missing data.
-            if len(file_data[i]) <= min_col_num:
-                continue
-            elif data_col != None and file_data[i][data_col] == 'None':
-                continue
-            elif error_col != None and file_data[i][error_col] == 'None':
-                continue
-
-            # Test that the data are numbers.
-            try:
-                if res_num_col != None:
-                    int(file_data[i][res_num_col])
-                if spin_num_col != None:
-                    int(file_data[i][spin_num_col])
-                if data_col != None:
-                    float(file_data[i][data_col])
-                if error_col != None:
-                    float(file_data[i][error_col])
-            except ValueError:
-                raise RelaxError, "The RDC data in the line " + 
`file_data[i]` + " is invalid."
+    # Test the validity of the RDC data.
+    for i in xrange(len(file_data)):
+        # Skip missing data.
+        if len(file_data[i]) <= min_col_num:
+            continue
+        elif data_col != None and file_data[i][data_col] == 'None':
+            continue
+        elif error_col != None and file_data[i][error_col] == 'None':
+            continue
+
+        # Test that the data are numbers.
+        try:
+            if res_num_col != None:
+                int(file_data[i][res_num_col])
+            if spin_num_col != None:
+                int(file_data[i][spin_num_col])
+            if data_col != None:
+                float(file_data[i][data_col])
+            if error_col != None:
+                float(file_data[i][error_col])
+        except ValueError:
+            raise RelaxError, "The RDC data in the line " + `file_data[i]` + 
" is invalid."
 
 
     # Global (non-spin specific) data.




Related Messages


Powered by MHonArc, Updated Wed Feb 11 15:40:03 2009