Psychtoolbox interfaces between Matlab or Octave and the computer hardware. The PTB core routines provide high performance 2D and 3D graphics with the highest color and luminance precision, timing precision and control. This both on standard displays, as well as with special visual stimulators, and with High Dynamic Range displays, and with a wide variety of Virtual/Augmented Reality devices. They expose raw OpenGL commands, support video playback and capture, as well as low-latency precisely timed audio playback and capture. They facilitate the collection of observer responses with high timing precision via various input modalities like keyboard, mouse, game controllers, multi-touch touch screens, response boxes, gaze trackers, and digital / analog i/o equipment. Ancillary helper routines support common needs like color space transformations, calibration, and psychometric procedures like, e.g., the QUEST threshold seeking algorithm and others.

Various 3rd party frameworks and higher level toolboxes are built on top of Psychtoolbox to make implementation of research data collection especially easy in specific sub-domains of neuroscience. For beginners or certain domains there also exist user friendly 3rd party graphical user interfaces, e.g., PsyBuilder.

You can also run some of your Psychtoolbox studies online, via VPixx Labmaestro service under https://vpixx.com/products/labmaestro-packngo.

Psychtoolbox has many active users, an active forum, and is widely cited. The current version supports at least Matlab R2023b on Linux, Windows and macOS, and Octave 5 and later on Linux, Octave 7.3 on Windows, and Octave 8 on macOS.

Psychtoolbox News

Psychtoolbox updated

kleinerm

Psychtoolbox 3.0.19 update “Eyegazer” was released at 18th May 2024. As usual, the complete development history can be found in our GitHub repository. The release tag is “3.0.19.11”, with the full tree and commit logs under the URL:

https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/3.0.19.11

Some of this Psychtoolbox release was sponsored by Mathworks under the year 2023/2024 contract..

Our partner SR-Research, makers of the Eyelink gaze trackers, sponsored the major 2024 Eyelink toolbox update.

Compatibility changes wrt. Psychtoolbox 3.0.19.10:

  • None expected. But possibility due to massive Eyelink toolbox changes.

Highlights:

  • Big Eyelink toolbox update by SR-Research with the most massive improvements in over a decade.

All:

  • Release of the new Eyelink toolbox. This is the biggest update of the Eyelink toolbox for Eyelink gaze trackers from SR-Research since over a decade! Most of the work was done by the team at SR-Research. Credits to Brian Richardson, Marcus Johnson, and Kurt Debono. Additional 88 hours of my work time were sponsored by SR-Research, to provide code review, feedback and advice on improving the integration while maintaining backwards compatibility, and code improvements. Among many other improvements, the new Eyelink toolbox can integrate better with PsychPortAudio for playing feedback sounds during tracker calibration, and it can use dynamic animated calibration targets by playing back movies. Upload of backdrop images to the tracker host computer is possible. Stereoscopic/Binocular display modes of Psychtoolbox are now supported for use with the gazetracker. Many new functions have been added to improve ease and efficiency of use. A new set of demos demonstrates efficient use and best practices with the new toolbox. Legacy functions should be still supported for backwards compatibility, but many legacy demos have been removed. The toolbox has been carefully tested by SR-Research on all supported operating systems, so we hope this major update will go without major problems. Thanks to our partner SR-Research for this contribution and the team at SR-Research for good collaboration!

  • CedrusResponseBox(): Disable any flow control. It was supposed to use hardware flow control (FlowControl=Hardware), but that did not work until PTB v3.0.19.6 due to an IOPort parameter handling bug. Since the bug is fixed, hardware flow control would be used. This was supposed to make Cedrus to work more robust, but it apparently had the opposite effect, as the following PTB forum message suggests:

    https://psychtoolbox.discourse.group/t/waiting-forever-for-data-transmission-with-cedrus-rb/5319

    Disable flow control explicitely, to revert to pre 3.0.19.6 behaviour, where Cedrus boxes worked as well as they could.

    If this fixes the bug though, that means my original opinion about the quality of Cedrus hardware - or the lack thereof - would be true, and the fragile communication was not caused by our IOPort driver bug, ie. by lack of hardware flow control. Let’s see…

  • ImagingStereoMoviePlayer.m: Also handle top-bottom stereo encoded movies.

Linux:

  • Psychtoolbox was built and lightly tested against Matlab R2023b.

  • Fix most basic compatibility with Ubuntu 24.04.0-LTS. Extensive compatibility testing with Ubuntu 24.04-LTS is still outstanding.

  • Fix Matlab R2020 - R2024a plotting on Intel graphics. After this Matlab bug being reported to Mathworks and going unfixed for multiple years, I decided to cave and add a workaround to PsychLinuxConfiguration(). It will add some config option during post-install to Matlab’s Java JOGL OpenGL interface, to avoid use of OpenGL ARB contexts. This works around the Matlab bug and makes Matlab’s graphics and plotting functions work on Intel graphics chips.

  • Refine PsychCV’s Apriltags implementation. Make sure that if the same marker is apparently detected multiple times in an image, that then the detection with the lowest hamming error and highest score is returned, so good detections can’t override false positive noise. Allow limiting the number of markers used from a tagFamily, so one can select tag families whose total marker count would cause a very high memory consumption, leading to out-of-memory errors on machines with even 8 GB of RAM, or very long startup times, by only using a subset of markers. Allow to select more tuning parameters for marker detection. Suppress useless debug output.

  • Screen(‘OpenVideoCapture’): Allow to disable videorate converter during recording.

Windows:

  • Psychtoolbox was built and lightly tested against Matlab R2023b.

  • PsychPortAudio: Use auto samplerate conversion under WASAPI shared mode with reqlatencylcass 0 or 1 (the default). This should allow to request arbitrary audio sample rates, as the operating system should perform proper sample rate conversion. Should automatically fix issues like the following:

    https://psychtoolbox.discourse.group/t/ptb-thinks-usb-sound-card-doesnt-support-44100hz/5324

    For now this is only implemented for Octave, not yet Matlab, until it can be tested a bit more.

macOS:

  • Psychtoolbox was built and lightly tested against Matlab R2023b and Octave 8.4 from HomeBrew. It also works on the new Octave 9.1 from HomeBrew

Enjoy!

VSS 2024 Satellite on Psychophysics Software with Matlab

kleinerm

Next Monday at VSS 2024, there will be a satellite event about “Psychophysics Software with Matlab”, organized by Mathworks. Among other things, it will involve:

  • A remote presentation by Celia Foster about the latest news wrt. Psychtoolbox since the last such event in 2022, and I will also participate remotely in the Q & A part of the event.

  • VPixx will present some Psychtoolbox related solutions of theirs, as far as I know.

  • Giles Holland will present about progress with his high-level toolbox PsychBench on top of Psychtoolbox.

The Psychtoolbox session should be interesting for users of Apple Silicon Macs, and to those who still want to have a Psychtoolbox around in the next year.

This year, Mathworks chose a title for the satellite that might actually attract an audience bigger than the 8 or so people that showed up last time. I hope my announcing it here a few days in advance instead of an hour in advance will also help ;).

https://www.visionsciences.org/2024-psychophysics-satellite/

For reference, Celia’s past presentation from VSS 2022 can be watched here:

https://www.youtube.com/watch?v=afKbkOx62dQ

-mario

Psychtoolbox beta updated

kleinerm

Psychtoolbox 3.0.19 Beta update “Bitty Bits” was released at 26th March 2024. As usual, the complete development history can be found in our GitHub repository. The release tag is “3.0.19.10”, with the full tree and commit logs under the URL:

https://github.com/Psychtoolbox-3/Psychtoolbox-3/tree/3.0.19.10

Compatibility changes wrt. Psychtoolbox 3.0.19.9:

  • None.

Highlights:

  • None, just bug fixes and minor improvements, and Octave 9.1 on macOS support.

All:

  • PropixxImageUndistortionThrowaway.m: Fix stupid bug. Don’t close the onscreen window and then try use it again afterwards!

  • Fix wrong definition of glPathGlyphIndexRangeNV().

  • Sound input demos: Allow specification of number of input channels. For BasicSoundInputDemo and DelayedSoundFeedbackDemo, allow to specify the number of inputs, to also deal with sound cards which only provide one mono input channel. Continue to default to 2 stereo channels.

  • Various internal cleanups with no immediate user facing benefit.

Linux:

  • Psychtoolbox was built and lightly tested against Matlab R2023b.

  • Screen: Fix idiotic bug in Screen('GetFlipInfo') there since day 1! If a query for a flip info struct was made, but no new struct was available, the function errored out, instead of returning an empty [] return argument!

    This was not ever noticed due to the way our only test scripts for this PerceptualVBLSyncTestFlipInfo2 had try-catch-end statement placed just so that the error was swallowed and never showed up!

    Fix this properly by returning an empty [] return argument in this case, as expected.

Windows:

  • Psychtoolbox was built and lightly tested against Matlab R2023b.

macOS:

  • Psychtoolbox was built and lightly tested against Matlab R2023b and Octave 8.4 from HomeBrew. It also works on the new Octave 9.1 from HomeBrew

  • Enable use with the brand-new Octave 9.1.0 from HomeBrew.

Enjoy!

News Archive