Author: semor Date: Fri Oct 17 19:53:53 2008 New Revision: 7797 URL: http://svn.gna.org/viewcvs/relax?rev=7797&view=rev Log: Started the implementation of a generic peak intensities file. This follows a thread at: https://mail.gna.org/public/relax-devel/2008-10/msg00026.html (Message ID: 48EE7028.6060409@xxxxxxxxx) 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=7797&r1=7796&r2=7797&view=diff ============================================================================== --- 1.3/generic_fns/intensity.py (original) +++ 1.3/generic_fns/intensity.py Fri Oct 17 19:53:53 2008 @@ -71,6 +71,24 @@ # Don't continue (waste of time). break + + +def intensity_generic(line, int_col): + """Function for returning relevant data from the generic peak intensity line. + + The residue number, heteronucleus and proton names, and peak intensity will be returned. + + + @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. + """ + + + # Not implemented yet... def intensity_sparky(line, int_col): @@ -311,6 +329,14 @@ if format not in format_list: raise RelaxArgNotInListError, ('format', format, format_list) + # Generic. + if format == 'generic': + # Print out. + print "Generic formatted data file.\n" + + # Set the intensity reading function. + intensity_fn = intensity_generic + # Sparky. if format == 'sparky': # Print out.