def getK1(self, type='simu'):
        """ get quad k1 value

        :param type: 'simu' or 'online'
        :return: quad strength,i.e. k1
        """
        if type == 'ctrl':
            pv = self.ctrlinfo.get('k1')['pv']
            rval = epics.caget(pv)
            if rval is None:
                val = self.getConfig(type='simu')['k1']
            else:
                val = self.unitTrans(rval, direction='+')
            return val
        else:
            return self.getConfig(type='simu')['k1']
def getK1 ( self , type = 'simu' ) : if type == 'ctrl' : pv = self . ctrlinfo . get ( 'k1' ) [ 'pv' ] rval = epics . caget ( pv ) if rval is None : val = self . getConfig ( type = 'simu' ) [ 'k1' ] else : val = self . unitTrans ( rval , direction = '+' ) return val else : return self . getConfig ( type = 'simu' ) [ 'k1' ]
get quad k1 value

        :param type: 'simu' or 'online'
        :return: quad strength,i.e. k1