Package user_functions :: Module jw_mapping
[hide private]
[frames] | no frames]

Source Code for Module user_functions.jw_mapping

 1  ############################################################################### 
 2  #                                                                             # 
 3  # Copyright (C) 2004-2014 Edward d'Auvergne                                   # 
 4  #                                                                             # 
 5  # This file is part of the program relax (http://www.nmr-relax.com).          # 
 6  #                                                                             # 
 7  # This program is free software: you can redistribute it and/or modify        # 
 8  # it under the terms of the GNU General Public License as published by        # 
 9  # the Free Software Foundation, either version 3 of the License, or           # 
10  # (at your option) any later version.                                         # 
11  #                                                                             # 
12  # This program is distributed in the hope that it will be useful,             # 
13  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
15  # GNU General Public License for more details.                                # 
16  #                                                                             # 
17  # You should have received a copy of the GNU General Public License           # 
18  # along with this program.  If not, see <http://www.gnu.org/licenses/>.       # 
19  #                                                                             # 
20  ############################################################################### 
21   
22  # Module docstring. 
23  """The jw_mapping user function definitions for Reduced Spectral Density Mapping.""" 
24   
25  # relax module imports. 
26  from pipe_control import spectrometer 
27  from specific_analyses.jw_mapping.uf import set_frq 
28  from user_functions.data import Uf_info; uf_info = Uf_info() 
29  from user_functions.objects import Desc_container 
30   
31   
32  # The user function class. 
33  uf_class = uf_info.add_class('jw_mapping') 
34  uf_class.title = "Class containing functions specific to reduced spectral density mapping." 
35  uf_class.menu_text = "&jw_mapping" 
36  uf_class.gui_icon = "relax.jw_mapping" 
37   
38   
39  # The jw_mapping.set_frq user function. 
40  uf = uf_info.add_uf('jw_mapping.set_frq') 
41  uf.title = "Select which relaxation data to use in the J(w) mapping by NMR spectrometer frequency." 
42  uf.title_short = "Spectrometer selection." 
43  uf.add_keyarg( 
44      name = "frq", 
45      py_type = "float", 
46      desc_short = "spectrometer frequency in Hz", 
47      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.", 
48      wiz_element_type = 'combo', 
49      wiz_combo_iter = spectrometer.get_frequencies, 
50      wiz_read_only = True, 
51  ) 
52  # Description. 
53  uf.desc.append(Desc_container()) 
54  uf.desc[-1].add_paragraph("This will select the relaxation data to use in the reduced spectral density mapping corresponding to the given frequency.  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).") 
55  # Prompt examples. 
56  uf.desc.append(Desc_container("Prompt examples")) 
57  uf.desc[-1].add_prompt("relax> jw_mapping.set_frq(600.0 * 1e6)") 
58  uf.desc[-1].add_prompt("relax> jw_mapping.set_frq(frq=600.0 * 1e6)") 
59  uf.backend = set_frq 
60  uf.menu_text = "&set_frq" 
61  uf.gui_icon = "relax.frq" 
62  uf.wizard_height_desc = 350 
63  uf.wizard_size = (700, 500) 
64