Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Logging Eyelink Data to EDF

Hello :)

I am running an OpenSesame eyetracking experiment and would like to log the output in an edf file.

I have made use of pygaze plugins, including init, start and stop recording, and pygaze log.

In the pygaze init plugin, I have specified the directory where I wish to keep the edf file as [C:\Users\topuser\Desktop\HabTask-Complexity\EyeTrackingData].


Yet after running the experiment, there is no edf file in this location.

Do I need to specify further functions to log and save output, or should the pygaze plugins be enough?

I have also attempted to save the log file in the directory through an inline script, where I state:


# Define the directory for the log files (same as specified in PyGaze settings)

log_directory = "C:\\Users\\topuser\\Desktop\\HabTask-Complexity\\EyeTrackingData"


# Create the directory if it doesn't exist

if not os.path.exists(log_directory):

os.makedirs(log_directory)


# Specify the filename for the EDF file

edf_filename = "HAB_{subject}_log.edf".format(subject=subject)


# Create the full path for the EDF file

edf_filepath = os.path.join(log_directory, edf_filename)


# Initialize the EDF logfile

log_file = liblog.Edf(filename=edf_filepath)

log_file.open()


# Stop logging and close the EDF file when the experiment ends

log_file.close()


Thanks for taking a look!

Comments

  • I noticed in the pygaze forum that the stop recording plugin should be after the logger. Will give this a try to see if it works!

  • Hi there :)

    In case anyone runs into the same problem, the issue here was with the permission settings on the computer.

    The log file was saving to the temporary directory as Opensesame did not have write permissions on the desktop. If you control +F ' edf' in your computer, you will be able to find the file!

Sign In or Register to comment.