本文整理汇总了Python中VisionEgg.FlowControl.Presentation.export_movie_go方法的典型用法代码示例。如果您正苦于以下问题:Python Presentation.export_movie_go方法的具体用法?Python Presentation.export_movie_go怎么用?Python Presentation.export_movie_go使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VisionEgg.FlowControl.Presentation
的用法示例。
在下文中一共展示了Presentation.export_movie_go方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: return
# 需要导入模块: from VisionEgg.FlowControl import Presentation [as 别名]
# 或者: from VisionEgg.FlowControl.Presentation import export_movie_go [as 别名]
global mid_x, mid_y, max_vel
return ( max_vel*sin(0.1*2.0*pi*t) + mid_x , # x
max_vel*sin(0.1*2.0*pi*t) + mid_y ) # y
# Create an instance of the Controller class
target_position_controller = FunctionController(during_go_func=get_target_position)
#############################################################
# Connect the controllers with the variables they control #
#############################################################
p.add_controller(target,'position', target_position_controller )
#######################
# Run the stimulus! #
#######################
base_dir = VisionEgg.config.VISIONEGG_USER_DIR
if not os.path.isdir(base_dir):
base_dir = VisionEgg.config.VISIONEGG_SYSTEM_DIR
save_directory = os.path.join(base_dir,'movie')
if not os.path.isdir(save_directory):
os.mkdir(save_directory)
if not os.path.isdir(save_directory):
print "Error: cannot make movie directory '%s'."%save_directory
print "Saving movie to directory '%s'."%save_directory
basename = "movie_"+os.path.splitext(os.path.basename(sys.argv[0]))[0]
p.export_movie_go(frames_per_sec=fps,filename_base=basename,path=save_directory)