Exemple #1
0
    def main(self):
        if sustype in ['TypeA', 'TypeB', 'TypeBp']:  # by Miyo
            for suffix in ['P', 'T']:
                fec = cdslib.ezca_get_dcuid('K1VIS' + OPTIC + suffix)
                sdflib.restore(fec, 'misaligned')
        else:
            fec = cdslib.ezca_get_dcuid('K1VIS' + OPTIC)
            sdflib.restore(fec, 'misaligned')

        kagralib.speak_aloud('%s is misaligned' % (OPTIC))
Exemple #2
0
 def main(self):
     log('Turning off all the filters')
     self.counter = 1
     self.timer['waiting'] = 0
     self.TRAMP = 10
     # by Miyo
     if OPTIC != 'PRM':
         fec = cdslib.ezca_get_dcuid('K1VIS' + OPTIC)
         sdflib.restore(fec, 'safe')
     else:
         for PART in ['P', 'T']:
             fec = cdslib.ezca_get_dcuid('K1VIS' + OPTIC + PART)
             sdflib.restore(fec, 'safe')
Exemple #3
0
    def main(self):

        global visObj
        global state
        state = 'TOWER'
        notify('In SAFE dayo!')
        for suffix in ['P', 'T']:  # by Miyo
            fec = cdslib.ezca_get_dcuid('K1VIS' + OPTIC + suffix)
            sdflib.restore(fec, 'safe')
        if checkSafe() == False:
            resetSafe(self)
Exemple #4
0
    def main(self):
        for dof in ['P', 'Y']:
            filtname = 'VIS-{0}_TM_OPTICALIGN_{1}'.format(OPTIC, dof)
            filt = ezca.get_LIGOFilter(filtname)
            filt.turn_on('OFFSET')


#            if dof=='P':
#                filt.ramp_gain(-1,0.5,False)
#            else:
#                filt.ramp_gain(1,0.5,False)
# SDF
        fec = cdslib.ezca_get_dcuid('K1VIS' + OPTIC)
        sdflib.restore(fec, 'aligned')
Exemple #5
0
    def main(self):
        #[FIXME] temporally use only for TypeA
        if sustype in []:
            for DoF in ['PIT', 'YAW']:
                OPAL = vislib.OpticAlign(
                    optic=OPTIC,
                    DOF=DoF,
                )
                if OPAL.OUTPUT.get() == 0:
                    OPAL.ramp_offset(0, 0, False)
                    OPAL.ramp_gain(1, 0, False)
                    OPAL.turn_on('OFFSET')

            vislib.offload2OPAL(self,
                                OPTIC,
                                gain=sysmod.offload_gain,
                                functype='main')
        if sustype in ['TypeA', 'TypeB', 'TypeBp']:  # by Miyo
            for suffix in ['P', 'T']:
                fec = cdslib.ezca_get_dcuid('K1VIS' + OPTIC + suffix)
                sdflib.restore(fec, 'aligned')
        else:
            fec = cdslib.ezca_get_dcuid('K1VIS' + OPTIC)
            sdflib.restore(fec, 'aligned')
Exemple #6
0
    def run(self):
        if self.counter == 0:
            # SDF
            for PART in ['T', 'P']:
                fec = cdslib.ezca_get_dcuid('K1VIS' + OPTIC + PART)
                sdflib.restore(fec, 'safe')
            self.counter += 1

        elif self.counter == 1:
            is_ramped_count = 0
            # Fix me..
            if sus_type_is() == 'Type-C':
                for dof in ['P', 'Y']:
                    filtname = 'VIS-{0}_TM_OPTICALIGN_{1}'.format(OPTIC, dof)
                    filt = ezca.get_LIGOFilter(filtname)
                    if filt.is_offset_ramping() == False:
                        is_ramped_count += 1
                if is_ramped_count == 2:
                    # Disconnect the master switch after ramping.
                    ezca['VIS-{0}_MASTERSWITCH'.format(OPTIC)] = 0
                    return True
            elif sus_type_is() == 'Type-B':
                log('!!!!')
                for dof in ['L', 'T', 'Y']:
                    filtname = 'VIS-{0}_IP_IDAMP_{1}'.format(OPTIC, dof)
                    filt = ezca.get_LIGOFilter(filtname)
                    filt.ramp_gain(0, 30, False)

                for dof in ['L', 'T', 'Y']:
                    filtname = 'VIS-{0}_IP_IDAMP_{1}'.format(OPTIC, dof)
                    filt = ezca.get_LIGOFilter(filtname)
                    if not filt.is_gain_ramping():
                        filt.turn_off('FM3', 'FM4')  # for miyodc

                ramp = []
                for dof in ['L', 'T', 'Y']:
                    filtname = 'VIS-{0}_IP_IDAMP_{1}'.format(OPTIC, dof)
                    filt = ezca.get_LIGOFilter(filtname)
                    ramp += [not filt.is_gain_ramping()]
                if all(ramp):
                    self.counter += 1
        elif self.counter == 2:
            ezca['VIS-{0}_MASTERSWITCH'.format(OPTIC)] = 0
            return True
        else:
            pass
Exemple #7
0
 def main(self):
     log('Start to turn all damping off')
     lib.all_off(self,optic)
     MNP = ezca.get_LIGOFilter('VIS-'+optic+'_MN_TMOLDAMP_P')
     MNY = ezca.get_LIGOFilter('VIS-'+optic+'_MN_TMOLDAMP_Y')
     MNP.ramp_gain(0,0,False)
     MNY.ramp_gain(0,0,False)
     MNP.turn_off('INPUT')
     MNY.turn_off('INPUT')
     MNP.RSET.put(2)
     MNY.RSET.put(2)
     
     log('Turning off the master switch')
     ezca['VIS-'+optic+'_PAY_MASTERSWITCH'] = 'OFF'
     ezca['VIS-'+optic+'_MASTERSWITCH'] = 'OFF'
     subprocess.call(['burtrb', '-f', reqfile, '-o', snapfile, '-l','/tmp/controls.read.log', '-v'])
     notify('In SAFE')
     for suffix in ['P','T']: # by Miyo
         fec = cdslib.ezca_get_dcuid('K1VIS'+OPTIC+suffix)
         sdflib.restore(fec,'safe') 
Exemple #8
0
 def main(self):
     ezca['VIS-{0}_MASTERSWITCH'.format(OPTIC)] = 0
     # SDF
     fec = cdslib.ezca_get_dcuid('K1VIS' + OPTIC)
     sdflib.restore(fec, 'safe')
     return True
Exemple #9
0
 def main(self):
     # SDF
     fec = cdslib.ezca_get_dcuid('K1VIS' + OPTIC)
     sdflib.restore(fec, 'misaligned')