本文整理汇总了Python中target.Target.set_dof方法的典型用法代码示例。如果您正苦于以下问题:Python Target.set_dof方法的具体用法?Python Target.set_dof怎么用?Python Target.set_dof使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类target.Target
的用法示例。
在下文中一共展示了Target.set_dof方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Trainer
# 需要导入模块: from target import Target [as 别名]
# 或者: from target.Target import set_dof [as 别名]
#.........这里部分代码省略.........
else:
self.screen = pygame.display.set_mode(
(self.SCREEN_WIDTH, self.SCREEN_HEIGHT))
##################################
# initialize custom game objects #
##################################
self.cursor = Cursor(self.screen)
self.target = Target(self.screen,
self.FRAME_RATE,
self.TARGET_RAD,
self.ERROR_CUTOFF,
self.MIN_ERROR_METRIC,
self.SS_ERROR_METRIC,
self.MIN_SUCCESS_SCORE,
self.START_COORDS,
self.TARGET_DIST)
self.therm = Thermometer(self.screen,
self.MIN_ERROR_METRIC,
self.MIN_SUCCESS_SCORE,
self.SS_ERROR_METRIC)
self.INDIC_RAD_MAX = self.START_DIST-self.cursor.RAD-2
self.target.target_lims = self.TARGET_DIST
self.timers = {}
self.init_timers()
self.set_tr(2.)
self.trial_count = 0
self.trial_type_count = 1
self.next_dof = 1
self.set_dof(self.next_dof)
self.next_ir = 'impulse'
self.next_visible = True
self.set_trial()
######################
# set game variables #
######################
self.screen_mid = np.array([0.5*self.screen.get_width(),
0.5*self.screen.get_height()])
self.bg_color = self.BG_COLOR_REG
self.bg_color_alt = self.BG_COLOR_REG_2
self.bg_color_alt_2 = self.BG_COLOR_REG_3
self.indicator_color = self.INDICATOR_COLOR
self.indicator_rad = 0*self.START_DIST
self.success_color = self.SUCCESS_COLOR
self.input_mode = 'mouse'
self.input_pos = np.array([0.0,0.0])
self.training_mode = True
#######################
# set block variables #
#######################
self.NUM_BLOCK_TRIALS = CONFIG['num-block-trials']
self.next_target = 'new'
self.first_feedback = CONFIG['first-trial-feedback']
self.first_noise = CONFIG['first-trial-noise']
self.next_feedback = self.first_feedback
self.next_noise = self.first_noise
self.set_noise()
self.BLOCK_TRS = self.BLOCK_TIME/self.tr
self.block_nfb_buffer = np.zeros(self.BLOCK_TRS)
self.block_tr_count = 0