Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

Errors in the middle of experiment using PyGaze

NoaNoa Posts: 32

Hi,

I generated an experiment in PsychoPy using PyGaze. In the experiment there are 25 movies run using the command "MovieStim". I have several questions/problems:

  1. Before the experiment, I ran the calibration and validation via the EyeLink setup.
    Then I do not need to run "calibrate" from PyGaze but I get error when I comment the "calibrate" command.
    Why is that? Is there a way to cancel the calibration from PsychPy? I guess EyeLink's calibration is better.

  2. The experiment went OK with ~22-23 movies. Then towards the end PsychoPy just stopped working. The experiment stopped and no EDF was written. When I cut the experiment to run only 20 movies it was OK.
    Is there any memory limit ? Is memory that is not needed anymore get released?

  3. Is there a way to write the EDF through the experiment and not only in the end, so that if the experiment stops for any reason in the middle, at least I will have part of the EDF ?

Thank you very much !
Noa

Comments

  • I don't know the solution to your problem, but I had a very similar problem (see my last post). I just realised the eyetracker never went beyond 6 minutes of recording. Funny enough, tho, it managed to dump the data on the tsv file before stop recording....

  • sebastiaansebastiaan Posts: 2,737

    Hi Noa,

    There are a few separate things here:

    Before the experiment, I ran the calibration and validation via the EyeLink setup. Then I do not need to run "calibrate" from PyGaze but I get error when I comment the "calibrate" command. Why is that? Is there a way to cancel the calibration from PsychPy? I guess EyeLink's calibration is better.

    Different EyeLink calibration routines are all just different layers on top of the same system. So it doesn't matter if you calibrate with PyGaze/ OpenSesame, or using another tool. What is the exact error that you get?

    The experiment went OK with ~22-23 movies. Then towards the end PsychoPy just stopped working. The experiment stopped and no EDF was written. When I cut the experiment to run only 20 movies it was OK. Is there any memory limit ? Is memory that is not needed anymore get released?

    It seems indeed that memory fills up, and this causes the experiment to crash. But whether this is due to PsychoPy or your script is impossible to tell—if you don't upload the actual script!

    Is there a way to write the EDF through the experiment and not only in the end, so that if the experiment stops for any reason in the middle, at least I will have part of the EDF ?

    The EDF file is continuously written to the EyeLink computer—it's just the transfer to the experiment PC that fails.

    • With more recent versions of the EyeLink host software, you can access the EyeLink filesystem through a web interface. You can read exactly how in the EyeLink manuals (download from http://www.sr-support.com).
    • With older versions of the EyeLink host software, you need to reboot the EyeLink PC into Windows 7. Then from there, you can search for and find your data file.

    So you probably didn't lose any data!

    @DanieleP I don't know the solution to your problem, but I had a very similar problem (see my last post). I just realised the eyetracker never went beyond 6 minutes of recording. Funny enough, tho, it managed to dump the data on the tsv file before stop recording....

    Thanks for chipping in! But we're talking different eye trackers here! (And presumably different problems.)

    Cheers,
    Sebastiaan

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • NoaNoa Posts: 32

    I attach the relevant code:

    from psychopy.visual import MovieStim, ImageStim

    from psychopy import visual, core, event
    from pygaze import libinput
    from pygaze import liblog
    ...

    # Initialise a PsychoPy MovieStim
    mov = MovieStim(win, movie, flipVert=False)
    
    # Add the MovieStim to a PyGaze Screen instance.
    # (The Screen object has a list of all its associated
    # PsychoPy stimulus instances; you can add custom
    # instances, like the MovieStim, and they will automatically
    # be drawn each time you fill and show the Display.)
    scr.screen.append(mov)
    tracker.log('movie = %s' % (movie))
    # Start recording from the eye tracker.
    tracker.start_recording()
    
  • NoaNoa Posts: 32

    BTW we looked at the EyeLink computer via Windows7 but couldn't find (in "search") any EDF file.
    Do you know in which location should we look?

  • sebastiaansebastiaan Posts: 2,737

    From you code it seems that you're loading movies and then append them to scr.screen. But you also remove them once you're done playing? If not, then memory may gradually fill up (although I'm not sure how the PsychoPy MovieStim handles memory when it's not playing).

    BTW we looked at the EyeLink computer via Windows7 but couldn't find (in "search") any EDF file. Do you know in which location should we look?

    I believe it's usually in D:\ELCL\DATA, but it's possible that it varies a bit from system. In any case it's there, so keep looking!

    There's much bigger issues in the world, I know. But I first have to take care of the world I know.
    cogsci.nl/smathot

  • NoaNoa Posts: 32

    Hi Sebastian,

    I just downloaded Open Sesame to give it a try.
    How can I show movies in Open Sesame (and remove each one from the memory after playing?)

    Thanks!
    Noa

Sign In or Register to comment.