Package user_functions :: Module consistency_tests'
[hide private]
[frames] | no frames]

Source Code for Module user_functions.consistency_tests'

 1  ############################################################################### 
 2  #                                                                             # 
 3  # Copyright (C) 2004-2012 Edward d'Auvergne                                   # 
 4  # Copyright (C) 2007-2008 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  # Module docstring. 
25  """The consistency_tests user function definitions.""" 
26   
27  # relax module imports. 
28  from generic_fns import frq 
29  from graphics import ANALYSIS_IMAGE_PATH 
30  from specific_fns.setup import consistency_tests_obj 
31  from user_functions.data import Uf_info; uf_info = Uf_info() 
32  from user_functions.objects import Desc_container 
33   
34   
35  # The user function class. 
36  uf_class = uf_info.add_class('consistency_tests') 
37  uf_class.title = "Class containing functions specific to consistency tests for datasets from different fields." 
38  uf_class.menu_text = "&consistency_tests" 
39  uf_class.gui_icon = "relax.consistency_testing" 
40   
41   
42  # The consistency_tests.set_frq user function. 
43  uf = uf_info.add_uf('consistency_tests.set_frq') 
44  uf.title = "Select which relaxation data to use in the consistency tests by NMR spectrometer frequency." 
45  uf.title_short = "Spectrometer selection." 
46  uf.add_keyarg( 
47      name = "frq", 
48      py_type = "float", 
49      desc_short = "spectrometer frequency in Hz", 
50      desc = "The spectrometer frequency in Hz.  This must match the currently loaded data to the last decimal point.  See the 'sfrq' parameter in the Varian procpar file or the 'SFO1' parameter in the Bruker acqus file.", 
51      wiz_element_type = 'combo', 
52      wiz_combo_iter = frq.get_values, 
53      wiz_read_only = True, 
54  ) 
55  # Description. 
56  uf.desc.append(Desc_container()) 
57  uf.desc[-1].add_paragraph("This will select the relaxation data to use in the consistency tests corresponding to the given frequencies.  The data is selected by the spectrometer frequency in Hertz, which should be set to the exact value (see the 'sfrq' parameter in the Varian procpar file or the 'SFO1' parameter in the Bruker acqus file).  Note thought that the R1, R2 and NOE are all expected to have the exact same frequency in the J(w) mapping analysis (to the last decimal point).") 
58  # Prompt examples. 
59  uf.desc.append(Desc_container("Prompt examples")) 
60  uf.desc[-1].add_prompt("relax> consistency_tests.set_frq(600.0 * 1e6)") 
61  uf.desc[-1].add_prompt("relax> consistency_tests.set_frq(frq=600.0 * 1e6)") 
62  uf.backend = consistency_tests_obj._set_frq 
63  uf.menu_text = "&set_frq" 
64  uf.gui_icon = "relax.frq" 
65  uf.wizard_height_desc = 350 
66  uf.wizard_size = (700, 500) 
67  uf.wizard_image = ANALYSIS_IMAGE_PATH + 'consistency_testing_200x94.png' 
68