-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlimapixirad.mac
90 lines (70 loc) · 3.05 KB
/
limapixirad.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#%NAME%
# Specific macros for Lima Andor3 detector
#%CATEGORY% Detection, Ccd
#%LOG%
#
########################## LIMA GURUS DO NOT USE THIS FILE // DEV ONE IS ON loka.esrf.fr (bm05) ##################
def limapixiradsetup(ccdname) '{
# --- common control init
_limapar_controlinit(ccdname, 0)
# --- parameter definition
# _limapar_addconfig(ccdname, "cooling_status",LP_READ,1)
# _limapar_addconfig(ccdname, "cooler",LP_RW|LP_LIST,1)
# _limapar_addconfig(ccdname, "temperature_sp", LP_RW|LP_MOT, 1)
# --- parameter description
# _limapar_addtext(ccdname, "cooler", "Cooler Mode")
# _limapar_addtext(ccdname, "cooling_status", "Cooling Status")
# _limapar_addtext(ccdname, "temperature_sp", "Temperature set-point")
}'
lima_addlimatype("Pixirad", "limapixiradsetup", "limapixiradmenu")
def limapixiradmenu(ccdname) '{
local items[] parname
local nl option
# items["cooling_status"] = ""
# items["cooler"] = ""
# items["temperature_sp"] = -1
option= 1
while (option) {
for (parname in items) {
items[parname]= _limapar_get(ccdname, parname)
}
# nl = _limamenu_printtitle(ccdname, "Configuration", "config")
tty_move(0, nl, "(1) Temperature Control :")
# tty_move(25, nl++, sprintf(" Sensor @ \[md\]%d\[me\] C", items["temperature"]))
# tty_move(4, nl++, sprintf(" (r) Status \[md\]%s\[me\]", items["cooling_status"]))
# _limamenu_printitem(ccdname, "cooler", items["cooler"], nl++,11)
# _limamenu_printitem(ccdname, "temperature_sp", items["temperature_sp"], nl++,12)
# _limamenu_printitem(ccdname, "fan_speed", items["fan_speed"], nl++,13)
nl++
tty_move(0, nl++, "(2) Expert setting :")
# _limamenu_printitem(ccdname, "Adc Gain", items["adc_gain"], nl++,21)
# _limamenu_printitem(ccdname, "Adc Rate", items["adc_rate"], nl++,22)
# _limamenu_printitem(ccdname, "Electronic shutter mode", items["electronic_shutter_mode"], nl++,23)
# _limamenu_printitem(ccdname, "Overlap mode", items["overlap"], nl++,24)
# _limamenu_printitem(ccdname, "Spurious noise filter mode", items["spurious_noise_filter"], nl++,25)
# option= getval("\n\n\tOption ---> ", 0)
printf("\n\n")
# if(option=="r")
# continue
# if((option==1) || (option==11))
# _limapar_ask(ccdname, "cooler",items["cooler"])
# if((option==1) || (option==12))
# _limapar_ask(ccdname, "temperature_sp",items["temperature_sp"])
# if((option==1) || (option==13))
# _limapar_ask(ccdname, "fan_speed",items["fan_speed"])
# if((option==2) || (option==21))
# _limapar_ask(ccdname, "adc_gain",items["adc_gain"])
# if((option==2) || (option==22))
# _limapar_ask(ccdname, "adc_rate",items["adc_rate"])
# if((option==2) || (option==23))
# _limapar_ask(ccdname, "electronic_shutter_mode",items["electronic_shutter_mode"])
# if((option==2) || (option==24))
# _limapar_ask(ccdname, "overlap",items["overlap"])
# if((option==2) || (option==25))
# _limapar_ask(ccdname, "spurious_noise_filter",items["spurious_noise_filter"])
}
}'
#%MACROS%
#%IMACROS%
#%TOC%
#%AUTHOR% L.Claustre