-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlimaroperscientific.mac
67 lines (53 loc) · 1.91 KB
/
limaroperscientific.mac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#%NAME%
# Specific macros for Lima RoperScientific (Princeton) detector
#%CATEGORY% Detection, Ccd
#%LOG%
#
def limaroperscientificsetup(ccdname) '{
# --- common control init
_limapar_controlinit(ccdname, 0)
# --- parameter definition
_limapar_addconfig(ccdname, "temperature_set_point", LP_RW|LP_MOT, 1)
_limapar_addconfig(ccdname, "temperature", LP_READ, 1)
_limapar_addconfig(ccdname, "gain", LP_RW|LP_MOT, 1)
_limapar_addconfig(ccdname, "adc_rate", LP_RW|LP_LIST, 1)
# --- parameter description
_limapar_addtext(ccdname, "temperature_set_point", "Temperature set-point")
_limapar_addtext(ccdname, "temperature", "Sensor Temperature")
_limapar_addtext(ccdname, "gain", "ADC Gain")
_limapar_addtext(ccdname, "adc_rate", "ADC Rate")
}'
lima_addlimatype("RoperScientific", "limaroperscientificsetup", "limaroperscientificmenu")
def limaroperscientificmenu(ccdname) '{
local items[] parname
local nl option
items["temperature_set_point"] = -1
items["temperature"] = -1
items["gain"] = -1
items["adc_rate"] = ""
option= 1
while (option) {
for (parname in items) {
items[parname]= _limapar_get(ccdname, parname)
}
nl = _limamenu_printtitle(ccdname, "Configuration", "config")
tty_move(25, nl++, sprintf(" Sensor @ \[md\]%d\[me\] C", items["temperature"]))
_limamenu_printitem(ccdname, "temperature_set_point", items["temperature_set_point"], nl++,1)
nl++
_limamenu_printitem(ccdname, "ADC Gain", items["gain"], nl++,2)
nl++
_limamenu_printitem(ccdname, "ADC Rate", items["adc_rate"], nl++,3)
option= getval("\n\n\tOption ---> ", 0)
printf("\n\n")
if(option==1)
_limapar_ask(ccdname, "temperature_set_point",items["temperature_set_point"])
if(option==2)
_limapar_ask(ccdname, "gain",items["gain"])
if(option==3)
_limapar_ask(ccdname, "adc_rate",items["adc_rate"])
}
}'
#%MACROS%
#%IMACROS%
#%TOC%
#%AUTHOR% L.Claustre