Bases: KPFFunction
ACAM should be set to NGS focus. LGS focus will not work for KPF.
KTL Keywords Used:
ao.OBASNAME
ao.OBASSLEW
ao.OBASSTST
Source code in kpf/ao/SetAFStoNGS.py
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 | class SetAFStoNGS(KPFFunction):
'''ACAM should be set to NGS focus. LGS focus will not work for KPF.
KTL Keywords Used:
- `ao.OBASNAME`
- `ao.OBASSLEW`
- `ao.OBASSTST`
'''
@classmethod
def pre_condition(cls, args):
pass
@classmethod
def perform(cls, args):
OBASNAME = ktl.cache('ao', 'OBASNAME')
OBASSLEW = ktl.cache('ao', 'OBASSLEW')
log.debug(f"Setting AFS to NGS")
OBASNAME.write('ngs')
OBASSLEW.write('1')
@classmethod
def post_condition(cls, args):
expr = f'($ao.OBASSTST == INPOS) and ($ao.OBASNAME == ngs)'
aoamstst_success = ktl.waitfor(expr, timeout=60)
if not aoamstst_success:
OBASNAME = ktl.cache('ao', 'OBASNAME')
raise FailedToReachDestination(OBASNAME.read(), 'ngs')
|