Author: bugman
Date: Thu Dec  7 07:33:51 2006
New Revision: 2926
URL: http://svn.gna.org/viewcvs/relax?rev=2926&view=rev
Log:
The selection user functions which read data from a file now take header 
lines into account.
Modified:
    1.3/generic_fns/selection.py
Modified: 1.3/generic_fns/selection.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/selection.py?rev=2926&r1=2925&r2=2926&view=diff
==============================================================================
--- 1.3/generic_fns/selection.py (original)
+++ 1.3/generic_fns/selection.py Thu Dec  7 07:33:51 2006
@@ -86,6 +86,19 @@
         # Extract the data from the file.
         file_data = self.relax.IO.extract_data(file, dir)
 
+        # Count the number of header lines.
+        header_lines = 0
+        for i in xrange(len(file_data)):
+            try:
+                int(file_data[i][column])
+            except:
+                header_lines = header_lines + 1
+            else:
+                break
+
+        # Remove the header.
+        file_data = file_data[header_lines:]
+
         # Strip the data.
         file_data = self.relax.IO.strip(file_data)
 
@@ -223,6 +236,19 @@
         # Extract the data from the file.
         file_data = self.relax.IO.extract_data(file, dir)
 
+        # Count the number of header lines.
+        header_lines = 0
+        for i in xrange(len(file_data)):
+            try:
+                int(file_data[i][column])
+            except:
+                header_lines = header_lines + 1
+            else:
+                break
+
+        # Remove the header.
+        file_data = file_data[header_lines:]
+
         # Strip the data.
         file_data = self.relax.IO.strip(file_data)