1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 """The spectrometer user function definitions for loading spectrometer information."""
24
25
26 from graphics import WIZARD_IMAGE_PATH
27 from pipe_control import spectrum
28 import pipe_control.spectrometer
29 from user_functions.data import Uf_info; uf_info = Uf_info()
30 from user_functions.objects import Desc_container
31
32
33
34 uf_class = uf_info.add_class('spectrometer')
35 uf_class.title = "Class for manipulating spectrometer frequencies."
36 uf_class.menu_text = "&spectrometer"
37 uf_class.gui_icon = "relax.spectrometer"
38
39
40 uf = uf_info.add_uf('spectrometer.frequency')
41 uf.title = "Set the spectrometer proton frequency of the experiment."
42 uf.title_short = "Spectrometer frequency setup."
43 uf.add_keyarg(
44 name = "id",
45 py_type = "str",
46 desc_short = "experiment ID",
47 desc = "The experiment identification string to set the frequency of.",
48 wiz_element_type = 'combo',
49 wiz_combo_iter = spectrum.get_ids
50 )
51 uf.add_keyarg(
52 name = "frq",
53 py_type = "num",
54 desc_short = "spectrometer frequency",
55 desc = "The spectrometer frequency. See the 'sfrq' parameter in the Varian procpar file or the 'SFO1' parameter in the Bruker acqus file."
56 )
57 uf.add_keyarg(
58 name = "units",
59 default = "Hz",
60 py_type = "str",
61 desc_short = "frequency units",
62 desc = "The units of frequency.",
63 wiz_element_type = "combo",
64 wiz_combo_choices = [
65 "Hz",
66 "kHz",
67 "MHz",
68 "GHz"
69 ],
70 wiz_read_only = False
71 )
72
73 uf.desc.append(Desc_container())
74 uf.desc[-1].add_paragraph("This allows the spectrometer frequency of a given experiment to be set. The expected units are that of the proton resonance frequency in Hertz. See the 'sfrq' parameter in the Varian procpar file or the 'SFO1' parameter in the Bruker acqus file for the exact value.")
75 uf.backend = pipe_control.spectrometer.set_frequency
76 uf.menu_text = "&frequency"
77 uf.gui_icon = "relax.frq"
78 uf.wizard_size = (750, 500)
79 uf.wizard_image = WIZARD_IMAGE_PATH + 'spectrometer.png'
80
81
82
83 uf = uf_info.add_uf('spectrometer.temperature')
84 uf.title = "Specify the temperature of an experiment."
85 uf.title_short = "Experimental temperature."
86 uf.add_keyarg(
87 name = "id",
88 py_type = "str",
89 desc_short = "experiment ID string",
90 desc = "The experiment identification string."
91 )
92 uf.add_keyarg(
93 name = "temp",
94 py_type = "num",
95 desc_short = "experimental temperature",
96 desc = "The temperature of the experiment in Kalvin."
97 )
98
99 uf.desc.append(Desc_container())
100 uf.desc[-1].add_paragraph("This allows the temperature of an experiment to be set. This value should be in Kalvin. In certain analyses, for example those which use pseudocontact shift data, knowledge of the temperature is essential. For the pseudocontact shift, the experiment ID string should match one of the alignment IDs.")
101 uf.backend = pipe_control.spectrometer.set_temperature
102 uf.menu_text = "&temperature"
103 uf.gui_icon = "oxygen.status.weather-clear"
104 uf.wizard_size = (700, 500)
105 uf.wizard_image = WIZARD_IMAGE_PATH + 'oxygen-icon-weather-snow-scattered-night.png'
106