# $Header: https://oberon.oapd.inaf.it/shins/trunk/shins/src/scripts/templates/tpl/SHARKNIR_lss_mon_SpectraResolution.py 3952 2022-05-19 08:30:53Z depa $

from shinsapp import SHINSApp
from util.shinsLogger import logger
from util import variables as uvars
from util import exception

from SHARKNIR_gen_base import SHARKNIR_gen_base

import SHARKNIR_gen_obs as genObs

class SHARKNIR_lss_mon_SpectraResolution(SHINSApp):
    
    @exception.handler_for_run
    def run(self, ins_s=None, det_s=None, tel_s=None, rtc_s=None, **kwargs):

        logger.info(__name__)
        obsController = self.obsController
        self.status = uvars.EXIT_SUCCESS

        self.gen_base = SHARKNIR_gen_base();        gen_base = self.gen_base

        nreads = det_s["NREADS"]
        
        ########################################
        # Setup + image with custom parameters #
        ########################################
        
        gen_base.main(ins_s=ins_s, det_s=det_s)
        
        ###########################
        # Switching off all lamps #
        #######=###################

        ins_s["CAL_FF_LAMP"] = "OFF"

        gen_base.main(ins_s=ins_s, det_s=det_s)
