.edf transfer to a specific folder
Hi all!
I am working on an ET experiment where participants read sentences, and for data pre-processing (in Data Viewer) I need to send the canvas to the .edf file. So far, I have managed to take a screenshot per trial and send it to the file with this code:
scn_name = sentence + '.png'
filepath = os.path.join(exp.experiment_path, scn_name)
self.experiment.window.movieFrames[0].save(filepath)
et_tracker.sendMessage('!V IMGLOAD FILL %s' % filepath )
However, when I open the .edf file on Data Viewer, it returns an error: It cannot find the images. I am guessing that this may have to do with dependencies, and that I need to have a folder per participants where I save both the screenshots and the .edf file. So far, I have managed to former, but I don't know how to save the .edf transferred to the Host PC in a folder other than the experiment folder - any input?
Thank you!
Comments
Hi all,
I managed to solve the issue, here's what worked (using PsychoPy as a back-end):
self.experiment.window.getMovieFrame() # takes a screenshot of the canvas scn_name = var.item + '.png' filepath = os.path.join(ppt_folder, scn_name) self.experiment.window.saveMovieFrames(filepath) el = pylink.getEYELINK() bgcolor = (116, 116, 116) el.sendMessage('!V CLEAR %d %d %d' % bgcolor) el.sendMessage('!V IMGLOAD FILL %s' % filepath )