WaitForND

Bases: KPFTranslatorFunction

Wait for both ND filter wheels.

Parameters:
  • CalND1 (str) –

    The neutral density filter to put in the first filter wheel. This affects both the simultaneous calibration light and light which can be routed through the FIU to the science and sky fibers. Allowed Values: OD 0.1, OD 1.0, OD 1.3, OD 2.0, OD 3.0, OD 4.0

  • CalND2 (str) –

    The neutral density filter to put in the first filter wheel. This affects only the light injected in to the simultaneous calibration fiber. Allowed Values: OD 0.1, OD 0.3, OD 0.5, OD 0.8, OD 1.0, OD 4.0

Scripts Called:

  • kpf.calbench.WaitForND1
  • kpf.calbench.WaitForND2
Source code in kpf/calbench/WaitForND.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
41
42
43
44
45
46
47
48
49
50
class WaitForND(KPFTranslatorFunction):
    '''Wait for both ND filter wheels.

    Args:
        CalND1 (str): The neutral density filter to put in the first filter
            wheel. This affects both the simultaneous calibration light and
            light which can be routed through the FIU to the science and sky
            fibers. Allowed Values: `OD 0.1`, `OD 1.0`, `OD 1.3`, `OD 2.0`,
            `OD 3.0`, `OD 4.0`
        CalND2 (str): The neutral density filter to put in the first filter
            wheel. This affects only the light injected in to the simultaneous
            calibration fiber. Allowed Values: `OD 0.1`, `OD 0.3`, `OD 0.5`,
            `OD 0.8`, `OD 1.0`, `OD 4.0`

    Scripts Called:

    - `kpf.calbench.WaitForND1`
    - `kpf.calbench.WaitForND2`
    '''
    @classmethod
    def pre_condition(cls, args, logger, cfg):
        pass

    @classmethod
    def perform(cls, args, logger, cfg):
        WaitForND1.execute(args)
        WaitForND2.execute(args)

    @classmethod
    def post_condition(cls, args, logger, cfg):
        pass

    @classmethod
    def add_cmdline_args(cls, parser, cfg=None):
        parser.add_argument('CalND1', type=str,
                            choices=["OD 0.1", "OD 1.0", "OD 1.3", "OD 2.0",
                                     "OD 3.0", "OD 4.0"],
                            help='ND1 Filter to use.')
        parser.add_argument('CalND2', type=str,
                            help='ND2 Filter to use.')
        return super().add_cmdline_args(parser, cfg)