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


Python VisionEgg.true_time_func方法代码示例

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


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

示例1: go

# 需要导入模块: import VisionEgg [as 别名]
# 或者: from VisionEgg import true_time_func [as 别名]
 def go(self,duration=None,prestim=None,poststim=None,RSTART=False):
     # pre stimulation go
     if prestim is not None:
         if RSTART:
             remote_start_controller = RemoteStartController()
             self.add_controller(None,None,remote_start_controller)
         self.parameters.go_duration = (prestim, 'seconds')
         super(FrameSweep, self).go()
         if RSTART:
             self.remove_controller(None,None,remote_start_controller)
     
     # stimulation go
     if duration is not None:
         self.parameters.go_duration = duration
     else:
         self.parameters.go_duration = ('forever','')
     self.add_controllers()
     # use VisionEgg timing function which handles platform specific problems
     sweep_begin = VisionEgg.true_time_func()
     super(FrameSweep, self).go()
     sweep_end = VisionEgg.true_time_func()
     sweep_duration = sweep_end - sweep_begin
     # remove all stimuli so that post presentation will show nothing.
     self.remove_stimuli()
     # the RemoveViewportController should be moved, otherwise post go will quit directly.
     self.remove_controller(None,None,None)
     
     # post stimulation go
     if poststim is not None:
         if RSTART:
             self.add_controller(None,None,RemoteStopController())
         self.parameters.go_duration = (poststim, 'seconds')
         super(FrameSweep, self).go()
     
     if self.interrupted:
         self.logger.warning('Stimulation was interrupted before completion.')
     else:
         self.logger.info('Stimulation completes successfully.')
     self.logger.info('Actual stimulus duration: %s' %str(TimeFormat(sweep_duration)))
开发者ID:chrox,项目名称:RealTimeElectrophy,代码行数:41,代码来源:FrameControl.py


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