-
Notifications
You must be signed in to change notification settings - Fork 1
/
limapco.mac
260 lines (188 loc) · 8.98 KB
/
limapco.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
#%NAME%
# Specific macros for Lima pco detector
#%CATEGORY% Detection, Ccd
#%LOG%
#
# 2016/05/18 rh
# added new attributes
# - lastImgRecorded
# - lastImgAcquired
# - pixelRate, pixelRateIngo, pixelRateValidValues
# - adcMax
# update limapcomenu
# 2016/10/07 rh - fixed limapcomenu (camera information)
#=====================================================================
#=====================================================================
def limapcosetup(ccdname) '{
# --- common control init
_limapar_controlinit(ccdname, 0)
# --- parameter definition & description
#_limapar_addconfig(ccdname, "acqTimeoutRetry",LP_RW,1)
#_limapar_addtext(ccdname, "acqTimeoutRetry", "acq Timeout Retry (for debug only!)")
_limapar_addconfig(ccdname, "adc",LP_RW,1)
_limapar_addtext(ccdname, "adc", "Number of present working ADC")
_limapar_addconfig(ccdname, "adcMax",LP_READ,1)
_limapar_addtext(ccdname, "adcMax", "Max. number of available ADC")
_limapar_addconfig(ccdname, "binInfo",LP_READ,1)
_limapar_addtext(ccdname, "binInfo", "BIN Info")
_limapar_addconfig(ccdname, "bytesPerPixel",LP_READ,1)
_limapar_addtext(ccdname, "bytesPerPixel", "Image Bytes Per Pixel")
_limapar_addconfig(ccdname, "bitAlignment",LP_RW,1)
_limapar_addtext(ccdname, "bitAlignment", "bit aligment")
_limapar_addconfig(ccdname, "camerasFound",LP_READ,1)
_limapar_addtext(ccdname, "camerasFound", "Pco Cameras found during Open search")
_limapar_addconfig(ccdname, "camInfo",LP_READ,1)
_limapar_addtext(ccdname, "camInfo", "general cam info")
_limapar_addconfig(ccdname, "camName",LP_READ,1)
_limapar_addtext(ccdname, "camName", "Camera Name")
_limapar_addconfig(ccdname, "camNameBase",LP_READ,1)
_limapar_addtext(ccdname, "camNameBase", "Camera Name (base)")
_limapar_addconfig(ccdname, "camNameEx",LP_READ,1)
_limapar_addtext(ccdname, "camNameEx", "Camera Name (extended)")
_limapar_addconfig(ccdname, "camType",LP_READ,1)
_limapar_addtext(ccdname, "camType", "cam type")
_limapar_addconfig(ccdname, "cdiMode",LP_RW,1)
_limapar_addtext(ccdname, "cdiMode", "CDI (only some PCO cameras)")
_limapar_addconfig(ccdname, "clXferPar",LP_READ,1)
_limapar_addtext(ccdname, "clXferPar", "cameraLink transfer parameters")
_limapar_addconfig(ccdname, "cocRunTime",LP_READ,1)
_limapar_addtext(ccdname, "cocRunTime", "Frame run time (sec)")
_limapar_addconfig(ccdname, "coolingTemperature",LP_RW,1)
_limapar_addtext(ccdname, "coolingTemperature", "Cooling Set Point (only some cameras)")
_limapar_addconfig(ccdname, "debugInt",LP_RW,1)
_limapar_addtext(ccdname, "debugInt", "PCO debug level (hex format: 0x....)")
_limapar_addconfig(ccdname, "debugIntTypes",LP_READ,1)
_limapar_addtext(ccdname, "debugIntTypes", "Pco Firware Info")
_limapar_addconfig(ccdname, "doubleImageMode",LP_RW,1)
_limapar_addtext(ccdname, "doubleImageMode", "double image mode")
_limapar_addconfig(ccdname, "firmwareInfo",LP_READ,1)
_limapar_addtext(ccdname, "firmwareInfo", "Pco Firware Info")
_limapar_addconfig(ccdname, "frameRate",LP_READ,1)
_limapar_addtext(ccdname, "frameRate", "Frame Rate (Hz)")
_limapar_addconfig(ccdname, "info",LP_READ,1)
_limapar_addtext(ccdname, "info", "Pco settings")
_limapar_addconfig(ccdname, "lastError",LP_READ,1)
_limapar_addtext(ccdname, "lastError", "Pco last error")
_limapar_addconfig(ccdname, "lastImgAcquired",LP_READ,1)
_limapar_addtext(ccdname, "lastImgAcquired", "last image acquired")
_limapar_addconfig(ccdname, "lastImgRecorded",LP_READ,1)
_limapar_addtext(ccdname, "lastImgRecorded", "last image recorded (Dimax, 2K, 4K)")
_limapar_addconfig(ccdname, "logMsg",LP_READ,1)
_limapar_addtext(ccdname, "logMsg", "Print last log messages")
_limapar_addconfig(ccdname, "logPcoEnabled",LP_READ,1)
_limapar_addtext(ccdname, "logPcoEnabled", "Pco LOG Files Enabled")
_limapar_addconfig(ccdname, "maxNbImages",LP_READ,1)
_limapar_addtext(ccdname, "maxNbImages", "Maximum number of images")
#_limapar_addconfig(ccdname, "pixelRate",LP_RW|LP_LIST,1)
_limapar_addconfig(ccdname, "pixelRate",LP_RW,1)
if (_limapar_get(ccdname, "pixelRateValidValues") != "invalid"){
_limapar_addconfig(ccdname, "pixelRateValidValues", LP_READ,1)
_limapar_addtext(ccdname, "pixelRateValidValues", "Pco pixel rate usable values (Hz)")
_limapar_addtext(ccdname, "pixelRate", "Pco Edge/2K/4K pixel rate set (Hz)")
}
else{
_limapar_addtext(ccdname, "pixelRate", "Pco Edge/2K/4K pixel rate")
}
_limapar_addconfig(ccdname, "pixelRateInfo",LP_READ,1)
_limapar_addtext(ccdname, "pixelRateInfo", "Pco pixel rate info (MHz)")
_limapar_addconfig(ccdname, "roiInfo",LP_READ,1)
_limapar_addtext(ccdname, "roiInfo", "ROI Info")
_limapar_addconfig(ccdname, "roiLastFixed",LP_READ,1)
_limapar_addtext(ccdname, "roiLastFixed", "Last Fixed ROI Info")
_limapar_addconfig(ccdname, "rollingShutter",LP_RW,1)
_limapar_addtext(ccdname, "rollingShutter", "Pco Edge Rolling(1)/Global(2)/GlobalReset(4) shutter")
_limapar_addconfig(ccdname, "rollingShutterInfo",LP_READ,1)
_limapar_addtext(ccdname, "rollingShutterInfo", "Pco Rolling Shutter Info")
_limapar_addconfig(ccdname, "temperatureInfo",LP_READ,1)
_limapar_addtext(ccdname, "temperatureInfo", "Pco Temperature Sensors Info")
_limapar_addconfig(ccdname, "timestampMode",LP_RW,1)
_limapar_addtext(ccdname, "timestampMode", "timestamp mode")
_limapar_addconfig(ccdname, "traceAcq",LP_READ,1)
_limapar_addtext(ccdname, "traceAcq", "Pco cam trace/time acq")
_limapar_addconfig(ccdname, "version",LP_READ,1)
_limapar_addtext(ccdname, "version", "Pco plugin version")
_limapar_addconfig(ccdname, "versionAtt",LP_READ,1)
_limapar_addtext(ccdname, "versionAtt", "Pco.py attribute file version")
_limapar_addconfig(ccdname, "versionSdk",LP_READ,1)
_limapar_addtext(ccdname, "versionSdk", "Pco SDK Version")
}'
#=====================================================================
#=====================================================================
lima_addlimatype("Pco", "limapcosetup", "limapcomenu")
#=====================================================================
#=====================================================================
def limapcomenu(ccdname) '{
local items[] parname
local nl option
local tabSpc ; tabSpc = 5
local res
items["pixelRate"] = ""
items["pixelRateValidValues"] = ""
items["rollingShutter"] = ""
items["adc"] = ""
items["adcMax"] = ""
items["pixelRateAvailable"] = ""
option= 1
while (option) {
for (parname in items) {
if (parname=="pixelRateAvailable"){
items["pixelRateAvailable"]="LOW or HIGH"
}
else{
items[parname]= _limapar_get(ccdname, parname)
}
}
nl= _limamenu_printtitle(ccdname, "Configuration", "config")
tty_move(0, nl++, "Camera information:")
msg = _limapar_get(ccdname, "camera_model")
tty_move(tabSpc, nl++, msg)
nl++
tty_move(0, nl++, "(1) Configuration :")
if (_limapar_get(ccdname, "pixelRateValidValues")!="invalid"){
_limamenu_printitem(ccdname, "pixelRateValidValues", items["pixelRateValidValues"], nl++,11)
_limamenu_printitem(ccdname, "pixelRate", items["pixelRate"], nl++,-1)
_limamenu_printitem(ccdname, "", "pixel rate will be set in the NEXT arm!", nl++,-2)
}
else{
_limamenu_printitem(ccdname, "Pixel rate usable values", items["pixelRateAvailable"], nl++,11)
_limamenu_printitem(ccdname, "pixelRate", items["pixelRate"], nl++,-1)
}
_limamenu_printitem(ccdname, "rollingShutter", items["rollingShutter"], nl++,12)
if ( (_limapar_get(ccdname, "adcMax")!="invalid") && (_limapar_get(ccdname, "adc")!="invalid") ){
_limamenu_printitem(ccdname, "adcMax", items["adcMax"], nl++,13)
_limamenu_printitem(ccdname, "adc", items["adc"], nl++,-1)
}
nl++
option= getval("\n\n\tOption ---> ", 0)
printf("\n\n")
if(option==11){
if (_limapar_get(ccdname, "pixelRateValidValues")!="invalid"){
print LIMA_PARS_edge["pixelRateValidValues"]["desc"], "=", _limapar_get(ccdname, "pixelRateValidValues")
}
_limapar_ask(ccdname, "pixelRate",items["pixelRate"])
} else if(option==12){
_limapar_ask(ccdname, "rollingShutter",items["rollingShutter"])
p "Waiting for change the shutter (about 15s) ...."
sleep(3)
while( (s=_limapar_get(ccdname, "acq_status")) != "Ready"){ printf("+"); sleep(1);}
p
sleep(1)
for (parname in items) {
items[parname]= _limapar_get(ccdname, parname)
}
} else if(option==13){
TANGO_ERR=-1 ;
res = _limapar_get(ccdname,"adcMax" )
if(res !=-1){
print LIMA_PARS_edge["adcMax"]["desc"], "=", _limapar_get(ccdname, "adcMax")
_limapar_ask(ccdname, "adc",items["adc"])
}
}
}
}'
#=====================================================================
#=====================================================================
#%MACROS%
#%IMACROS%
#%TOC%
#%AUTHOR% E.Petitdemange