mailr7689 - /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 sebastien . morin . 1 on October 13, 2008 - 19:44:
Author: semor
Date: Mon Oct 13 19:44:02 2008
New Revision: 7689

URL: http://svn.gna.org/viewcvs/relax?rev=7689&view=rev
Log:
Fixed the extraction of the residue number, nucleus name and heteronucleus 
name.


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=7689&r1=7688&r2=7689&view=diff
==============================================================================
--- 1.3/generic_fns/intensity.py (original)
+++ 1.3/generic_fns/intensity.py Mon Oct 13 19:44:02 2008
@@ -27,6 +27,7 @@
 # Python module imports.
 from re import split
 from warnings import warn
+import string
 import sys
 
 # relax module imports.
@@ -175,13 +176,22 @@
 
     # The residue number
     try:
-        res_num = int(line[2])
+        res_num = string.strip(line[1],'{')
+        res_num = string.strip(res_num,'}')
+        res_num = string.split(res_num,'.')
+        res_num = res_num[0]
     except ValueError:
         raise RelaxError, "The peak list is invalid."
 
     # Nuclei names.
-    x_name = line[9]
-    h_name = line[2]
+    x_name = string.strip(line[8],'{')
+    x_name = string.strip(x_name,'}')
+    x_name = string.split(x_name,'.')
+    x_name = x_name[1]
+    h_name = string.strip(line[1],'{')
+    h_name = string.strip(h_name,'}')
+    h_name = string.split(h_name,'.')
+    h_name = h_name[1]
 
     # The peak intensity column.
     if int_col == None:




Related Messages


Powered by MHonArc, Updated Mon Oct 13 20:00:03 2008