Bases: KPFFunction
Start the tip tilt control loop. This uses the ALL_LOOPS keyword to
start all functions including DAR (via DAR_ENABLE), tip tilt calculations
(via TIPTILT_CALC), tip tilt control (via TIPTILT_CONTROL), offloading to
the telescope (via OFFLOAD_DCS and OFFLOAD).
KTL Keywords Used:
kpffiu.TTXSRV
kpffiu.TTYSRV
kpfguide.DAR_ENABLE
kpfguide.ALL_LOOPS
Source code in kpf/fiu/StartTipTilt.py
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 | class StartTipTilt(KPFFunction):
'''Start the tip tilt control loop. This uses the ALL_LOOPS keyword to
start all functions including DAR (via DAR_ENABLE), tip tilt calculations
(via TIPTILT_CALC), tip tilt control (via TIPTILT_CONTROL), offloading to
the telescope (via OFFLOAD_DCS and OFFLOAD).
KTL Keywords Used:
- `kpffiu.TTXSRV`
- `kpffiu.TTYSRV`
- `kpfguide.DAR_ENABLE`
- `kpfguide.ALL_LOOPS`
'''
@classmethod
def pre_condition(cls, args):
pass
@classmethod
def perform(cls, args):
expr = "($kpffiu.TTXSRV == 'Closed') and ($kpffiu.TTYSRV == 'Closed')"
servo_loops_closed = ktl.waitFor(expr, timeout=0.5)
if not servo_loops_closed:
kpffiu = ktl.cache('kpffiu')
log.info('Closing servo loops')
kpffiu['TTXSRV'].write('Closed')
kpffiu['TTYSRV'].write('Closed')
movetime = cfg.getfloat('times', 'tip_tilt_move_time', fallback=0.1)
time.sleep(10*movetime)
kpfguide = ktl.cache('kpfguide')
log.info('Turning kpfguide.ALL_LOOPS on')
kpfguide['ALL_LOOPS'].write('Active')
@classmethod
def post_condition(cls, args):
pass
|