![]() If hasattr(thisComponent, "status") and thisComponent. If not continueRoutine: # a component has requested a forced-end of RoutineĬontinueRoutine = False # will revert to True if at least one component still running ![]() If event.type = EventConstants.KEYBOARD_CHAR: ISI.frameNStart = frameN # exact frame indexĮlif ISI.status = STARTED: #one frame should pass before updating params and completing ISI.tStart = t # underestimates by a little under one frame If t >= 0.0 and ISI.status = NOT_STARTED: If image.status = STARTED and t >= (0.0 + (5.0- win.monitorFramePeriod*0.75)): #most of one frame period left Image.tStart = t # underestimates by a little under one frame # keep track of start time/frame for later If t >= 0.0 and image.status = NOT_STARTED: While continueRoutine and routineTimer.getTime() > 0:įrameN = frameN + 1 # number of completed frames (so 0 is the first frame) Here's an outline of my code: from psychopy.iohub import launchHubServer, EventConstants I have a couple print statements as sanity checks and when I run it (and am using the keyboard) it doesn't print anything. I have a picture and want to record the duration of keypresses during the time the picture is on screen. The script at the moment is currently simply: from import launchHubServer io launchHubServer() This fails after some 30 seconds, with the following traceback: ioHub Server Process Completed With Code: 1 Traceback (most recent call last): File 'C:\\Users\\useradmin\\Desktop\\Protocols. Right now my program is super simple as I'm just trying to get the hang of it. I’m trying to program an eye-tracking experiment, but failing at the first hurdle. The keyboard demo works so I know it is possible, but when I implement the code in my own program it doesn't record any keyboard activity at all. Events can be accessed as a device independent event stream, or from a specific device of interest. All iohub events are timestamped using the PsychoPy global time base (()). Optionally, events can be saved to a HDF5 file. I'm fairly new to psychopy but I'm having a lot of trouble recording keyboard events so far. ioHub reports device events to the PsychoPy experiment runtime as they occur.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |