p300grid.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:cebl 作者: idfah 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号