![]() If dlg.OK=False: core.quit() #user pressed cancel Number_of_dots = int(np.round(dot_density * np.pi * np.square(rayon_cercle) * (1/framerate)))ĭlg=gui.DlgFromDict(dictionary=expInfo,title=expName) Speed_deg_sec =8.#8.0 #in degrees/s 12 in Pilly in Seitz Is there a way I could easily modify the code below to send a trigger synchronized with the button press ? Of course I could use a thread to monitor my button box, or the iohub module, but I’d prefer using the (much simpler) keyboard component.Īll the best from psychopy import core, data, event, visual, gui My question is thus very simple, but probably hard to solve. Of course I could do that in my psychopy loop (see code below), but I would loose some temporal resolution (the trigger would be tethered to the refresh rate, and would not reflect the time at which the button was pressed). I am planning to record the EMG activity of response muscles in a random dot motion experiment, so I need to send a trigger synchronized to the button press. The button box contains two buttons, detected as ‘1’ and ‘2’ by keyboard.getKeys() respectively. I recently acquired a simple button box (blackbox toolkit, 1000hz sampling) that can be easily interfaced using the new psychopy’s keyboard component linked to the USB HID library. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |