mailr20504 - /trunk/pipe_control/spectrum.py


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

Header


Content

Posted by edward on August 02, 2013 - 13:52:
Author: bugman
Date: Fri Aug  2 13:52:16 2013
New Revision: 20504

URL: http://svn.gna.org/viewcvs/relax?rev=20504&view=rev
Log:
Fixed the extraction of NMRPipe seriestab data in 
pipe_control.spectrum.read().

Progress sr #3043: (https://gna.org/support/index.php?3043) - support for 
NMRPipe seriesTab format *.ser.

Troels E. Linnet provided this patch. Commit by: tlinset _aaattt_ 
gmail_dot_com

Signed-off-by: Edward d'Auvergne <edward _att_ nmr-relax _dott_ com>

Modified:
    trunk/pipe_control/spectrum.py

Modified: trunk/pipe_control/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/spectrum.py?rev=20504&r1=20503&r2=20504&view=diff
==============================================================================
--- trunk/pipe_control/spectrum.py (original)
+++ trunk/pipe_control/spectrum.py Fri Aug  2 13:52:16 2013
@@ -663,36 +663,13 @@
         # Extract the data.
         intensity_data = 
nmrpipe.read_list_intensity_seriestab(file_data=file_data, int_col=int_col)
 
-        # Loop over each spectrum
+        # Convert the residue number to a spin ID.
         for i in range(len(intensity_data)):
-            spectrum = intensity_data[i][0]
-
-            # Get the spectrum name
-            spectrum_name = intensity_data[i][1]
-
-            #Loop over each spin in the spectrum information
-            for j in range(len(spectrum)):
-                # Extract spin information
-                spin =  spectrum[j]
-
-                # Extract proton info
-                h_name = spin[0]
-
-                # Extract heteronucleus info
-                x_name = spin[1]
-
-                # Extract the residue number
-                res_num = spin[2]
-
-                # Extract the Intensity
-                intensity = spin[3]
-
-                # Generate the spin_id.
-                spin_id = generate_spin_id_unique(res_num=res_num, 
spin_name=x_name)
-
-                # Replace residue number with the spin_id.
-                intensity_data[i][0][j][2] = spin_id
-
+            # Generate the spin_id.
+            spin_id = generate_spin_id_unique(res_num=intensity_data[i][2], 
spin_name=intensity_data[i][1])
+
+            # Replace the data.
+            intensity_data[i][2] = spin_id
 
     # Sparky.
     elif format == 'sparky':
@@ -743,6 +720,7 @@
     # Loop over the peak intensity data.
     data = []
     data_flag = False
+
     for i in range(len(intensity_data)):
         # Extract the data.
         H_name, X_name, spin_id, intensity, line = intensity_data[i]




Related Messages


Powered by MHonArc, Updated Fri Aug 02 14:00:02 2013