我已经在Psychopy中创建了一个任务,其中从一个jar中绘制了一个珠子。要绘制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
请修复您的代码,这里有很多错别字! – MisterMiyagi