def trainEpoch(self):
# if the stim list is empty
if len(self.curStimList) == 0:
# increment current repetition
self.curRep += 1
# if we have done all reps, then quit
if self.curRep > len(self.trainText):
self.gridSpeller.removeHighlight()
##wx.CallLater(1000.0*self.windowEnd*1.1-1000.0*self.si, self.endTrain)
wx.CallLater(1000.0*self.windowEnd*1.1, self.endTrain)
# otherwise, reset stim list and show another training symbol
else:
self.initCurStimList()
#self.showTrainSymbol()
##wx.CallLater(1000.0*self.windowEnd*1.1-1000.0*self.si, self.showTrainSymbol)
wx.CallLater(1000.0*self.windowEnd*1.1, self.showTrainSymbol)
# if stim list still had elements to show
else:
# grab next symbol index and set marker
curStim = self.curStimList.pop()
self.src.setMarker(self.stimToMark(curStim))
# highlight row or column
if curStim <= self.nRows:
self.gridSpeller.highlightRow(curStim - 1)
else:
self.gridSpeller.highlightCol(curStim - self.nRows - 1)
# clear after si seconds
wx.CallLater(1000.0*self.si, self.trainClearStim)
评论列表
文章目录