def __init__(self,doSetup=True): BehavioralExperiment.__init__(self) self.eyeTracker = TrackerEyeLink(self.getWind(), core.Clock(),sj=self.id,block=self.block,doSetup=doSetup,target=self.fixcross) #self.eyeTracker = TrackerSMI(self.getWind(), sj=self.id,block=self.block,target=self.fixcross) self.eyeTracker.sendMessage('MONITORDISTANCE %f'% self.wind.monitor.getDistance())
class AdultExperiment(BehavioralExperiment): def __init__(self,doSetup=True): BehavioralExperiment.__init__(self) self.eyeTracker = TrackerEyeLink(self.getWind(), core.Clock(),sj=self.id,block=self.block,doSetup=doSetup,target=self.fixcross) #self.eyeTracker = TrackerSMI(self.getWind(), sj=self.id,block=self.block,target=self.fixcross) self.eyeTracker.sendMessage('MONITORDISTANCE %f'% self.wind.monitor.getDistance()) def run(self): BehavioralExperiment.run(self) self.eyeTracker.closeConnection() def runTrial(self,*args): self.eyeTracker.preTrial(self.t,False,self.getWind(),autoDrift=True) self.eyeTracker.sendMessage('START') BehavioralExperiment.runTrial(self,*args,fixCross=False) self.eyeTracker.postTrial() def getJudgment(self,*args): self.eyeTracker.sendMessage('DETECTION') resp=BehavioralExperiment.getJudgment(self,*args) return resp def omission(self): self.eyeTracker.sendMessage('OMISSION') BehavioralExperiment.omission(self) def flip(self): #self.eyeTracker.sendMessage('FRAME %d %f'%(self.f, core.getTime())) return BehavioralExperiment.flip(self)