Skip to content

@jfkominsky jfkominsky released this Aug 12, 2020

This release adds four major new features:

  1. Total trial duration: PyHab now records total trial duration, and you can use trial duration instead of on-time both for determining when a trial should end and for determining habituation criteria. These are all options (in the trial settings and habituation settings respectively), the default behavior hasn't changed. You can also set whether the total trial duration includes the last gaze-off event in the universal settings.

  2. Auto-redo triggers: Trial type settings now include the ability to set "auto-redo" criteria. With these enabled, if the minimum on-time has not been reached by the end of the trial, or by a specific point in the trial, the trial will automatically end, mark that trial as not usable, and redo the trial. There are a few ways to set this up, I recommend looking up the trial settings in the manual.

  3. "Either/or" end-of-trial triggers: Each trial has a minimum on-time and a maximum off-time. Previously it was possible to end the trial based on the minimum on-time alone, or the maximum off-time after the minimum on-time had been reached. Now, you can end the trial whenever either the minimum on-time or maximum off-time is reached, whichever comes first.

  4. "Last" habituation criterion: You can now set a habituation criterion based on the last N trials. For example, you could calculate habituation by whether the last 2 trials made up less than 25% of the total looking time over the last 5 trials.

Other upgrades:

  • Attention-getters can now use a different background color than the rest of the study.
  • You can manually end an attention-getter and start a trial with the "K" key.

Bug fixes: Minor bug fixes in the builder interface, including better behavior when a study has >20 trials in its study flow, and remembering settings when you need to redo a setting.

You should be able to replace the PyHabClass and PyHabBuilder files in your existing experiments with the new versions and have access to the new features.

Installation and quickstart guide

As always, please join the PyHab announcements mailing list!

Assets 2
  • 0.9.2
  • dcfa2d9
  • Compare
    Choose a tag to compare
    Search for a tag
  • 0.9.2
  • dcfa2d9
  • Compare
    Choose a tag to compare
    Search for a tag

@jfkominsky jfkominsky released this May 26, 2020

Experiments created in 0.9.1 may not have saved the launcher script properly. This can be fixed: In the launcher script, erase the line that reads "setName = 'DUMMY FILENAME'".

This update prevents the bug from occurring in the first place and removes some code that fixed a bug in PsychoPy, which PsychoPy itself fixed in its version 2020.1.3

Existing experiments do not need to be modified, but you will want this version when creating any new experiments.

Installation and quickstart guide

As always, please join the PyHab announcements mailing list!

Assets 2
  • 0.9.1
  • afd98fd
  • Compare
    Choose a tag to compare
    Search for a tag
  • 0.9.1
  • afd98fd
  • Compare
    Choose a tag to compare
    Search for a tag

@jfkominsky jfkominsky released this Mar 12, 2020

This release fixes a couple of bugs in the builder, related to the trial type palette. Specifically:

  • If you have exactly eight trial types and made a new block, you will now correctly get a second page of trial types.
  • If you delete a trial type or block that was the last one on its page of the palette, the page will go away.
  • Loading a saved experiment will now correctly show all of the pages of the trial type palette.

This will only affect you if you have an experiment with more than 8 trial types and/or blocks. If so, I recommend replacing the PyHabBuilder.py file in your experiment's PyHab folder with the one from this download.


Version 0.9 adds a bunch of new functionality.

  • Head-turn preference procedures: The big one. PyHab can now be used to create and run head-turn preference procedure studies on setups with up to three stimulus presentation screens (left, right, and center)! Detailed instructions can be found in the manual.
    • Also included is a script to help you identify which screen is which when you are setting it up.
    • There are currently some limitations on HPP studies: Attention-getters can only be played on the center screen, and start/end images only appear on the center screen. This will be addressed in a future update. In the interim, you can create trial types that replicate this functionality.
  • Advanced gaze-dependent stimulus presentation options: Using the new "advanced trial settings" window, you can have stimulus presentation pause when an infant looks away from the screen, automatically play an attention-getter if they look away for a certain amount of time, cut off the attention-getter the moment they look back, and more! All of it configurable to your needs.
  • Totally revamped condition interface: You no longer need to go through a bunch of little dialog boxes to build your conditions. There is now a drag-and-drop interface for creating stimulus presentation orders for different conditions. This is especially relevant for building head-turn preference studies, where it is necessary to control what appears on which screen.
  • General builder improvements: Some settings have been moved around, buttons now appear and update intelligently when their functionality becomes relevant.
  • Under-the-hood improvements: While you will still need to do some programming to use eye-tracking with PyHab, the code has been refactored in a way that should make it relatively easy to swap in eye-tracking code in place of button presses. Future versions will make this easier still.
  • Fixes related to PsychoPy 2020.1.0-1: See Backwards Compatibility in PsychoPy3 2020.1.0 and 2020.1.1

Installation and quickstart guide

As always, please join the PyHab announcements mailing list!

Assets 2

@jfkominsky jfkominsky released this Mar 3, 2020

Version 0.9 adds a bunch of new functionality.

  • Head-turn preference procedures: The big one. PyHab can now be used to create and run head-turn preference procedure studies on setups with up to three stimulus presentation screens (left, right, and center)! Detailed instructions can be found in the manual.
    • Also included is a script to help you identify which screen is which when you are setting it up.
    • There are currently some limitations on HPP studies: Attention-getters can only be played on the center screen, and start/end images only appear on the center screen. This will be addressed in a future update. In the interim, you can create trial types that replicate this functionality.
  • Advanced gaze-dependent stimulus presentation options: Using the new "advanced trial settings" window, you can have stimulus presentation pause when an infant looks away from the screen, automatically play an attention-getter if they look away for a certain amount of time, cut off the attention-getter the moment they look back, and more! All of it configurable to your needs.
  • Totally revamped condition interface: You no longer need to go through a bunch of little dialog boxes to build your conditions. There is now a drag-and-drop interface for creating stimulus presentation orders for different conditions. This is especially relevant for building head-turn preference studies, where it is necessary to control what appears on which screen.
  • General builder improvements: Some settings have been moved around, buttons now appear and update intelligently when their functionality becomes relevant.
  • Under-the-hood improvements: While you will still need to do some programming to use eye-tracking with PyHab, the code has been refactored in a way that should make it relatively easy to swap in eye-tracking code in place of button presses. Future versions will make this easier still.
  • Fixes related to PsychoPy 2020.1.0-1: See Backwards Compatibility in PsychoPy3 2020.1.0 and 2020.1.1

Installation and quickstart guide

As always, please join the PyHab announcements mailing list!

Assets 2

@jfkominsky jfkominsky released this Oct 27, 2019

v0.8: One of the biggest upgrades to PyHab since its creation. This version of PyHab adds the ability to create blocks of trials, more habituation options, and an automatic condition-creation system. The full patch notes are too long to post here, but can be found at this link.

v0.8.2 bug fixes:

  • Builder: Fixed issue where Windows users would not have the block interface open properly. (It actually would open, just minimized, which is unhelpful)
  • Builder: Fixed crash bug with data settings related to below
  • Data: Fixed options for user to choose to save a trial-level summary file (one line per trial) or block-level summary file (one line per block) or both (the default). Verbose data are saved regardless so even if one of these files is not saved, these data can be reconstructed.
  • Experiment running: Fixed issues playing end-of-trial sound when running without stimulus presentation. End-of-trial and end-of-habituation sounds now work again, for the first time since switching to SoundDevice.
Assets 2

@jfkominsky jfkominsky released this Jun 13, 2019

One of the biggest upgrades to PyHab since its creation. This version of PyHab adds the ability to create blocks of trials, more habituation options, and an automatic condition-creation system. The full patch notes are too long to post here, but can be found at this link.

v0.8.1 adds: Bug fix for creating conditions when you have a multi-trial hab block, and weird behavior by the condition system when the condition file itself has been deleted or moved. I recommend replacing PyHabBuilder.py and PyHabClass.py in any study made with v0.8 or earlier.

Installation and quickstart guide

As always, please join the PyHab announcements mailing list!

Assets 2

@jfkominsky jfkominsky released this Jun 12, 2019

EDIT: PLEASE SEE VERSION 0.8.1 FOR A BUG FIX!

One of the biggest upgrades to PyHab since its creation. This version of PyHab adds the ability to create blocks of trials, more habituation options, and an automatic condition-creation system. The full patch notes are too long to post here, but can be found at this link.

Installation and quickstart guide

As always, please join the PyHab announcements mailing list!

Assets 2

@jfkominsky jfkominsky released this Mar 19, 2019

As of this update, you need to be using PsychoPy version 3.0.6 or later. That's because some of the changes in this version only work with the most recent versions of PsychoPy, but they're big improvements.

This version is otherwise backwards-compatible with any experiment made in PyHab version 0.6 or later. Simply replace the files in the PyHab folder in your experiment folder with the files of the same name in this release.

As ever, please join the PyHab mailing list for the latest updates!

Under the hood

  • TL;DR PyHab is now much, much more efficient in its memory usage when loading and playing stimuli, which will particularly help Windows users.
  • The biggest change is in how movie files are loaded. Previously, due to issues with Pyo's 'seek' function, PyHab had to load a separate file for every single trial, duplicating the same files many times and eating a ton of memory. As of PsychoPy 3.0.6, PyHab now uses the new and outright superior SoundDevice back-end for playing sound, which means that PyHab can load each stimulus file exactly once and reset it at the end of each trial.

New functionality

  • You can now remove stimuli from the experiment library from the builder. This function will also automatically delete stimuli from the experiment folder on save (ONLY from the experiment folder, not anywhere else on your computer).
  • Added some warnings if you try to save an experiment with no trials in the study flow, or run an experiment that has no trials in it, rather than crashing with obtuse error messages.
  • Added more informative failure messages when saving an experiment fails.
  • Previously, the 'Subject ID' field would not be saved in the summary data file, it would just be part of the filename. Now it's saved as its own column in the data file (it can be removed in the data settings).

Bug fixes

  • 'Save as' with an existing experiment previously didn't copy everything correctly. It now works as intended.
  • Behavior change: If a trial didn't have an attention-getter but auto-advance was not enabled for it, the intended functionality was that the trial should just wait until the first gaze-on. This wasn't happening. Now it will.
  • Fixed crashes that would occur when aborting or redoing trials when running with stimulus presentation turned off.
  • Fixed image/audio pairs ignoring ISI.
  • Fixed image/audio pairs not saving properly.
  • Fixed an issue where PyHab would crash if you were doing a habituation experiment and had nothing following the habituation block.
Assets 2

@jfkominsky jfkominsky released this Feb 15, 2019

A very small change but an important one. If you made an experiment with version 0.7 that has a habituation block, you may need to re-make that experiment, or at a minimum delete and re-create the habituation block in the builder. Any experiment made with an earlier version of PyHab should not be affected. Apologies for the inconvenience. Otherwise, this release is fully backwards-compatible with version 0.6 or later.

Bug fixed

  • Habituation trials didn't get the memo that ISI is now trial-type-specific in v0.7. This would lead to crashes when trying to modify Hab trials, and crashes when attempting to run them as well.
Assets 2
  • v0.7
  • 22abfd6
  • Compare
    Choose a tag to compare
    Search for a tag
  • v0.7
  • 22abfd6
  • Compare
    Choose a tag to compare
    Search for a tag

@jfkominsky jfkominsky released this Jan 30, 2019

This release is backwards compatible with all v0.6 releases, just replace the "PyHabClass.py", "PyHabClassPL.py", and "PyHabBuilder.py" files in any experiment folder with the new ones and it should work seamlessly, with all new features intact.

New features and improvements:

  • The big one: PyHab is now compatible with PsychoPy3! That means you don't have to get one particular outdated version of PsychoPy anymore, you can just stay current with the latest updates. As a bonus, the upgrades that have been made in PsychoPy3 make PyHab more reliable and faster.
  • "Skip" button: You can now press "S" to skip any non-habituation trial, either before it starts or while it is ongoing. This is useful for when you want to do a calibration or other display where you don't care how long the infant looks, just want to move to the next trial on command.
  • Trial repeat indicator: When you repeat a trial, the trial number will now display "2x" "3x" etc. as you repeat, so you know how many times you have repeated it.
  • Input safeguards: PyHab now tells you when you enter the wrong kind of information into most dialogs. If you put a letter where it expects a number, you'll hear about it then instead of finding out when your experiment crashes!
  • Condition interface revamp: Rather than an unreadable mess, the condition interface now displays only 4 conditions at a time, but has a page system to allow you to see all of the conditions you have created. In addition, rather than unparsable numbers, conditions now store lists of stimulus names, so you can tell at a glance what each condition actually does.

Bug fixes

  • Fixed an issue where changing the data settings would cause PyHab to drop the subject number column.

As ever, please join the mailing list for the latest updates!

Assets 2