-
Notifications
You must be signed in to change notification settings - Fork 1
/
limaandor.mac
131 lines (108 loc) · 4.89 KB
/
limaandor.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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#%NAME%
# Specific macros for Lima Andor detector
#%CATEGORY% Detection, Ccd
#%LOG%
#
#
def limaandorsetup(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, "fast_ext_trigger",LP_RW|LP_LIST,1)
_limapar_addconfig(ccdname, "shutter_level",LP_RW|LP_LIST,1)
_limapar_addconfig(ccdname, "p_gain",LP_RW|LP_LIST,1)
_limapar_addconfig(ccdname, "adc_speed",LP_RW|LP_LIST,1)
_limapar_addconfig(ccdname, "vs_speed",LP_RW|LP_LIST,1)
_limapar_addconfig(ccdname, "fan_mode",LP_RW|LP_LIST,1)
_limapar_addconfig(ccdname, "high_capacity",LP_RW|LP_LIST,1)
_limapar_addconfig(ccdname, "baseline_clamp",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")
_limapar_addtext(ccdname, "temperature", "Sensor Temperature")
_limapar_addtext(ccdname, "fast_ext_trigger", "Fast External Trigger Mode")
_limapar_addtext(ccdname, "shutter_level", "Shutter Level Mode")
_limapar_addtext(ccdname, "p_gain", "Preamplifier gain")
_limapar_addtext(ccdname, "adc_speed", "Adc/Horizontal speed pair")
_limapar_addtext(ccdname, "vs_speed", "Vertical Shift speed")
_limapar_addtext(ccdname, "fan_mode", "Fan mode")
_limapar_addtext(ccdname, "high_capacity", "High Capacity mode")
_limapar_addtext(ccdname, "baseline_clamp", "Baseline clamping")
}'
lima_addlimatype("Andor", "limaandorsetup", "limaandormenu")
def limaandormenu(ccdname) '{
local items[] parname
local nl option
items["cooling_status"] = ""
items["cooler"] = ""
items["temperature_sp"] = -1
items["temperature"] = -1
items["fast_ext_trigger"] = ""
items["shutter_level"] = ""
items["p_gain"] = ""
items["adc_speed"] = ""
items["vs_speed"] = ""
items["fan_mode"] = ""
items["high_capacity"] = ""
items["baseline_clamp"] = ""
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++,12)
_limamenu_printitem(ccdname, "temperature_sp", items["temperature_sp"], nl++,13)
_limamenu_printitem(ccdname, "fan_mode", items["fan_mode"], nl++,14)
nl++
tty_move(0, nl++, "(2) Input/Output Signals :")
_limamenu_printitem(ccdname, "fast_ext_trigger", items["fast_ext_trigger"], nl++,21)
_limamenu_printitem(ccdname, "shutter_level", items["shutter_level"], nl++,22)
tty_move(0, nl++, "(3) Expert setting :")
_limamenu_printitem(ccdname, "p_gain", items["p_gain"], nl++,31)
_limamenu_printitem(ccdname, "adc_speed", items["adc_speed"], nl++,32)
_limamenu_printitem(ccdname, "vs_speed", items["vs_speed"], nl++,33)
_limamenu_printitem(ccdname, "high_capacity", items["high_capacity"], nl++,34)
_limamenu_printitem(ccdname, "baseline_clamp", items["baseline_clamp"], nl++,35)
option= getval("\n\n\tOption ---> ", 0)
printf("\n\n")
if(option=="r")
continue
if((option==1) || (option==12))
_limapar_ask(ccdname, "cooler",items["cooler"])
if((option==1) || (option==13))
_limapar_ask(ccdname, "temperature_sp",items["temperature_sp"])
if((option==1) || (option==14))
_limapar_ask(ccdname, "fan_mode",items["fan_mode"])
if((option==2) || (option==21)) {
tty_cntl("md");printf("WARNING:"); tty_cntl("me"); print "setting this mode to ON speeds up the acquisition"
print "but it switches off the CCD \"cleanup cycle\" before starting a new acquisition."
print "It only has effect if the trigger mode is set to external signal.\n\n"
_limapar_ask(ccdname, "fast_ext_trigger",items["fast_ext_shutter"])
}
if((option==2) || (option==22))
_limapar_ask(ccdname, "shutter_level",items["shutter_level"])
if((option==3) || (option==31))
_limapar_ask(ccdname, "p_gain",items["p_gain"])
if((option==3) || (option==32))
_limapar_ask(ccdname, "adc_speed",items["adc_speed"])
if((option==3) || (option==33))
_limapar_ask(ccdname, "vs_speed",items["vs_speed"])
if((option==3) || (option==34))
_limapar_ask(ccdname, "high_capacity",items["high_capacity"])
if((option==3) || (option==35))
_limapar_ask(ccdname, "baseline_clamp",items["baseline_clamp"])
}
}'
#%MACROS%
#%IMACROS%
#%TOC%
#%AUTHOR% L.Claustre