-
Notifications
You must be signed in to change notification settings - Fork 1
/
limaandor3.mac
115 lines (92 loc) · 4.1 KB
/
limaandor3.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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#%NAME%
# Specific macros for Lima Andor3 detector
#%CATEGORY% Detection, Ccd
#%LOG%
#
def limaandor3setup(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)
_limapar_addconfig(ccdname, "temperature", LP_READ, 1)
_limapar_addconfig(ccdname, "adc_gain",LP_RW|LP_LIST,1)
_limapar_addconfig(ccdname, "adc_rate",LP_RW|LP_LIST,1)
_limapar_addconfig(ccdname, "fan_speed",LP_RW|LP_LIST,1)
_limapar_addconfig(ccdname, "electronic_shutter_mode",LP_RW|LP_LIST,1)
_limapar_addconfig(ccdname, "frame_rate",LP_READ,1)
_limapar_addconfig(ccdname, "overlap",LP_RW|LP_LIST,1)
_limapar_addconfig(ccdname, "spurious_noise_filter",LP_RW|LP_LIST,1)
# --- parameter description
_limapar_addtext(ccdname, "cooler", "Cooler Mode")
_limapar_addtext(ccdname, "cooling_status", "Cooling Status")
_limapar_addtext(ccdname, "temperature_sp", "Temperature set-point (C)")
_limapar_addtext(ccdname, "temperature", "Sensor Temperature")
_limapar_addtext(ccdname, "adc_gain", "Preamplifier gain")
_limapar_addtext(ccdname, "adc_rate", "Adc Readout Rate")
_limapar_addtext(ccdname, "fan_speed", "Fan speed")
_limapar_addtext(ccdname, "electronic_shutter_mode", "Electronic shutter mode")
_limapar_addtext(ccdname, "frame_rate", "Frame rate on last acquisition")
_limapar_addtext(ccdname, "overlap", "Overlap Mode")
_limapar_addtext(ccdname, "spurious_noise_filter", "Spurious Noise Filter Mode")
}'
lima_addlimatype("Andor3", "limaandor3setup", "limaandor3menu")
def limaandor3menu(ccdname) '{
local items[] parname
local nl option
items["cooling_status"] = ""
items["cooler"] = ""
items["temperature_sp"] = -1
items["temperature"] = -1
items["fan_speed"] = ""
items["adc_gain"] = ""
items["adc_rate"] = ""
items["electronic_shutter_mode"] = ""
items["overlap"] = ""
items["spurious_noise_filter"] = ""
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", items["overlap"], nl++,24)
_limamenu_printitem(ccdname, "spurious_noise_filter", 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