Bases: KPFFunction
Set the simultaneous calibration source based on the
kpfconfig.SIMULCALSOURCE keyword.
KTL Keywords Used:
kpfconfig.SIMULCALSOURCE
kpfcal.OCTAGON
Functions Called:
kpf.calbench.SetCalSource
Source code in kpf/calbench/SetSimulCalSource.py
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 | class SetSimulCalSource(KPFFunction):
'''Set the simultaneous calibration source based on the
kpfconfig.SIMULCALSOURCE keyword.
KTL Keywords Used:
- `kpfconfig.SIMULCALSOURCE`
- `kpfcal.OCTAGON`
Functions Called:
- `kpf.calbench.SetCalSource`
'''
@classmethod
def pre_condition(cls, args):
pass
@classmethod
def perform(cls, args):
calsource = ktl.cache('kpfconfig', 'SIMULCALSOURCE').read()
octagon = ktl.cache('kpfcal', 'OCTAGON').read()
log.debug(f"Current OCTAGON = {octagon}, desired = {calsource}")
if octagon != calsource:
log.info(f"Set CalSource/Octagon: {calsource}")
SetCalSource.execute({'CalSource': calsource, 'wait': False})
@classmethod
def post_condition(cls, args):
pass
|