Bases: KPFFunction
Turn K1 AO light source off
KTL Keywords Used:
Source code in kpf/ao/TurnLightSourceOff.py
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 | class TurnLightSourceOff(KPFFunction):
'''Turn K1 AO light source off
KTL Keywords Used:
- `ao.OBSWON`
- `ao.OBSWSTA`
'''
@classmethod
def pre_condition(cls, args):
pass
@classmethod
def perform(cls, args):
OBSWON = ktl.cache('ao', 'OBSWON')
log.debug('Turning AO light source off')
OBSWON.write(0)
@classmethod
def post_condition(cls, args):
OBSWSTA = ktl.cache('ao', 'OBSWSTA')
if OBSWSTA.waitfor('== "off"', timeout=3) is not True:
raise FailedToReachDestination(OBSWSTA.read(), 'off')
|