【发布时间】:2016-10-12 06:47:28
【问题描述】:
我在 Psychopy 上创建了一个任务,其中从罐子中取出珠子。抽取 50 个不同的珠子,每个珠子后要求参与者进行概率评分。该任务是从一个 excel 文件循环的,但它需要很长时间才能完成 50 个评级。我希望获得前 10 颗珠子的评分。然后对第二个珠子进行评级,直到抽出 20 个珠子。然后对于接下来的 30 颗珠子,直到第 50 颗珠子,只要求每抽取 5 颗珠子进行一次评级(我对编码真的很陌生,很抱歉这可能提前有多么不正确)。 我已经编写了这样的代码,但不幸的是它不起作用? (在没有评分的回合中,我尝试使用键盘响应来触发序列中的下一个出现)-
for row_index, row in (beads_params_pinkbluegreyratingparamters.xlsx):
if row(0:10) and t >= 0.0 and rating.status == NOT_STARTED:
break
rating.tStart = t # underestimates by a little under one frame
rating.frameNStart = frameN # exact frame index
rating.setAutoDraw(True)
continueRoutine &= rating.noResponse # a response ends the trial
elif row(12:20:2) and t >= 0.0 and rating.status == NOT_STARTED:
break
rating.tStart = t # underestimates by a little under one frame
rating.frameNStart = frameN # exact frame index
rating.setAutoDraw(True)
continueRoutine &= rating.noResponse
elif rows.event.getkeys, row(11:19:2):
elif len(theseKeys) > 0:
break
key_resp_2.keys = theseKeys [-1]
key_resp_2.rt = key_resp_2.clock.getTime()
continueRoutine = False
elif row(20:50:5) and t >= 0.0 and rating.status == NOT_STARTED:
break
rating.tStart = t # underestimates by a little under one frame
rating.frameNStart = frameN # exact frame index
rating.setAutoDraw(True)
continueRoutine &= rating.noResponse
rows.event.getKeys, row[21, 22, 23, 24, 26, 27, 28, 29, 31, 32, 33, 34, 36, 37, 38 ,39, 41, 42, 43, 44, 46, 47, 48, 49]:
elif len(theseKeys) > 0:
key_resp_2.Keys = theseKeys [-1]
key_resp_2.rt = key_resp_2.clock.getTtime()
continueRoutine = False
【问题讨论】:
-
请修正您的代码,有多个拼写错误!