Author: semor Date: Thu Apr 3 19:27:23 2008 New Revision: 5271 URL: http://svn.gna.org/viewcvs/relax?rev=5271&view=rev Log: More removal of the run argument as part of the moving to the new design. Modified: 1.3/prompt/noe.py Modified: 1.3/prompt/noe.py URL: http://svn.gna.org/viewcvs/relax/1.3/prompt/noe.py?rev=5271&r1=5270&r2=5271&view=diff ============================================================================== --- 1.3/prompt/noe.py (original) +++ 1.3/prompt/noe.py Thu Apr 3 19:27:23 2008 @@ -41,13 +41,11 @@ self.__relax__ = relax - def error(self, run=None, error=0.0, spectrum_type=None, res_num=None, res_name=None): + def error(self, error=0.0, spectrum_type=None, res_num=None, res_name=None): """Function for setting the errors in the reference or saturated NOE spectra. Keyword Arguments ~~~~~~~~~~~~~~~~~ - - run: The name of the run. error: The error. @@ -75,17 +73,12 @@ # Function intro text. if self.__relax__.interpreter.intro: text = sys.ps3 + "noe.error(" - text = text + "run=" + `run` - text = text + ", error=" + `error` + text = text + "error=" + `error` text = text + ", spectrum_type=" + `spectrum_type` text = text + ", res_num=" + `res_num` text = text + ", res_name=" + `res_name` + ")" print text - # The run argument. - if type(run) != str: - raise RelaxStrError, ('run', run) - # The error. if type(error) != float and type(error) != int: raise RelaxNumError, ('error', error) @@ -103,16 +96,14 @@ raise RelaxNoneStrError, ('residue name', res_name) # Execute the functional code. - self.__relax__.specific.noe.set_error(run=run, error=error, spectrum_type=spectrum_type, res_num=res_num, res_name=res_name) - - - def read(self, run=None, file=None, dir=None, spectrum_type=None, format='sparky', heteronuc='N', proton='HN', int_col=None): + noe_obj.set_error(error=error, spectrum_type=spectrum_type, res_num=res_num, res_name=res_name) + + + def read(self, file=None, dir=None, spectrum_type=None, format='sparky', heteronuc='N', proton='HN', int_col=None): """Function for reading peak intensities from a file for NOE calculations. Keyword Arguments ~~~~~~~~~~~~~~~~~ - - run: The name of the run. file: The name of the file containing the sequence data. @@ -168,23 +159,22 @@ ~~~~~~~~ To read the reference and saturated spectra peak heights from the Sparky formatted files - 'ref.list' and 'sat.list' to the run 'noe', type: - - relax> noe.read('noe', file='ref.list', spectrum_type='ref') - relax> noe.read('noe', file='sat.list', spectrum_type='sat') + 'ref.list' and 'sat.list', type: + + relax> noe.read(file='ref.list', spectrum_type='ref') + relax> noe.read(file='sat.list', spectrum_type='sat') To read the reference and saturated spectra peak heights from the XEasy formatted files - 'ref.text' and 'sat.text' to the run 'noe', type: - - relax> noe.read('noe', file='ref.text', spectrum_type='ref', format='xeasy') - relax> noe.read('noe', file='sat.text', spectrum_type='sat', format='xeasy') + 'ref.text' and 'sat.text', type: + + relax> noe.read(file='ref.text', spectrum_type='ref', format='xeasy') + relax> noe.read(file='sat.text', spectrum_type='sat', format='xeasy') """ # Function intro text. if self.__relax__.interpreter.intro: text = sys.ps3 + "noe.read(" - text = text + "run=" + `run` - text = text + ", file=" + `file` + text = text + "file=" + `file` text = text + ", dir=" + `dir` text = text + ", spectrum_type=" + `spectrum_type` text = text + ", format=" + `format` @@ -193,10 +183,6 @@ text = text + ", int_col=" + `int_col` + ")" print text - # The run argument. - if type(run) != str: - raise RelaxStrError, ('run', run) - # The file name. if type(file) != str: raise RelaxStrError, ('file name', file) @@ -226,4 +212,4 @@ raise RelaxNoneIntError, ('intensity column', int_col) # Execute the functional code. - self.__relax__.specific.noe.read(run=run, file=file, dir=dir, spectrum_type=spectrum_type, format=format, heteronuc=heteronuc, proton=proton, int_col=int_col) + noe_obj.read(file=file, dir=dir, spectrum_type=spectrum_type, format=format, heteronuc=heteronuc, proton=proton, int_col=int_col)