Author: bugman Date: Mon Jul 22 08:34:04 2013 New Revision: 20440 URL: http://svn.gna.org/viewcvs/relax?rev=20440&view=rev Log: Progress sr #3043: (https://gna.org/support/index.php?3043) - support for NMRPipe seriesTab format *.ser. The Extraction of NMRPipe SeriesTab data is changed in pipe_control/spectrum.py in the read() function. 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=20440&r1=20439&r2=20440&view=diff ============================================================================== --- trunk/pipe_control/spectrum.py (original) +++ trunk/pipe_control/spectrum.py Mon Jul 22 08:34:04 2013 @@ -663,13 +663,35 @@ # Extract the data. intensity_data = nmrpipe.read_list_intensity_seriestab(file_data=file_data, int_col=int_col) - # Convert the residue number to a spin ID. + # Loop over each spectrum for i in range(len(intensity_data)): - # 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 + 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 # Sparky. elif format == 'sparky':