Package prompt :: Module consistency_tests
[hide private]
[frames] | no frames]

Source Code for Module prompt.consistency_tests

 1  ############################################################################### 
 2  #                                                                             # 
 3  # Copyright (C) 2004-2005 Edward d'Auvergne                                   # 
 4  # Copyright (C) 2007 Sebastien Morin                                          # 
 5  #                                                                             # 
 6  # This file is part of the program relax.                                     # 
 7  #                                                                             # 
 8  # relax is free software; you can redistribute it and/or modify               # 
 9  # it under the terms of the GNU General Public License as published by        # 
10  # the Free Software Foundation; either version 2 of the License, or           # 
11  # (at your option) any later version.                                         # 
12  #                                                                             # 
13  # relax is distributed in the hope that it will be useful,                    # 
14  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
15  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
16  # GNU General Public License for more details.                                # 
17  #                                                                             # 
18  # You should have received a copy of the GNU General Public License           # 
19  # along with relax; if not, write to the Free Software                        # 
20  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   # 
21  #                                                                             # 
22  ############################################################################### 
23   
24  import sys 
25   
26  import help 
27   
28   
29 -class Consistency_tests:
30 - def __init__(self, relax):
31 # Help. 32 self.__relax_help__ = \ 33 """Class containing functions specific to consistency tests for datasets from different fields.""" 34 35 # Add the generic help string. 36 self.__relax_help__ = self.__relax_help__ + "\n" + help.relax_class_help 37 38 # Place relax in the class namespace. 39 self.__relax__ = relax
40 41
42 - def set_frq(self, run=None, frq=None):
43 """Function for selecting which relaxation data to use in the consistency tests. 44 45 Keyword Arguments 46 ~~~~~~~~~~~~~~~~~ 47 48 run: The name of the run. 49 50 frq: The spectrometer frequency in Hz. 51 52 53 Description 54 ~~~~~~~~~~~ 55 56 This function will select the relaxation data to use in the consistency tests corresponding 57 to the given frequencies. 58 59 60 Examples 61 ~~~~~~~~ 62 63 relax> consistency_tests.set_frq('test', 600.0 * 1e6) 64 relax> consistency_tests.set_frq(run='test', frq=600.0 * 1e6) 65 """ 66 67 # Function intro text. 68 if self.__relax__.interpreter.intro: 69 text = sys.ps3 + "consistency_tests.set_frq(" 70 text = text + "run=" + `run` 71 text = text + ", frq=" + `frq` + ")" 72 print text 73 74 # The run argument. 75 if type(run) != str: 76 raise RelaxStrError, ('run', run) 77 78 # The frq arguments. 79 if type(frq) != float: 80 raise RelaxStrError, ('frq', frq) 81 82 # Execute the functional code. 83 self.__relax__.specific.consistency_tests.set_frq(run=run, frq=frq)
84