1
我試圖顯示一組在大約25秒的過程中動態變化的數字,同時顯示視覺刺激作爲對象反饋的反饋。但是,看起來該腳本無法一次執行兩個任務。任何人都可以爲此想到任何形式的工作嗎?任何幫助非常感謝。我對python/psychopy很陌生,所以如果代碼有點混亂,我很抱歉。任何方式來爲連續的幀同時繪製單獨的動態刺激? (psychopy)
這裏是我當前的代碼:
開始例行
if not countdownStartedIndie:
countdownClock = core.CountdownTimer(26)
countdownStartedIndie = True
if not countupto:
timer = core.Clock()
avgtaps = 0
countupto = True
每一幀
timeRemaining = countdownClock.getTime()
ValueWin = visual.TextStim(win, text='+', font='', pos=(-0.5, -0.5), depth=0, rgb=None, color=('limegreen'), colorSpace='rgb', opacity=1, contrast=1.0, units='', ori=0.0, height=0.3, antialias=True, bold=False, italic=False, alignHoriz='center', alignVert='center', fontFiles=(), wrapWidth=None, flipHoriz=False, flipVert=False, name=None, autoLog=None)
timetogo = timer.getTime()
if timetogo >= 25:
countupto = False
else:
minutes2 = int(timetogo/60)
seconds2 = int(timetogo -(minutes2*60))
if timeRemaining <= 0.0:
s4.finished = True
continueRoutine = False
countdownStartedIndie = False
else:
minutes = int(timeRemaining/60) # the integer number of minutes
seconds = int(timeRemaining -(minutes*60))
timeText = str(minutes)+ ':' + str(seconds) #create a string of characters representing time
if s4keys.corr:
ValueWin.draw #visual player feedback
jitter = [10,11,12,13][randint(0,3)]
groupcount = 'x' + str(jitter)
for frameN in range (48):
s4count.draw() #a text stim using the 'groupcount' variable
win.flip()
嗨@aubrey歡迎來到StackOverflow。請準確地描述*您想要顯示的內容,以及*確切地說*顯示腳本不能同時執行兩個任務。 –