当前位置: 首页>>代码示例>>Python>>正文


Python SMELLIELogger.debug方法代码示例

本文整理汇总了Python中smellie.smellie_logger.SMELLIELogger.debug方法的典型用法代码示例。如果您正苦于以下问题:Python SMELLIELogger.debug方法的具体用法?Python SMELLIELogger.debug怎么用?Python SMELLIELogger.debug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在smellie.smellie_logger.SMELLIELogger的用法示例。


在下文中一共展示了SMELLIELogger.debug方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: set_parameters

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import debug [as 别名]
    def set_parameters(self):
        """
        set superK control parameters. Most of these should not be configurable and hard-coded for safety.
        """
        if self.isConnected:
            SMELLIELogger.debug('SNODROP DEBUG: SuperKDriver.set_parameters()')

            superKControls = superKControlStructure()
            superKControls.trigLevelSetpointmV = c_uint16(1000)
            superKControls.displayBacklightPercent = c_uint8(0)
            superKControls.trigMode = c_uint8(1)
            superKControls.internalPulseFreqHz = c_uint16(0)
            superKControls.burstPulses = c_uint16(1) 
            superKControls.watchdogIntervalSec = c_uint8(0)
            superKControls.internalPulseFreqLimitHz = c_uint32(24000) #doesn't do anything. Possibly a manufacturer option disabled in firmware.
            setSuperKControls(self.COMPort,superKControls)

            #check parameters have been set correctly:
            new_superKControls=self.get_parameters()
            if (superKControls.trigLevelSetpointmV!=new_superKControls.trigLevelSetpointmV or
            superKControls.displayBacklightPercent!=new_superKControls.displayBacklightPercent or
            superKControls.trigMode!=new_superKControls.trigMode or
            superKControls.internalPulseFreqHz!=new_superKControls.internalPulseFreqHz or 
            superKControls.burstPulses!=new_superKControls.burstPulses or 
            superKControls.watchdogIntervalSec!=new_superKControls.watchdogIntervalSec or 
            superKControls.internalPulseFreqLimitHz!=new_superKControls.internalPulseFreqLimitHz):
                SMELLIELogger.warn('SNODROP WARN: Error upon setting SuperK control bits. Specified values have not all been set. Check system.')
                raise SuperKDriverHWError("Error upon setting SuperK control bits. Specified values have not all been set. Check system.{}.") 
        else:
            raise SuperKDriverLogicError("SuperK port not open.")
开发者ID:jlidgard,项目名称:newSmellie,代码行数:32,代码来源:superk_driver.py

示例2: go_ready

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import debug [as 别名]
    def go_ready(self, step_number, low_wavelength, high_wavelength):
        """
        undocumented
        """
        if self.isConnected:
            SMELLIELogger.debug('SNODROP DEBUG: SuperKDriver.go_ready({},{},{})'.format(step_number, low_wavelength, high_wavelength))
            
            trigger_mode = self.get_trigger_mode()
            if trigger_mode==1:
                SMELLIELogger.warn('SNODROP WARN: SuperK laser being armed. Ready to pulse when triggered externally.')
            elif trigger_mode==0:
                for x in range(6):
                    SMELLIELogger.warn('SNODROP WARN: SuperK laser being armed. Laser will pulse with internal trigger. In {} seconds...'.format(5-x))
                    sleep(1)

            # set the wavelengths of the Varia
            self.set_wavelengths(low_wavelength,high_wavelength)
            
            # set the Varia ND filter (the step number to the stepper motor controller)
            #NDFilter_set_position(step_number)
            
            # turn the lock off then turn the emission on (in this order)
            self.set_laser_lock(False)
            self.set_laser_emission(True)
        else:
            raise SuperKDriverLogicError("SuperK port not open.")
开发者ID:jlidgard,项目名称:newSmellie,代码行数:28,代码来源:superk_driver.py

示例3: get_type

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import debug [as 别名]
 def get_type(self):
     """
     Get the current Fibre Switch hardware model as a string
     """ 
     self.execute_message("type?")
     type = self.read_back()
     SMELLIELogger.debug('SNODROP DEBUG: FibreSwitch4Chan.get_type = {}'.format(type))
     return type
开发者ID:jlidgard,项目名称:newSmellie,代码行数:10,代码来源:fibre_switch_4chan.py

示例4: get_info

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import debug [as 别名]
 def get_info(self):
     """
     Get the current Laser Switch hardware model as a string
     """ 
     self.execute_message("y")
     type = self.read_back()
     SMELLIELogger.debug('SNODROP DEBUG: LaserSwitch.get_info = {}'.format(type))
     return type
开发者ID:jlidgard,项目名称:newSmellie,代码行数:10,代码来源:laser_switch.py

示例5: get_fwr_version

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import debug [as 别名]
 def get_fwr_version(self):
     """
     Get the current Laser Switch firmware version as a string
     """
     self.execute_message("x")
     fwr_ver = self.read_back()
     SMELLIELogger.debug('SNODROP DEBUG: LaserSwitch.get_fwr_version = {}'.format(fwr_ver))
     return fwr_ver
开发者ID:jlidgard,项目名称:newSmellie,代码行数:10,代码来源:laser_switch.py

示例6: _cleanup

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import debug [as 别名]
 def _cleanup(self):
     """
     Wait until all n trigger pulses have been sent, and then stop the Trigger Generation task and clear the NI Unit's task memory.
     """
     SMELLIELogger.debug('SNODROP DEBUG: TriggerGenerator._cleanup()')
     if self.taskHandle is not None:
         daqmx.functions.DAQmxStopTask(self.taskHandle)
         daqmx.functions.DAQmxClearTask(self.taskHandle)
     self.taskHandle = None
开发者ID:jlidgard,项目名称:newSmellie,代码行数:11,代码来源:ni_trigger_generator.py

示例7: get_wavelengths

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import debug [as 别名]
 def get_wavelengths(self):
     """
     undocumented
     """
     if self.isConnected:
         high_wavelength, low_wavelength = getVariaControls(self.COMPort)
         SMELLIELogger.debug('SNODROP DEBUG: SuperKDriver.get_wavelengths() = {}, {}'.format(low_wavelength, high_wavelength))
         return low_wavelength, high_wavelength
     else:
         raise SuperKDriverLogicError("SuperK port not open.")
开发者ID:jlidgard,项目名称:newSmellie,代码行数:12,代码来源:superk_driver.py

示例8: get_parameters

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import debug [as 别名]
 def get_parameters(self):
     """
     undocumented
     """
     if self.isConnected:
         superKControlStructure = getSuperKControls(self.COMPort)
         SMELLIELogger.debug('SNODROP DEBUG: SuperKDriver.get_parameters()')
         return superKControlStructure
     else:
         raise SuperKDriverLogicError("SuperK port not open.")
开发者ID:jlidgard,项目名称:newSmellie,代码行数:12,代码来源:superk_driver.py

示例9: port_close

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import debug [as 别名]
 def port_close(self):
     """
     Close the serial port connection
     """
     SMELLIELogger.debug('SNODROP DEBUG: LaserSwitch.port_close()')
     if self.isConnected:
         self.serial.close()
         self.isConnected = False
     else:
         raise LaserSwitchLogicError("Laser Switch port not open.")
开发者ID:jlidgard,项目名称:newSmellie,代码行数:12,代码来源:laser_switch.py

示例10: execute

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import debug [as 别名]
 def execute(self):
     """
     Change the active Laser Switch channel from the currently active one to the currently selected one
     """
     SMELLIELogger.debug('SNODROP DEBUG: LaserSwitch.send_select_command()')
     self.execute_message("e")
     response = self.read_back()
     if (response!="Execute. Sent."):
         raise LaserSwitchHWError("Unrecognised response after select command. Check system.")
     sleep(LASER_SWITCH_EXECUTE_TIME) #time for mains to be switched and Sepia USB device to reconnect
开发者ID:jlidgard,项目名称:newSmellie,代码行数:12,代码来源:laser_switch.py

示例11: go_ready

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import debug [as 别名]
 def go_ready(self, intensity):
     """
     Set PQ driver into its ready state, given intensity, sets soft-lock = off
     """
     if self.isConnected:
         SMELLIELogger.debug('SNODROP DEBUG: PQDriver.go_ready()')
         self.set_intensity(intensity)
         self.set_soft_lock(False)
     else:
         raise PQDriverLogicError("Laser port not open.") 
开发者ID:jlidgard,项目名称:newSmellie,代码行数:12,代码来源:PQ_driver.py

示例12: get_trigger_mode

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import debug [as 别名]
 def get_trigger_mode(self):
     """
     undocumented
     """
     if self.isConnected:
         superKControlStructure = self.get_parameters()
         SMELLIELogger.debug('SNODROP DEBUG: SuperKDriver.get_trigger_mode() = {}'.format(superKControlStructure.trigMode))
         return superKControlStructure.trigMode #for simplicity, just return mode, not internal trigger rate. Rate should always be set.
     else:
         raise SuperKDriverLogicError("SuperK port not open.")
开发者ID:jlidgard,项目名称:newSmellie,代码行数:12,代码来源:superk_driver.py

示例13: port_close

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import debug [as 别名]
 def port_close(self):
     """
     Close the serial port connection
     """
     SMELLIELogger.debug('SNODROP DEBUG: Interlock.port_close()')
     if self.isConnected:
         self.serial.close()
         self.isConnected = False
     else:
         raise InterlockLogicError("Interlock port not open.")
开发者ID:jlidgard,项目名称:newSmellie,代码行数:12,代码来源:interlock.py

示例14: current_state

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import debug [as 别名]
 def current_state(self):
     """
     Returns a formatted string with the current hardware settings
     """
     if self.isConnected:
         low_wavelength, high_wavelength = self.get_wavelengths()
         SMELLIELogger.debug('SNODROP DEBUG: SuperKDriver.current_state() = {},{},{}'.format(self.NDFilter.current_state(), low_wavelength, high_wavelength ))
         return "SuperK laser (settings):: NDFilter Step: {}, Low Wavelength: {}, High Wavelength: {}".format(self.NDFilter.current_state(), low_wavelength, high_wavelength )
     else:
         raise SuperKDriverLogicError("SuperK port not open.")   
开发者ID:jlidgard,项目名称:newSmellie,代码行数:12,代码来源:superk_driver.py

示例15: execute

# 需要导入模块: from smellie.smellie_logger import SMELLIELogger [as 别名]
# 或者: from smellie.smellie_logger.SMELLIELogger import debug [as 别名]
    def execute(self):
        """
        Change the active Laser Switch channel from the currently active one to the currently selected one
        """
        SMELLIELogger.debug('SNODROP DEBUG: LaserSwitch.execute()')
        self.connection.eDigitalOut(0, 1, writeD = 1) 
        self.connection.eDigitalOut(0, 0, writeD = 1)      
        self.connection.eDigitalOut(0, 1, writeD = 1)

        sleep(RELAY_SLEEP)
开发者ID:jlidgard,项目名称:newSmellie,代码行数:12,代码来源:laser_switch_labjack.py


注:本文中的smellie.smellie_logger.SMELLIELogger.debug方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。