本文整理汇总了Python中pylabcontrol.core.Script.get_script_module方法的典型用法代码示例。如果您正苦于以下问题:Python Script.get_script_module方法的具体用法?Python Script.get_script_module怎么用?Python Script.get_script_module使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pylabcontrol.core.Script
的用法示例。
在下文中一共展示了Script.get_script_module方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_iterator_default_script
# 需要导入模块: from pylabcontrol.core import Script [as 别名]
# 或者: from pylabcontrol.core.Script import get_script_module [as 别名]
def get_iterator_default_script(iterator_type):
"""
Returns:
sub_scripts: a dictionary with the default scripts for the script_iterator
script_settings: a dictionary with the script_settingsfor the default scripts
"""
sub_scripts = {}
script_settings = {}
package = 'b26_toolkit' # todo JG: mabye find a dynamic whay to get this
# for point iteration we add some default scripts
if iterator_type == 'iter nvs':
module = Script.get_script_module('SelectPoints')# Select points is actually in pylabcontrol
sub_scripts.update(
{'select_points': getattr(module, 'SelectPoints')}
)
module = Script.get_script_module('FindNV', package)
sub_scripts.update(
# {'find_nv': getattr(module, 'FindNV_cDAQ')}
{'find_nv': getattr(module, 'FindNV')}
)
module = Script.get_script_module('Take_And_Correlate_Images', package)
sub_scripts.update(
{'correlate_iter': getattr(module, 'Take_And_Correlate_Images', package)}
)
script_settings['script_order'] = {'select_points': -3, 'correlate_iter': -2, 'find_nv': -1}
elif iterator_type == 'iter points':
module = Script.get_script_module('SelectPoints', 'pylabcontrol')
sub_scripts.update(
{'select_points': getattr(module, 'SelectPoints')}
)
module = Script.get_script_module('SetLaser', package)
sub_scripts.update(
{'set_laser': getattr(module, 'SetLaser')}
)
module = Script.get_script_module('Take_And_Correlate_Images', package)
sub_scripts.update(
{'correlate_iter': getattr(module, 'Take_And_Correlate_Images')}
)
script_settings['script_order']={'select_points': -3, 'correlate_iter': -2, 'set_laser': -1}
elif iterator_type == 'test':
module = Script.get_script_module('Wait', 'pylabcontrol')
sub_scripts.update(
{'wait': getattr(module, 'Wait')}
)
return sub_scripts, script_settings