import time from psychopy import visual # https://github.com/LabNeuroCogDevel/lncdtask/blob/main/lncdtask/pylink_help.py import lncdtask.pylink_help as camera # pip instsall git+https://github.com/LabNeuroCogDevel/lncdtask # pip install --index-url=https://pypi.sr-research.com sr-research-pylink win = visual.Window([800, 600]) dot = visual.Circle(win, radius=.1, lineColor=None, fillColor='yellow') win.flip() ## ip => 100.1.1.1 in production, remove from call to use default eye = camera.eyelink(win.size, ip=None) # sendCommand for screen_pixel_coords, # DISPLAY_COORDS, select_parser_configuration, # scene_camera_gazemap, pupil_size_diameter # start new file, eyetracker name based on time eye.open("sub-1_ses-1",base36enc=True) # openDataFile('DE4DB3AF.EDF') # sendMessage("NAME: sub-1_ses-1") eye.start() # startRecording(1, 1, 1, 1) eye.trial_start("1") # sendMessage("TRIALID 1") eye.var_data("show", "fix") # sendMessage("!V TRIAL_VAR_DATA show fix"); dot.draw() win.callOnFlip(eye.trigger, 'show-dot') # sendMessage("show-dot"); # sendCommand("record_status_message show-dot") time.sleep(1) win.flip() time.sleep(1) eye.trial_end() # sendMessage(f"TRIAL OK") # saves to 'sub-1_ses-1_TIME.edf' on local computer eye.get_data() # endRealTimeMode(); closeDataFile(); # receiveDataFile("","sub-1_ses-1_TIME.EDF") win.close()