TurnHepaOff

Bases: KPFTranslatorFunction

Turn HEPA Filter system off

KTL Keywords Used:

  • ao.OBHPAON
  • ao.OBHPASTA
Source code in kpf/ao/TurnHepaOff.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
class TurnHepaOff(KPFTranslatorFunction):
    '''Turn HEPA Filter system off

    KTL Keywords Used:

    - `ao.OBHPAON`
    - `ao.OBHPASTA`
    '''
    @classmethod
    def pre_condition(cls, args, logger, cfg):
        pass

    @classmethod
    def perform(cls, args, logger, cfg):
        ao = ktl.cache('ao')
        log.debug('Setting AO HEPA filter to off')
        ao['OBHPAON'].write(0)

    @classmethod
    def post_condition(cls, args, logger, cfg):
        success = ktl.waitfor('($ao.OBHPASTA == off)', timeout=3)
        if success is not True:
            ao = ktl.cache('ao')
            raise FailedToReachDestination(ao['OBHPASTA'].read(), 'off')