Exemplo n.º 1
0
 def agPosnErrorTest(self, gmode, severity):
     self.setTelDrive(gmode)
     if 'SV' in gmode:
         name = 'SV_Error'
     else:
         name = 'AG_Error'
     if 'PIR' in gmode or 'FMOS' in gmode:
         focalStation = 'P_IR'
         if 'PIR' in gmode:
             self.statusFromGen2['TSCV.AGPIRCCalc'] = 0x04
         elif 'FMOS' in gmode:
             self.statusFromGen2['TSCV.AGFMOSCCalc'] = 0x04
     else:
         focalStation = 'NS_OPT'
     for f in self.focusInfo.focusInfoIterator(focalStation):
         self.focalStationName = f['FOCAL_STATION']
         self.setFocStation(f)
         focalStation = FocalStation.FocalStation()
         focalStation.update(self.svConfig, self.statusFromGen2)
         adcFreeTest = ADCFreeTest.ADCFreePFTest()
         adcFreeTest.setUp()
         if focalStation.adcIsIn():
             adcFreeTest.setADCInDriveOnSync()
         else:
             adcFreeTest.setADCOut()
         self.statusFromGen2.update(adcFreeTest.statusFromGen2)
         self.setPosnError(gmode, name, severity)
         self.agPosnError.update(self.svConfig, self.statusFromGen2)
         break
Exemplo n.º 2
0
 def rotAngleLimitMuteWarningsNoLimitFlagTest(self,
                                              severity,
                                              focalStation=None):
     self.setOpState(True)
     self.setTelLimitFlag()
     self.setTelDrive('Tracking')
     for f in self.focusInfo.focusInfoIterator(focalStation):
         self.focalStationName = f['FOCAL_STATION']
         self.setFocStation(f)
         focalStation = FocalStation.FocalStation()
         focalStation.update(self.svConfig, self.statusFromGen2)
         adcFreeTest = ADCFreeTest.ADCFreePFTest()
         adcFreeTest.setUp()
         if focalStation.adcIsIn():
             adcFreeTest.setADCInDriveOnSync()
         else:
             adcFreeTest.setADCOut()
         self.statusFromGen2.update(adcFreeTest.statusFromGen2)
         if focalStation.rotIsIn():
             self.setAngle(self.cmdName,
                           self.getAngle(self.cmdName, severity['Cmd']))
             self.setAngle(self.actName,
                           self.getAngle(self.actName, severity['Act']))
             self.angleLimit.update(self.svConfig, self.statusFromGen2)
             break
Exemplo n.º 3
0
 def adcFreeAllOkTest(self, focalStation = None):
     self.setOpState(True)
     self.setTelDrive('Tracking')        
     for f in self.focusInfo.focusInfoIterator(focalStation):
         self.focalStationName = f['FOCAL_STATION']
         self.setFocStation(f)
         focalStation = FocalStation.FocalStation()
         focalStation.update(self.svConfig, self.statusFromGen2)
         if focalStation.adcIsIn():
             self.setADCInDriveOnSync()
             self.adcfree.update(self.svConfig, self.statusFromGen2)
             break
Exemplo n.º 4
0
 def warnTipTiltDriveOffTest(self):
     for f in self.focusInfo.focusInfoIterator():
         self.focalStationName = f['FOCAL_STATION']
         self.setFocStation(f)
         focalStation = FocalStation.FocalStation()
         focalStation.update(self.svConfig, self.statusFromGen2)
         if focalStation.m2IsIR():
             self.setTipTiltMode('Chopping')
             self.setChopStatus('Start')
             self.setDataAvailable(True)
             self.setDrive(False)
             self.tiptilt.update(self.svConfig, self.statusFromGen2)
             break
 def guideStarLostTest(self, focalStation=None):
     self.setPosnErrorAllOk()
     if 'P_IR' in focalStation:
         gmode = 'Guiding(AGPIR)'
     elif 'P_OPT2' in focalStation:
         gmode = 'Guiding(HSCSCAG)'
     else:
         gmode = 'Guiding(AG1)'
     self.setTelDrive(gmode)
     for f in self.focusInfo.focusInfoIterator(focalStation):
         self.setFocStation(f)
         focalStation = FocalStation.FocalStation()
         focalStation.update(self.svConfig, self.statusFromGen2)
         adcFreeTest = ADCFreeTest.ADCFreePFTest()
         adcFreeTest.setUp()
         if focalStation.adcIsIn():
             adcFreeTest.setADCInDriveOnSync()
         else:
             adcFreeTest.setADCOut()
         self.statusFromGen2.update(adcFreeTest.statusFromGen2)
         if f['STATL.TSC_F_SELECT'] == 'P_IR':
             gmode = 'Guiding(AGPIR)'
             Gen2Alias = self.svConfig.configID[self.getGuideStarID(
                 'PIR AG for SH Star Detect Start')].Gen2Alias
             self.statusFromGen2[Gen2Alias] = 0x04
             self.setIntensity('PIR AG for SH Star Posn Intensity',
                               'Critical')
             self.guidestar.update(self.svConfig, self.statusFromGen2)
         elif f['STATL.TSC_F_SELECT'] == 'P_OPT2':
             gmode = 'Guiding(HSCSCAG)'
             Gen2Alias = self.svConfig.configID[self.getGuideStarID(
                 'HSC AG for SC Star Detect Start')].Gen2Alias
             self.statusFromGen2[Gen2Alias] = 0x04
             self.setIntensity('HSC AG for SC Star Posn Intensity',
                               'Critical')
             self.guidestar.update(self.svConfig, self.statusFromGen2)
         else:
             if 'SV' in gmode:
                 gmode = 'Guiding(SV1)'
                 self.setIntensity('SV Star Position1 Intensity on SV',
                                   'Critical')
             else:
                 gmode = 'Guiding(AG1)'
                 self.setIntensity('AG Star Position1 Intensity on AG',
                                   'Critical')
         self.setTelDrive(gmode)
         break
Exemplo n.º 6
0
    def agPosnErrorAllOkTest(self):
        for f in self.focusInfo.focusInfoIterator('NS_OPT'):
            self.focalStationName = f['FOCAL_STATION']
            self.setFocStation(f)
            focalStation = FocalStation.FocalStation()
            focalStation.update(self.svConfig, self.statusFromGen2)
            adcFreeTest = ADCFreeTest.ADCFreePFTest()
            adcFreeTest.setUp()
            if focalStation.adcIsIn():
                adcFreeTest.setADCInDriveOnSync()
            else:
                adcFreeTest.setADCOut()
            self.statusFromGen2.update(adcFreeTest.statusFromGen2)
            break

        self.setPosnErrorAllOk()
        self.setIntensityAllOk()
        self.agPosnError.update(self.svConfig, self.statusFromGen2)
Exemplo n.º 7
0
 def paCmdTest(self, focalStation=None):
     self.setOpState(True)
     self.setTelDrive('Tracking')
     for f in self.focusInfo.focusInfoIterator(focalStation):
         self.setFocStation(f)
         focalStation = FocalStation.FocalStation()
         focalStation.update(self.svConfig, self.statusFromGen2)
         adcFreeTest = ADCFreeTest.ADCFreePFTest()
         adcFreeTest.setUp()
         if focalStation.adcIsIn():
             adcFreeTest.setADCInDriveOnSync()
         else:
             adcFreeTest.setADCOut()
         self.statusFromGen2.update(adcFreeTest.statusFromGen2)
         if focalStation.rotIsIn():
             self.setAngle('rot', 0)
             self.setAngle('rotCmd', self.getAngle())
             self.pacmd.update(self.svConfig, self.statusFromGen2)
             break