Bases: KPFTranslatorFunction
Lock the FIU mechanisms
Parameters: |
-
comment
(str )
–
A comment (must not be empty) designating why the
mechanisms are locked.
|
KTL Keywords Used:
kpffiu.ADC1LCK
kpffiu.ADC2LCK
kpffiu.FOLDLCK
kpffiu.HKXLCK
kpffiu.HKYLCK
kpffiu.TTXLCK
kpffiu.TTYLCK
Source code in kpf/fiu/LockFIU.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49 | class LockFIU(KPFTranslatorFunction):
'''Lock the FIU mechanisms
Args:
comment (str): A comment (must not be empty) designating why the
mechanisms are locked.
KTL Keywords Used:
- `kpffiu.ADC1LCK`
- `kpffiu.ADC2LCK`
- `kpffiu.FOLDLCK`
- `kpffiu.HKXLCK`
- `kpffiu.HKYLCK`
- `kpffiu.TTXLCK`
- `kpffiu.TTYLCK`
'''
@classmethod
def pre_condition(cls, args, logger, cfg):
pass
@classmethod
def perform(cls, args, logger, cfg):
comment = args.get('comment', 'locked').strip()
kpffiu = ktl.cache('kpffiu')
kpffiu['adc1lck'].write(comment)
kpffiu['adc2lck'].write(comment)
kpffiu['foldlck'].write(comment)
kpffiu['hkxlck'].write(comment)
kpffiu['hkylck'].write(comment)
kpffiu['ttxlck'].write(comment)
kpffiu['ttylck'].write(comment)
@classmethod
def post_condition(cls, args, logger, cfg):
pass
@classmethod
def add_cmdline_args(cls, parser, cfg=None):
parser.add_argument('comment', type=str,
help='Comment for lock keywords')
return super().add_cmdline_args(parser, cfg)
|