Bases: KPFFunction
Set the Laser Frequency Comb (LFC) to "StandbyHigh" mode. This is the
mode which should be set after operation of the LFC for science is complete.
KTL Keywords Used:
kpfcal.OPERATIONMODE
kpfmon.HB_MENLOSTA
kpfmon.LFCREADYSTA
Source code in kpf/calbench/SetLFCtoStandbyHigh.py
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 | class SetLFCtoStandbyHigh(KPFFunction):
'''Set the Laser Frequency Comb (LFC) to "StandbyHigh" mode. This is the
mode which should be set after operation of the LFC for science is complete.
KTL Keywords Used:
- `kpfcal.OPERATIONMODE`
- `kpfmon.HB_MENLOSTA`
- `kpfmon.LFCREADYSTA`
'''
@classmethod
def pre_condition(cls, args):
heartbeat = ktl.cache('kpfmon', 'HB_MENLOSTA')
success = heartbeat.waitFor('== "OK"', timeout=3)
if success is False:
raise FailedPreCondition(f"Menlo heartbeat is not OK: {heartbeat.read()}")
lfc_mode = ktl.cache('kpfcal', 'OPERATIONMODE').read()
if lfc_mode not in ['AstroComb', 'StandbyHigh']:
raise FailedPreCondition(f"LFC must be in AstroComb: {lfc_mode}")
@classmethod
def perform(cls, args):
lfc_mode = ktl.cache('kpfcal', 'OPERATIONMODE')
log.info('Setting LFC to StandbyHigh')
lfc_mode.write('StandbyHigh')
time_shim = cfg.getfloat('times', 'LFC_shim_time', fallback=10)
time.sleep(time_shim)
@classmethod
def post_condition(cls, args):
pass
|