-
Notifications
You must be signed in to change notification settings - Fork 0
/
catcher_v1.init
190 lines (174 loc) · 6.57 KB
/
catcher_v1.init
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
;*************************************************************************
; Copyright (c) 2002 The University of Chicago, as Operator of Argonne
; National Laboratory.
; Copyright (c) 2002 The Regents of the University of California, as
; Operator of Los Alamos National Laboratory.
; This file is distributed subject to a Software License Agreement found
; in the file LICENSE that is included with this distribution.
;*************************************************************************
; catcher_v1.init (R3.2)
widget_ids = { $
base : MAIN13_1, $
menubar_base: BASE68, $
menusetup_base: SETUPOPTIONSMENU, $
menuplot_base: PLOTOPTIONSMENU, $
file : PDMENU127, $
binary_type : BINARY_TYPE, $
trashcan : CATCHER_FILE, $
viewdata : PDMENU_VDATA, $
savelabel : SAVE_LABEL, $
pv_stat : FIELD141, $
rept_base : BASE140, $
axis_base : BASE144, $
wf_select : BGROUP145, $
plot_wid : DRAW61, $
plot_area : DRAW61_Id, $
summary_base: 0L, $
terminal : 0L, $
statistic : 0L $
}
if n_elements(w_plotspec_id) eq 0 then $
w_plotspec_id = { $
color : 1, $ ; 0 no color curve, 1 color curve
type: 0, $
solid: 1, $ ; 1 solid line only
log: 0, $ ; 0 - linear, 1 - log, 2 - linear, y>0
grid: 0, $
mode: 1, $ ; default is viewing mode
goto_pv: ['','','',''], $
x_axis_u : 0, $
autosave: 0, $
scan: 0,$
errbars: 0, $
opened: 0, $
realtime: 1, $
itime: 1, $
dtime: 0.2, $
xcord: 0, $
seqno: 0, $
statistic: 0, $
xticklen: 0.04, $
yticklen: 0.02, $
gridstyle: 0, $
colorV: make_array(19,/LONG), $
colorI: make_array(19,/LONG,value=!d.n_colors-2) $
}
; device,bypass_translation=0
; plotoption_setcolor ; init color index array
; loadct,39
colorI = lonarr(19)
getLineColors,colorI,v=colorV
w_plotspec_id.colorI = colorI
w_plotspec_id.colorV = colorV
scanData = { $
XDR : 1, $ ; 0 - native binary, 1 - in xdr binary
debug : 0, $ ; 0 normal runing mode, 1 debug mode
option : 0, $ ; 0 ->view mode only, 1 ->scan/view both allowed
viewonly:0, $
nosave: 0, $ ; 0 autosave on, 1 no automatic save used by command line
version : 'CATCHER_V1', $
release : '(R3.0)', $
new : 0, $ 1 - sscan 5.19, 70 detectors
zoom :0, $ 1 - zoom box/in/out
DI : strarr(15), $
dataversion : '', $ new field in R1.5.5.0
pv : '', $
pvconfig : '', $
pvwait : '', $
pvbusy : '', $
pvfound : -1, $ indicator for pv found or not found
num_pos : 4, $ max no of pos allowed
num_det : 15, $ max no of detectors allowed
home : '', $
envfile : 'catch1d.env', $
maxenv : 500, $
config : 'catch1d.config', $
path : '', $
trashcan : 'catch1d.trashcan.xdr', $
fileinuse : '', $ if -n option is used, set to trashcan
filelock : '', $
pid : 0, $ 0 - write allowed, 1 - file locked, 2 - no write allowed
code : 'G', $
format : '18.8', $
req_npts : 100, $
act_npts : 0, $
readin_npts : 0, $
eof2d : 0, $ ; 0-at each line scan, 1-at the end of 2D scan
im_eof : 0L, $ ; image file length
p_def : [0,0,0,0], $ ; id_def for positioner
px : FLTARR(4000), $
pa : Make_array(4000,4,/double), $
da : FLTARR(4000,15), $
voigt : make_array(11,15,/double), $
lastPlot : -1, $ ; <0 not plot data, 0 userscale, 1 autoscale
scanno : 0, $ ; current plot no
startno : 0, $ ; start no when catch1d is brought up
refno : 0, $ ; environments ref no saved in data
showlist : 0, $ ; list life scan data ?
readpv : 0, $ ; if 1 read from scan_pvnames
pvfile : 'scan_pvnames', $ ; list of monitor pvnames
nonames : 0, $
plotspec : w_plotspec_id, $
realtime : 0, $ ; realtime scan monitor indicator
; add 2D scan parameters here
scanno_2d : 0, $ ; current 2D scan no
y_handshake : '', $ ; 2d handshake pvname
image : 1, $ ; default 60x60 image
image_width : 60, $
image_height : 60, $
y_pv : '', $
x_desc : '', $ ; scan 3.13
y_desc : '', $ ; scan 3.13
y_array : make_array(2001), $ ; scan 3.13
y_scan : 0, $ ; if 1 2D scan is goring on
y_value : 0., $ ; y value for 2D scan
y_req_npts : 1, $
y_act_npts : 0, $
x_dpt : make_array(15,/INT,value=1), $ ; data dim for X detectors
y_dpt : make_array(15,/INT,value=1), $ ; data dim for Y detectors
x_dtype : make_array(15,/INT,value=4), $ ; float for X detectors
y_dtype : make_array(15,/INT,value=4), $ ; float for Y detectors
y_cur_pt : 0, $ ; y index no from IOC
y_seqno : 0 $ ; y dim scan seqno
}
WIDGET_CONTROL, widget_ids.wf_select, SET_VALUE = [1,1,0,0]
; WIDGET_CONTROL, widget_ids.y_max, SET_VALUE = 100
; WIDGET_CONTROL, widget_ids.y_min, SET_VALUE = 0
; WIDGET_CONTROL, widget_ids.x_max, SET_VALUE = 100
; WIDGET_CONTROL, widget_ids.x_min, SET_VALUE = 0
; init w_plotspec
if n_elements(w_plotspec_array) eq 0 then $
w_plotspec_saved = make_array(6,/string,value=string(replicate(32b,60)))
if n_elements(w_plotspec_array) eq 0 then $
w_plotspec_array = make_array(6,/string,value=string(replicate(32b,60)))
w_plotspec_array(3) = 'catch1d.trashcan.xdr'
if n_elements(w_plotspec_limits) eq 0 then $
w_plotspec_limits = make_array(4,/float)
w_plotspec_limits = [0., 100., 0., 100.]
; init w_viewscan
if n_elements(w_viewscan_id) eq 0 then $
w_viewscan_id = { $
file: '', $
type: 0, $
unit: 0, $
seqno: 0, $
maxno: 0, $
size: 0L, $
fptr: make_array(10000,/long) $
}
; realtime init
if n_elements(realtime_id) eq 0 then $
realtime_id = { $
ind : 0, $
no : 0, $
mpts : 0, $
def : make_array(19,/int), $ ; 1 PV defined, 2 time defined
axis : 0, $
xsetup : make_array(6,/double), $ ; P1SP,P1EP,P1CV,P1SM,P1AR,P1PP
xmin : 0., $
xmax : 0., $
ymin : 0., $
ymax : 0. $
}
capendio,time=3., list_time=5.
capendevent,time=0.001