Author: bugman Date: Thu Apr 24 18:22:03 2008 New Revision: 5995 URL: http://svn.gna.org/viewcvs/relax?rev=5995&view=rev Log: int_col is now passed into intensity_xeasy(), just in case. 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=5995&r1=5994&r2=5995&view=diff ============================================================================== --- 1.3/generic_fns/intensity.py (original) +++ 1.3/generic_fns/intensity.py Thu Apr 24 18:22:03 2008 @@ -112,7 +112,7 @@ return res_num, h_name, x_name, intensity -def intensity_xeasy(line): +def intensity_xeasy(line, int_col=None): """Function for returning relevant data from the XEasy peak intensity line. The residue number, heteronucleus and proton names, and peak intensity will be returned. @@ -120,6 +120,9 @@ @param line: The single line of information from the intensity file. @type line: list of str + @keyword int_col: The column containing the peak intensity data (for a non-standard formatted + file). + @type int_col: int @raises RelaxError: When the expected peak intensity is not a float. """ @@ -141,9 +144,13 @@ x_name = line[4] h_name = line[7] - # Intensity (located in column 10). + # The peak intensity column. + if int_col == None: + int_col = 10 + + # Intensity. try: - intensity = float(line[10]) + intensity = float(line[int_col]) except ValueError: raise RelaxError, "The peak intensity value " + `intensity` + " from the line " + `line` + " is invalid."