-
Notifications
You must be signed in to change notification settings - Fork 0
/
enu.py
223 lines (216 loc) · 13.7 KB
/
enu.py
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
KeysDictionary('enu', (3, 1),
Key("controllers", String(help='controllers list') * (1, None)),
Key('text', String(help='text for humans')),
Key('version', String(help='EUPS/git version')),
Key('metaFSM',
Enum('OFF', 'LOADED', 'ONLINE', name='state'),
Enum('IDLE', 'LOADING', 'INITIALISING', 'MOVING', 'EXPOSING', 'OPENRED', 'OPENBLUE', 'BIA', 'BUSY',
'SWITCHING', 'WARMING', 'FAILED', name='substate'), help='meta state machine'),
Key('slitFSM',
Enum('OFF', 'LOADED', 'ONLINE', name='state',
FITS=('W_ENFCAS', 'ENU_FCA_STATE')),
Enum('IDLE', 'LOADING', 'INITIALISING', 'MOVING', 'FAILED', name='substate',
FITS=('W_ENFCAT', 'ENU_FCA_SUBSTATE')),
help='slit state machine'),
Key('slitMode', Enum('operation', 'simulation', help='fca operation mode',
FITS=('W_ENFCAM', 'ENU_FCA_MODE'))),
Key('slit',
Float(name='X', invalid="NaN", units="mm", FITS=('W_ENFCAX', 'ENU_FCA_FOCUS')),
Float(name='Y', invalid="NaN", units="mm", FITS=('W_ENFCAY', 'ENU_FCA_SHIFT')),
Float(name='Z', invalid="NaN", units="mm", FITS=('W_ENFCAZ', 'ENU_FCA_DITHER')),
Float(name='U', invalid="NaN", units="deg", FITS=('W_ENFCAU', 'ENU_FCA_ROLL')),
Float(name='V', invalid="NaN", units="deg", FITS=('W_ENFCAV', 'ENU_FCA_PITCH')),
Float(name='W', invalid="NaN", units="deg", FITS=('W_ENFCAW', 'ENU_FCA_YAW')),
help='slit current position'),
Key('slitWork',
Float(name='X', help='x_coordinate', units="mm"),
Float(name='Y', help='y_coordinate', units="mm"),
Float(name='Z', help='z_coordinate', units="mm"),
Float(name='U', help='u_coordinate', units="deg"),
Float(name='V', help='v_coordinate', units="deg"),
Float(name='W', help='W_coordinate', units="deg"),
help='slit work coordinate system'),
Key('slitTool',
Float(name='X', help='x_coordinate', units="mm"),
Float(name='Y', help='y_coordinate', units="mm"),
Float(name='Z', help='z_coordinate', units="mm"),
Float(name='U', help='u_coordinate', units="deg"),
Float(name='V', help='v_coordinate', units="deg"),
Float(name='W', help='W_coordinate', units="deg"),
help='slit tool coordinate system'),
Key('hxpStatus',
Int(name='code', help='status code'),
String(name='msg', help='Hexapod controller status')),
Key('slitLocation', Enum('home', 'undef', name='location', help='FCA location',
FITS=('W_ENFCAL', 'ENU_FCA_LOCATION'))),
Key('biashaFSM',
Enum('OFF', 'LOADED', 'ONLINE', name='state',
FITS=('W_ENBSHS', 'ENU_BIASHA_STATE')),
Enum('IDLE', 'LOADING', 'INITIALISING', 'FAILED', 'BUSY', 'EXPOSING', 'OPENRED', 'OPENBLUE', 'BIA',
name='substate',
FITS=('W_ENBSHT', 'ENU_BIASHA_SUBSTATE')),
help='biasha state machine'),
Key('biashaMode', Enum('operation', 'simulation', help='biasha operation mode',
FITS=('W_ENBSHM', 'ENU_BIASHA_MODE'))),
Key('shutters', Enum('close', 'open', 'openred', 'openblue', 'undef', name='position',
help='shutters current position',
FITS=('W_ENSHUT', 'ENU_SHUTTERS_POSITION'))),
Key('shb',
Bool('0', '1', name='open', help='blue shutter open bit'),
Bool('0', '1', name='close', help='blue shutter close bit'),
Bool('0', '1', name='error', help='blue shutter error bit')),
Key('shr',
Bool('0', '1', name='open', help='blue shutter open bit'),
Bool('0', '1', name='close', help='blue shutter close bit'),
Bool('0', '1', name='error', help='blue shutter error bit')),
Key('exptime', Float(help='exposure time in seconds')),
Key('transientTime', Float(help='shutters transition time in seconds')),
Key('integratingTime', Float(help='Shutter opening duration')),
Key('elapsedTime', Float(help='Seconds since shutters opening')),
Key('dateobs', String(help='absolute exposure start UTC time ISO formatted')),
Key('bia', Enum('off', 'on', 'undef', name='state', help='bia current state',
FITS=('W_ENBIAS', 'ENU_BIA_STATE'))),
Key('biaConfig',
Bool('0', '1', name='state', help='strobe enabled'),
Int(name='period', units='ms', help='bia strobe period'),
Int(name='duty', help='duty cycle(0-255)')),
Key('photores',
Int(help='bia photo resistance 1'),
Int(help='bia photo resistance 2')),
Key('rexmFSM',
Enum('OFF', 'LOADED', 'ONLINE', name='state',
FITS=('W_ENRDAS', 'ENU_RDA_STATE')),
Enum('IDLE', 'LOADING', 'INITIALISING', 'MOVING', 'FAILED', name='substate',
FITS=('W_ENRDAT', 'ENU_RDA_SUBSTATE')),
help='rexm state machine'),
Key('rexmMode', Enum('operation', 'simulation', help='rda operation mode',
FITS=('W_ENRDAM', 'ENU_RDA_MODE'))),
Key('rexm',
Enum('low', 'med', 'undef', 'error', name='position', help='rexm current position',
FITS=('W_ENRDAP', 'ENU_RDA_POSITION'))),
Key('rexmInfo',
UInt(name='switchA', help='switch A state'),
UInt(name='switchB', help='switch B state'),
Int(name='speed', units='steps/s', help='motor speed step/sec'),
Int(name='steps', units='steps', help='step count from origin')),
Key('rexmConfig',
Int(name='usrs', help='ustep-resolution (microsteps per fullstep)'),
Int(name='pulseDiv', help='divider for the velocity')),
Key('tempsFSM',
Enum('OFF', 'LOADED', 'ONLINE', name='state',
FITS=('W_ENTMPS', 'ENU_TMP_STATE')),
Enum('IDLE', 'LOADING', 'INITIALISING', 'FAILED', name='substate',
FITS=('W_ENTMPT', 'ENU_TMP_SUBSTATE')),
help='rexm state machine'),
Key('tempsMode', Enum('operation', 'simulation', help='temps operation mode',
FITS=('W_ENTMPM', 'ENU_TMP_MODE'))),
Key("temps1",
Float(name='val1_0', invalid="NaN", units="C", FITS=('W_ETMP1', 'MOTOR_RDA')),
Float(name='val1_1', invalid="NaN", units="C", FITS=('W_ETMP2', 'MOTOR_SHUTTER_B')),
Float(name='val1_2', invalid="NaN", units="C", FITS=('W_ETMP3', 'MOTOR_SHUTTER_R')),
Float(name='val1_3', invalid="NaN", units="C", FITS=('W_ETMP4', 'BIA_BOX_UPPER')),
Float(name='val1_4', invalid="NaN", units="C", FITS=('W_ETMP5', 'BIA_BOX_LOWER')),
Float(name='val1_5', invalid="NaN", units="C", FITS=('W_ETMP6', 'FIBER_UNIT_BENCH_LEVEL')),
Float(name='val1_6', invalid="NaN", units="C", FITS=('W_ETMP7', 'FIBER_UNIT_HEXAPOD_TOP')),
Float(name='val1_7', invalid="NaN", units="C", FITS=('W_ETMP8', 'FIBER_UNIT_FIBER_FRAME_TOP')),
Float(name='val1_8', invalid="NaN", units="C", FITS=('W_ETMP9', 'COLLIMATOR_FRAME_BENCH_LEVEL')),
Float(name='val1_9', invalid="NaN", units="C", FITS=('W_ETMP10', 'COLLIMATOR_FRAME_TOP')),
help="Bench Temperatures stage1"),
Key("temps2",
Float(name='val1_0', invalid="NaN", units="C", FITS=('W_ETMP11', 'BENCH_LEFT_TOP')),
Float(name='val1_1', invalid="NaN", units="C", FITS=('W_ETMP12', 'BENCH_LEFT_BOTTOM')),
Float(name='val1_2', invalid="NaN", units="C", FITS=('W_ETMP13', 'BENCH_RIGHT_TOP')),
Float(name='val1_3', invalid="NaN", units="C", FITS=('W_ETMP14', 'BENCH_RIGHT_BOTTOM')),
Float(name='val1_4', invalid="NaN", units="C", FITS=('W_ETMP15', 'BENCH_FAR_TOP')),
Float(name='val1_5', invalid="NaN", units="C", FITS=('W_ETMP16', 'BENCH_FAR_BOTTOM')),
Float(name='val1_6', invalid="NaN", units="C", FITS=('W_ETMP17', 'BENCH_NEAR_TOP')),
Float(name='val1_7', invalid="NaN", units="C", FITS=('W_ETMP18', 'BENCH_NEAR_BOTTOM')),
Float(name='val1_8', invalid="NaN", units="C", FITS=('W_ETMP19', 'BENCH_CENTRAL_BOTTOM')),
Float(name='val1_9', invalid="NaN", units="C", FITS=('W_ETMP20', 'ENU_TEMP_20')),
help="Bench Temperatures stage2"),
Key('res1', Float(invalid='NaN', units='ohm') * 10, ),
Key('res2', Float(invalid='NaN', units='ohm') * 10, ),
Key('tempsVersion',
String(help='software version of the SCPI (Standard Commands for Programmable Instruments)')),
Key('tempsSlot1',
String(name='company', help='Company name'),
String(name='modelNumber', help='Card model number'),
Int(name='serialNumber', help='Serial Number'),
Float(name='firmware', help='Firmware rev'),
help='temperature plug-in module slot 1'),
Key('tempsSlot2',
String(name='company', help='Company name'),
String(name='modelNumber', help='Card model number'),
Int(name='serialNumber', help='Serial Number'),
Float(name='firmware', help='Firmware rev'),
help='temperature plug-in module slot 2'),
Key('tempsStatus',
Int(name='code', help='status code'),
String(name='msg', help='Keysight controller status')),
Key('pduFSM',
Enum('OFF', 'LOADED', 'ONLINE', name='state',
FITS=('W_ENPDUS', 'ENU_PDU_STATE')),
Enum('IDLE', 'LOADING', 'INITIALISING', 'SWITCHING', 'FAILED', name='substate',
FITS=('W_ENPDUT', 'ENU_PDU_SUBSTATE')),
help='pdu state machine'),
Key('pduMode', Enum('operation', 'simulation', help='pdu operation mode',
FITS=('W_ENPDUM', 'ENU_PDU_MODE'))),
Key("pduPort1",
String(name="name"),
String(name="state"),
Float(name="volts", units="V"),
Float(name="amps", units="A"),
Float(name="watts", units="W")),
Key("pduPort2",
String(name="name"),
String(name="state"),
Float(name="volts", units="V"),
Float(name="amps", units="A"),
Float(name="watts", units="W")),
Key("pduPort3",
String(name="name"),
String(name="state"),
Float(name="volts", units="V"),
Float(name="amps", units="A"),
Float(name="watts", units="W")),
Key("pduPort4",
String(name="name"),
String(name="state"),
Float(name="volts", units="V"),
Float(name="amps", units="A"),
Float(name="watts", units="W")),
Key("pduPort5",
String(name="name"),
String(name="state"),
Float(name="volts", units="V"),
Float(name="amps", units="A"),
Float(name="watts", units="W")),
Key("pduPort6",
String(name="name"),
String(name="state"),
Float(name="volts", units="V"),
Float(name="amps", units="A"),
Float(name="watts", units="W")),
Key("pduPort7",
String(name="name"),
String(name="state"),
Float(name="volts", units="V"),
Float(name="amps", units="A"),
Float(name="watts", units="W")),
Key("pduPort8",
String(name="name"),
String(name="state"),
Float(name="volts", units="V"),
Float(name="amps", units="A"),
Float(name="watts", units="W")),
Key('iisFSM',
Enum('OFF', 'LOADED', 'ONLINE', name='state',
FITS=('W_ENIISS', 'ENU_IIS_STATE')),
Enum('IDLE', 'LOADING', 'INITIALISING', 'WARMING', 'FAILED', name='substate',
FITS=('W_ENIIST', 'ENU_IIS_SUBSTATE')),
help='iis state machine'),
Key('iisMode', Enum('operation', 'simulation', help='iis operation mode',
FITS=('W_ENIISM', 'ENU_IIS_MODE'))),
Key('hgar', Bool('off', 'on', name='state', help='Internal Illumination Sources mercury-argon lamp state',
FITS=('W_ENHGAR', 'ENU_IIS_HGAR'))),
)