Author: bugman Date: Sun Jun 8 14:37:30 2008 New Revision: 6345 URL: http://svn.gna.org/viewcvs/relax?rev=6345&view=rev Log: Updated the relax_data.copy() user function interface to the new design. Modified: branches/relax_data_rearrange/prompt/relax_data.py Modified: branches/relax_data_rearrange/prompt/relax_data.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_data_rearrange/prompt/relax_data.py?rev=6345&r1=6344&r2=6345&view=diff ============================================================================== --- branches/relax_data_rearrange/prompt/relax_data.py (original) +++ branches/relax_data_rearrange/prompt/relax_data.py Sun Jun 8 14:37:30 2008 @@ -80,15 +80,15 @@ relax_data.back_calc(ri_label=ri_label, frq_label=frq_label, frq=frq) - def copy(self, run1=None, run2=None, ri_label=None, frq_label=None): - """Function for copying relaxation data from run1 to run2. - - Keyword Arguments - ~~~~~~~~~~~~~~~~~ - - run1: The name of the run to copy the sequence from. - - run2: The name of the run to copy the sequence to. + def copy(self, pipe_from=None, pipe_to=None, ri_label=None, frq_label=None): + """Function for copying relaxation data from pipe_from to pipe_to. + + Keyword Arguments + ~~~~~~~~~~~~~~~~~ + + pipe_from: The name of the pipe to copy the relaxation data from. + + pipe_to: The name of the pipe to copy the relaxation data to. ri_label: The relaxation data type, ie 'R1', 'R2', or 'NOE'. @@ -98,7 +98,7 @@ Description ~~~~~~~~~~~ - This function will copy relaxation data from 'run1' to 'run2'. If ri_label and frq_label + This function will copy relaxation data from 'pipe_from' to 'pipe_to'. If ri_label and frq_label are not given then all relaxation data will be copied, otherwise only a specific data set will be copied. @@ -106,36 +106,36 @@ Examples ~~~~~~~~ - To copy all relaxation data from run 'm1' to run 'm9', type one of: + To copy all relaxation data from pipe 'm1' to pipe 'm9', type one of: relax> relax_data.copy('m1', 'm9') - relax> relax_data.copy(run1='m1', run2='m9') + relax> relax_data.copy(pipe_from='m1', pipe_to='m9') relax> relax_data.copy('m1', 'm9', None, None) - relax> relax_data.copy(run1='m1', run2='m9', ri_label=None, frq_label=None) + relax> relax_data.copy(pipe_from='m1', pipe_to='m9', ri_label=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(run1='m3', run2='m6', ri_label='NOE', frq_label='800') + relax> relax_data.copy(pipe_from='m3', pipe_to='m6', ri_label='NOE', frq_label='800') """ # Function intro text. if self.__relax__.interpreter.intro: text = sys.ps3 + "relax_data.copy(" - text = text + "run1=" + `run1` - text = text + ", run2=" + `run2` + text = text + "pipe_from=" + `pipe_from` + text = text + ", pipe_to=" + `pipe_to` text = text + ", ri_label=" + `ri_label` text = text + ", frq_label=" + `frq_label` + ")" print text - # The run1 argument. - if type(run1) != str: - raise RelaxStrError, ('run1', run1) - - # The run2 argument. - if type(run2) != str: - raise RelaxStrError, ('run2', run2) + # The pipe_from argument. + if type(pipe_from) != str: + raise RelaxStrError, ('pipe_from', pipe_from) + + # The pipe_to argument. + if type(pipe_to) != str: + raise RelaxStrError, ('pipe_to', pipe_to) # Relaxation data type. if ri_label != None and type(ri_label) != str: @@ -146,7 +146,7 @@ raise RelaxNoneStrError, ('frequency label', frq_label) # Execute the functional code. - self.__relax__.specific.relax_data.copy(run1=run1, run2=run2, ri_label=ri_label, frq_label=frq_label) + relax_data.copy(pipe_from=pipe_from, pipe_to=pipe_to, ri_label=ri_label, frq_label=frq_label) def delete(self, run=None, ri_label=None, frq_label=None):