Skip to content

Version 0.11.2: Under-the-hood changes and a couple bug fixes

Latest
Compare
Choose a tag to compare
@jfkominsky jfkominsky released this 18 Feb 08:19
· 1 commit to main since this release
c26e22b

This release is only compatible with PsychoPy versions 2024.1.0 and later.

This release fixes a couple of builder bugs, but more importantly, includes a substantial under-the-hood overhaul of the system PyHab uses to control movie file playback for in-person studies (including movie files used as attention-getters). These changes make movie files more reliable and predictable at the cost of being a little slower (~100ms on loop). To give you an idea of how much slower, it also records detailed information in the timing file about the start and end of each movie's playback. See below for details.

While you can get the changes by just taking the PyHabBuilder.py and PyHabClass.py files and replacing the files of the same name in any experiment made with 0.11.0 OR 0.10.x, as long as you are using PsychoPy version 2024.1 or later, I do not recommend updating any study you are already running in person if it's working as you want it to because this update may change the timing slightly.

Installation and quickstart guide

As always, please join the PyHab announcements mailing list!

Bug fixes

  • Fixed a bug in the online builder introduced in 0.11.0 that was breaking the stimulus settings dialog.
  • Fixed behavior for the in-person builder around updating the name of a trial type or deleting a trial type so that it is more thoroughly scrubbed from the settings file.

Movie file playback changes for in-person studies

  • PsychoPy now uses the ffpyplayer backend for playing movie files. While more reliable in general, it has a small problem in that operations like "seek" can take up to 100ms or more, and even "pause" takes about 2 frames to really take effect.
  • Normally this wouldn't be an issue, except that for looping videos between trials or for attention-getters, it could cause some stuttering where the last frame appeared before it cycled back to the beginning, or a stray "seek" call could make the audio stutter.
  • This version of PyHab takes more direct control of the movie playback system to ensure that 1) when a video loops, it always displays the first frame and 2) there are no stray audio chirps. However, this comes at the cost of some ~100ms delays.
  • Movies will now play all the way to the end before looping. Previous versions looped 2 frames before the end. This ensures good loop behavior.
  • The timing file now records when the movie successfully starts playing from its second frame, and when it hits the end and loops. You will notice that these times are often 100ms off the "startTrial" times.
  • If you are using an eye-tracker, these timestamps are also sent to the eye-tracker, so you know when stimuli are actually on the screen.
  • None of these changes will affect image or audio stimuli, which will behave exactly as before (and are more precise timing-wise). Online studies are also unaffected because movies are presented through a website and weren't directly controlled by PyHab to start with.
  • Because of these delays, can no longer estimate when a trial is supposed to end by multiplying the duration of the movie stimuli. I recommend using the "end trial on movie end" setting if you want to make sure a trial only ends on the end of a movie.