mailRe: r7688 - /1.3/generic_fns/intensity.py


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

Header


Content

Posted by Edward d'Auvergne on October 14, 2008 - 21:16:
Please see below.

On Mon, Oct 13, 2008 at 6:03 PM,  <sebastien.morin.1@xxxxxxxxx> wrote:
Author: semor
Date: Mon Oct 13 18:03:23 2008
New Revision: 7688

URL: http://svn.gna.org/viewcvs/relax?rev=7688&view=rev
Log:
Added the function for the NMRView peak list header handling.


Modified:
   1.3/generic_fns/intensity.py

Modified: 1.3/generic_fns/intensity.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/intensity.py?rev=7688&r1=7687&r2=7688&view=diff
==============================================================================
--- 1.3/generic_fns/intensity.py (original)
+++ 1.3/generic_fns/intensity.py Mon Oct 13 18:03:23 2008
@@ -226,23 +226,32 @@
    ########

    # Loop over the lines of the file until a peak intensity value is 
reached.
-    header_lines = 0
-    for i in xrange(len(file_data)):
-        # Try to see if the intensity can be extracted.
-        try:
-            if int_col:
-                intensity(file_data[i], int_col)
+    if format == 'easy':

Shouldn't this be 'xeasy'?


+        header_lines = 0
+        for i in xrange(len(file_data)):
+            # Try to see if the intensity can be extracted.
+            try:
+                if int_col:
+                    intensity(file_data[i], int_col)
+                else:
+                    intensity(file_data[i])
+            except RelaxError:
+                header_lines = header_lines + 1
+            except IndexError:
+                header_lines = header_lines + 1
            else:
-                intensity(file_data[i])
-        except RelaxError:
-            header_lines = header_lines + 1
-        except IndexError:
-            header_lines = header_lines + 1
-        else:
-            break
-
-    # Return the number of lines.
-    return header_lines
+                break
+
+        # Return the number of lines.
+        return header_lines
+
+
+    # NMRView.
+    ##########
+
+    # Assume the Sparky file has six header lines!

Is this comment correct?


+    elif format == 'nmrview':
+        return 6

Regards,

Edward



Related Messages


Powered by MHonArc, Updated Wed Oct 15 00:00:39 2008