Author: bugman Date: Tue Aug 20 16:47:21 2013 New Revision: 20635 URL: http://svn.gna.org/viewcvs/relax?rev=20635&view=rev Log: Fixes for all of the peak intensity reading functions - the w1 and w2 dimensions were swapped. Modified: trunk/lib/software/nmrpipe.py trunk/lib/software/nmrview.py trunk/lib/software/sparky.py trunk/lib/software/xeasy.py Modified: trunk/lib/software/nmrpipe.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/software/nmrpipe.py?rev=20635&r1=20634&r2=20635&view=diff ============================================================================== --- trunk/lib/software/nmrpipe.py (original) +++ trunk/lib/software/nmrpipe.py Tue Aug 20 16:47:21 2013 @@ -97,7 +97,7 @@ continue # First split by the 2D separator. - assign2, assign1 = re.split('-', line[ass_i]) + assign1, assign2 = re.split('-', line[ass_i]) # The assignment of the first dimension. row1 = re.split('([A-Z]+)', assign1) @@ -109,7 +109,7 @@ # Get the residue number. try: - res_num = int(row2[-3]) + res_num = int(row1[-3]) except: raise RelaxError("Improperly formatted NMRPipe SeriesTab file., cannot process the assignment '%s'." % line[0]) Modified: trunk/lib/software/nmrview.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/software/nmrview.py?rev=20635&r1=20634&r2=20635&view=diff ============================================================================== --- trunk/lib/software/nmrview.py (original) +++ trunk/lib/software/nmrview.py Tue Aug 20 16:47:21 2013 @@ -81,18 +81,18 @@ raise RelaxError("The peak list is invalid.") # Nuclei names. + name2 = '' + if line[1]!='{}': + name2 = line[1].strip('{') + name2 = name2.strip('}') + name2 = name2.split('.') + name2 = name2[1] name1 = '' - if line[1]!='{}': - name1 = line[1].strip('{') + if line[8]!='{}': + name1 = line[8].strip('{') name1 = name1.strip('}') name1 = name1.split('.') name1 = name1[1] - name2 = '' - if line[8]!='{}': - name2 = line[8].strip('{') - name2 = name2.strip('}') - name2 = name2.split('.') - name2 = name2[1] # Intensity. try: Modified: trunk/lib/software/sparky.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/software/sparky.py?rev=20635&r1=20634&r2=20635&view=diff ============================================================================== --- trunk/lib/software/sparky.py (original) +++ trunk/lib/software/sparky.py Tue Aug 20 16:47:21 2013 @@ -69,7 +69,7 @@ continue # First split by the 2D separator. - assign2, assign1 = split('-', line[0]) + assign1, assign2 = split('-', line[0]) # The assignment of the first dimension. row1 = split('([A-Z]+)', assign1) @@ -81,7 +81,7 @@ # The residue number. try: - res_num = int(row2[-3]) + res_num = int(row1[-3]) except: raise RelaxError("Improperly formatted Sparky file, cannot process the assignment '%s'." % line[0]) Modified: trunk/lib/software/xeasy.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/software/xeasy.py?rev=20635&r1=20634&r2=20635&view=diff ============================================================================== --- trunk/lib/software/xeasy.py (original) +++ trunk/lib/software/xeasy.py Tue Aug 20 16:47:21 2013 @@ -41,9 +41,9 @@ @raises RelaxError: When the expected peak intensity is not a float. """ - # The hardcoded column positions. - w1_col = 4 - w2_col = 7 + # The hardcoded column positions (note that w1 and w2 are swapped!). + w1_col = 7 + w2_col = 4 if int_col == None: int_col = 10 @@ -70,7 +70,7 @@ # Loop over the file data. for line in file_data: # Test for invalid assignment lines which have the column numbers changed and return empty data. - if line[w1_col] == 'inv.': + if line[w1_col] == 'inv.' or line[w2_col] == 'inv.': continue # The residue number.