Author: bugman Date: Tue Jul 8 21:25:41 2008 New Revision: 6846 URL: http://svn.gna.org/viewcvs/relax?rev=6846&view=rev Log: Converted all instances of 'ri_label' to 'id'. Modified: branches/rdc_analysis/prompt/rdc.py Modified: branches/rdc_analysis/prompt/rdc.py URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/prompt/rdc.py?rev=6846&r1=6845&r2=6846&view=diff ============================================================================== --- branches/rdc_analysis/prompt/rdc.py (original) +++ branches/rdc_analysis/prompt/rdc.py Tue Jul 8 21:25:41 2008 @@ -42,13 +42,13 @@ self.__relax__ = relax - def back_calc(self, ri_label=None, frq_label=None, frq=None): + def back_calc(self, id=None, frq_label=None, frq=None): """Function for back calculating relaxation data. Keyword Arguments ~~~~~~~~~~~~~~~~~ - ri_label: The relaxation data type, ie 'R1', 'R2', or 'NOE'. + id: The relaxation data type, ie 'R1', 'R2', or 'NOE'. frq_label: The field strength label. @@ -59,14 +59,14 @@ # Function intro text. if self.__relax__.interpreter.intro: text = sys.ps3 + "relax_data.back_calc(" - text = text + "ri_label=" + `ri_label` + text = text + "id=" + `id` text = text + ", frq_label=" + `frq_label` text = text + ", frq=" + `frq` + ")" print text # Relaxation data type. - if type(ri_label) != str: - raise RelaxStrError, ('relaxation label', ri_label) + if type(id) != str: + raise RelaxStrError, ('relaxation label', id) # Frequency label. if type(frq_label) != str: @@ -77,10 +77,10 @@ raise RelaxFloatError, ('frequency', frq) # Execute the functional code. - relax_data.back_calc(ri_label=ri_label, frq_label=frq_label, frq=frq) - - - def copy(self, pipe_from=None, pipe_to=None, ri_label=None, frq_label=None): + relax_data.back_calc(id=id, frq_label=frq_label, frq=frq) + + + def copy(self, pipe_from=None, pipe_to=None, id=None, frq_label=None): """Function for copying relaxation data from pipe_from to pipe_to. Keyword Arguments @@ -90,7 +90,7 @@ pipe_to: The name of the pipe to copy the relaxation data to. - ri_label: The relaxation data type, ie 'R1', 'R2', or 'NOE'. + id: The relaxation data type, ie 'R1', 'R2', or 'NOE'. frq_label: The field strength label. @@ -98,7 +98,7 @@ Description ~~~~~~~~~~~ - This function will copy relaxation data from 'pipe_from' to 'pipe_to'. If ri_label and frq_label + This function will copy relaxation data from 'pipe_from' to 'pipe_to'. If id and frq_label are not given then all relaxation data will be copied, otherwise only a specific data set will be copied. @@ -111,13 +111,13 @@ relax> relax_data.copy('m1', 'm9') relax> relax_data.copy(pipe_from='m1', pipe_to='m9') relax> relax_data.copy('m1', 'm9', None, None) - relax> relax_data.copy(pipe_from='m1', pipe_to='m9', ri_label=None, frq_label=None) + relax> relax_data.copy(pipe_from='m1', pipe_to='m9', id=None, frq_label=None) To copy only the NOE relaxation data with the frq_label of '800' from 'm3' to 'm6', type one of: relax> relax_data.copy('m3', 'm6', 'NOE', '800') - relax> relax_data.copy(pipe_from='m3', pipe_to='m6', ri_label='NOE', frq_label='800') + relax> relax_data.copy(pipe_from='m3', pipe_to='m6', id='NOE', frq_label='800') """ # Function intro text. @@ -125,7 +125,7 @@ text = sys.ps3 + "relax_data.copy(" text = text + "pipe_from=" + `pipe_from` text = text + ", pipe_to=" + `pipe_to` - text = text + ", ri_label=" + `ri_label` + text = text + ", id=" + `id` text = text + ", frq_label=" + `frq_label` + ")" print text @@ -142,24 +142,24 @@ raise RelaxError, "The pipe_from and pipe_to arguments cannot both be set to None." # Relaxation data type. - if ri_label != None and type(ri_label) != str: - raise RelaxNoneStrError, ('relaxation label', ri_label) + if id != None and type(id) != str: + raise RelaxNoneStrError, ('relaxation label', id) # Frequency label. if frq_label != None and type(frq_label) != str: raise RelaxNoneStrError, ('frequency label', frq_label) # Execute the functional code. - relax_data.copy(pipe_from=pipe_from, pipe_to=pipe_to, ri_label=ri_label, frq_label=frq_label) - - - def delete(self, ri_label=None, frq_label=None): - """Function for deleting the relaxation data corresponding to ri_label and frq_label. - - Keyword Arguments - ~~~~~~~~~~~~~~~~~ - - ri_label: The relaxation data type, ie 'R1', 'R2', or 'NOE'. + relax_data.copy(pipe_from=pipe_from, pipe_to=pipe_to, id=id, frq_label=frq_label) + + + def delete(self, id=None, frq_label=None): + """Function for deleting the relaxation data corresponding to id and frq_label. + + Keyword Arguments + ~~~~~~~~~~~~~~~~~ + + id: The relaxation data type, ie 'R1', 'R2', or 'NOE'. frq_label: The field strength label. @@ -167,7 +167,7 @@ Examples ~~~~~~~~ - To delete the relaxation data corresponding to ri_label='NOE', frq_label='600', type: + To delete the relaxation data corresponding to id='NOE', frq_label='600', type: relax> relax_data.delete('NOE', '600') """ @@ -175,29 +175,29 @@ # Function intro text. if self.__relax__.interpreter.intro: text = sys.ps3 + "relax_data.delete(" - text = text + "ri_label=" + `ri_label` + text = text + "id=" + `id` text = text + ", frq_label=" + `frq_label` + ")" print text # Relaxation data type. - if type(ri_label) != str: - raise RelaxStrError, ('relaxation label', ri_label) + if type(id) != str: + raise RelaxStrError, ('relaxation label', id) # Frequency label. if type(frq_label) != str: raise RelaxStrError, ('frequency label', frq_label) # Execute the functional code. - relax_data.delete(ri_label=ri_label, frq_label=frq_label) - - - def display(self, ri_label=None, frq_label=None): - """Function for displaying the relaxation data corresponding to ri_label and frq_label. - - Keyword Arguments - ~~~~~~~~~~~~~~~~~ - - ri_label: The relaxation data type, ie 'R1', 'R2', or 'NOE'. + relax_data.delete(id=id, frq_label=frq_label) + + + def display(self, id=None, frq_label=None): + """Function for displaying the relaxation data corresponding to id and frq_label. + + Keyword Arguments + ~~~~~~~~~~~~~~~~~ + + id: The relaxation data type, ie 'R1', 'R2', or 'NOE'. frq_label: The field strength label. @@ -213,20 +213,20 @@ # Function intro text. if self.__relax__.interpreter.intro: text = sys.ps3 + "relax_data.display(" - text = text + "ri_label=" + `ri_label` + text = text + "id=" + `id` text = text + ", frq_label=" + `frq_label` + ")" print text # Relaxation data type. - if type(ri_label) != str: - raise RelaxStrError, ('relaxation label', ri_label) + if type(id) != str: + raise RelaxStrError, ('relaxation label', id) # Frequency label. if type(frq_label) != str: raise RelaxStrError, ('frequency label', frq_label) # Execute the functional code. - relax_data.display(ri_label=ri_label, frq_label=frq_label) + relax_data.display(id=id, frq_label=frq_label) def read(self, id=None, file=None, dir=None, mol_name_col=None, res_num_col=0, res_name_col=1, spin_num_col=None, spin_name_col=None, data_col=2, error_col=3, sep=None): @@ -331,13 +331,13 @@ rdc.read(id=id, file=file, dir=dir, mol_name_col=mol_name_col, res_num_col=res_num_col, res_name_col=res_name_col, spin_num_col=spin_num_col, spin_name_col=spin_name_col, data_col=data_col, error_col=error_col, sep=sep) - def write(self, ri_label=None, frq_label=None, file=None, dir=None, force=False): + def write(self, id=None, frq_label=None, file=None, dir=None, force=False): """Function for writing R1, R2, or NOE relaxation data to a file. Keyword Arguments ~~~~~~~~~~~~~~~~~ - ri_label: The relaxation data type, ie 'R1', 'R2', or 'NOE'. + id: The relaxation data type, ie 'R1', 'R2', or 'NOE'. frq_label: The field strength label. @@ -352,14 +352,14 @@ ~~~~~~~~~~~ If no directory name is given, the file will be placed in the current working directory. - The 'ri_label' and 'frq_label' arguments are required for selecting which relaxation data + The 'id' and 'frq_label' arguments are required for selecting which relaxation data to write to file. """ # Function intro text. if self.__relax__.interpreter.intro: text = sys.ps3 + "relax_data.write(" - text = text + "ri_label=" + `ri_label` + text = text + "id=" + `id` text = text + ", frq_label=" + `frq_label` text = text + ", file=" + `file` text = text + ", dir=" + `dir` @@ -367,8 +367,8 @@ print text # Relaxation data type. - if type(ri_label) != str: - raise RelaxStrError, ('relaxation label', ri_label) + if type(id) != str: + raise RelaxStrError, ('relaxation label', id) # Frequency label. if type(frq_label) != str: @@ -387,4 +387,4 @@ raise RelaxBoolError, ('force flag', force) # Execute the functional code. - relax_data.write(ri_label=ri_label, frq_label=frq_label, file=file, dir=dir, force=force) + relax_data.write(id=id, frq_label=frq_label, file=file, dir=dir, force=force)