Esempio n. 1
0
 #get current time
 t=feedbackClock.getTime()
 frameN=frameN+1#number of completed frames (so 0 in first frame)
 #update/draw components on each frame
 
 #*patch_2* updates
 if t>=0.0 and patch_2.status==NOT_STARTED:
     #keep track of start time/frame for later
     patch_2.tStart=t#underestimates by a little under one frame
     patch_2.frameNStart=frameN#exact frame index
     patch_2.setAutoDraw(True)
 elif patch_2.status==STARTED and t>=(0.0+timings["feedback"]):
     patch_2.setAutoDraw(False)
 t = ThermBase(win, [0.25,1],[-0.125,-0.5])
 if FB:
     t.plot(fb,th,arrow,frameN)
 t.draw()
 
 #check if all components have finished
 if not continueRoutine:
     break # lets a component forceEndRoutine
 continueRoutine=False#will revert to True if at least one component still running
 for thisComponent in feedbackComponents:
     if hasattr(thisComponent,"status") and thisComponent.status!=FINISHED:
         continueRoutine=True; break#at least one component has not yet finished
 
 #check for quit (the [Esc] key)
 if event.getKeys(["escape"]): core.quit()
 #refresh the screen
 if continueRoutine:#don't flip if this routine is over or we'll get a blank screen
     win.flip()
Esempio n. 2
0
     patch_2.setAutoDraw(False)
 t = ThermBase(win, [0.25,1],[-0.125,-0.5])
 if FB:
     if fb > 3:
        fb_ = 3
     elif fb < -3:
        fb_ = -3
     else:
        fb_ = fb
     if th >3:
        th_ = 2.8
     elif th<-3:
        th_ = -2.8
     else:
        th_ = th
     t.plot(fb_,th_,arrow,frameN)
 t.draw()
 
 #check if all components have finished
 if not continueRoutine:
     break # lets a component forceEndRoutine
 continueRoutine=False#will revert to True if at least one component still running
 for thisComponent in feedbackComponents:
     if hasattr(thisComponent,"status") and thisComponent.status!=FINISHED:
         continueRoutine=True; break#at least one component has not yet finished
 
 #check for quit (the [Esc] key)
 if event.getKeys(["escape"]): core.quit()
 #refresh the screen
 if continueRoutine:#don't flip if this routine is over or we'll get a blank screen
     win.flip()