Psychtoolbox interfaces between Matlab or Octave and the computer hardware. The PTB core routines provide access to the display frame buffer and color lookup table, reliably synchronize with the vertical screen retrace, support sub-millisecond timing, expose raw OpenGL commands, support video playback and capture as well as low-latency audio, and facilitate the collection of observer responses. Ancillary routines support common needs like color space transformations and the QUEST threshold seeking algorithm.

Psychtoolbox has many active users, an active forum, and is widely cited. PTB-3 is based on the deprecated Psychophysics Toolbox Version 2 with its Matlab C extensions rewritten to be more modular and to use OpenGL on the back end. The current version supports Matlab R2012a+ and Octave 3.8 and later on Linux, and Octave 5.1.0 on MacOSX, and Windows.

Psychtoolbox News

Psychtoolbox beta updated

kleinerm

Psychtoolbox 3.0.17 Beta update “Dynamically High!” SP6 was released at 19th December 2020. As usual, the complete development history can be found in our GitHub repository. The release tag is “3.0.17.6”, with the full tree and commit logs under the URL:

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

:christmas_tree: Ho Ho Ho! :christmas_tree:

The most noteworthy improvements about “Dynamically High!” are that it contains initial support for “High Dynamic Range” displays for visual stimulation (HDR) on Linux and Windows-10, sponsored by VESA (Read the press release by clicking this link), and a new installer and updater for use with Matlab, sponsored by Mathworks, which should hopefully especially help the less fortunate - people who are forced to use Apple macOS. This is also the first release supported under our new business model, and the first release built and at least somewhat tested under macOS Catalina 10.15.7 final.

SP6 is a release with bug fixes, workarounds for Apples broken macOS Catalina operating system, and smaller incremental improvements. See the previous release announcements for the 3.0.17 series for the major features.

The most interesting improvement in SP6 is basic support for stereo HDR stimulation on dual HDR display monitor setups under Linux.

All systems

  • Fixes and improvements to the Python support, contributed by Alex Forrence (GitHub users @aforren1) - Thanks!
    • DLL runtime libraries misplaced on Windows after package restructuring.
    • NumPy now gets installed automatically in a suitable version, as it was added as dependency.
  • More code cleanup and deletion of obsolete/long dead and unused code and functionality.

  • All Octave mex files will now be stripped of the most verbose debug symbols. This drastically reduces the size of many Octave mex files, so this Psychtoolbox should shrink considerably in download size / disk space despite new functionality. Some other big binaries related to the no longer supported Ubuntu 14.04/16.04 LTS were deleted for further space savings.

  • Quite many Docs and help text updates.

  • Various minor improvements to HDR support on Linux and Windows:
    • SimpleHDRDemo: Hide distracting mouse cursor.
    • ImagingStereoMoviePlayer: Fix text drawing and add basic HDR stereo movie playback support.
    • PerceptualVBLSynctest: Add another way to visually check for dual-display video refresh sync, e.g., for stereo setups.
    • HDRViewer: Fix initial mouse cursor positioning on multi-display HDR setups.
  • Performance enhancements to drawing of our startup Welcome Screen. The logo can now also be automatically scaled down when running on low-resolution displays.

Linux

  • Make PsychHID on Linux robust against touchscreens that claim to be keyboards on the MS Surface Pro 6 tablet (ipts touchscreen!). GetKeyboardIndices() will no longer enumerate such touch screens as dysfunctional keyboards. PsychHID will reject similar weird devices in the future, even if they don’t get filtered out by GetKeyboardIndices() iow. future proofing.

  • Have special format handling for Video4Linux2 devices which provide video in MJPEG format.

  • Fix rejection of AMD DCN-2 / Navi gpu family gpu’s for low-level mmio access.

  • Rebuilt the drawtext plugin for 32-Bit ARMv7l architecture, ie. the RaspberryPi, to add so far missing support for underlined text drawing.

  • XOrgConfSelector: Recommand CTRL+ALT+F3 instead of CTRL+ALT+F1 in case of display server startup failure, as Ubuntu 20.04-LTS uses the VT1 (F1) for the login manager / lock screen, so VT3 (F3) is a better choice for a text console if troubleshooting is needed.

  • XOrgConfCreator: Provide improved setup instructions for 10 bpc / depth 30 deep color support: Update to cover the fact that AMD Navi+, Raven Ridge+ and other 2018+ gpu’s with DCN display engine are no longer supported by our low-level MMIO hacks for 10 bpc+ framebuffer precision, but instead the standard xorg.conf depth 30 setup should be used to the same effect with higher performance, just as on Intel and NVidia graphics cards. The low-level hacks could be implemented on more modern gpu’s but there isn’t any practical need or benefit for that anymore, at least not as of PTB 3.0.17.

  • PsychVulkan now supports improved visual stimulus onset timing and timestamping via Vulkan driver native support on suitable drivers. This makes use of the VK_GOOGLE_DISPLAY_TIMING extension when available.

  • PsychVulkan can now also optimally work with Intel graphics chips on Linux, as has been tested with a prototype Mesa branch for OpenGL+Vulkan interop. This is not yet available as part of standard Linux distributions, but when they are ready, we are ready! Vulkan is not yet supported in a usable way for us on MS-Windows.

  • Add new experimental PsychImaging task for HDR: PsychImaging('AddTask', 'General', 'UseStaticHDRHack'); enables use of a new hack that only works on Linux with classic X11 X-Display X-Server, not on Linux+Wayland and not on other operating systems. This allows dual-display stereo presentation of HDR-10 stimuli, ie. with stereomode 4 or 5 “Dual display stereo”, also single-display or multi-display use of this mode, e.g., for frame-sequential stereo presentation of HDR stimuli, or “display wall” multi-HDR-monitor setups. Normally our HDR display support is currently restricted to one HDR monitor per onscreen window, no multi-monitor HDR stereo setups. This hacks makes this work in a limited fashion, as described in the PsychImaging help.

    • A new SimpleHDRLinuxStereoDemo.m shows stereoscopic HDR stimulus display on a dual-HDR-monitor setup.
    • ImagingStereoMoviePlayer shows stereoscopic HDR movie playback as a new optional playback mode.
    • For performance benchmarking of HDR playback, the option to select this hack was also added to PlayMoviesDemo.

Windows

  • Special case handling for Microsoft Surface tablet’s builtin video cameras.

  • Support new mfvideosrc “Multimedia Foundation” capture plugin.

  • Minor video capture improvement: Use device monitors / device providers.

macOS

  • SetupPsychtoolbox: Handle latest Apple macOS Catalina+ brain-damage. Apples Catalina trainwreck needs special treatment. If Psychtoolbox has been downloaded via a webbrowser as a zip file or tgz file and then extracted, then all binary executable files like .dylib’s and .mexmaci64 mex files will have the com.apple.quarantine attribute set to prevent them from working in any meaningfully user fixable way - Thanks Apple! Use the xattr command to remove the quarantine flag.

  • Delete memcpuCudaOpenGL for macOS. It’s dead since Apple decided to drop support for NVidia gpu’s - and thereby CUDA - from their “Most advanced operating system in the world”.

  • PsychtoolboxPostInstallRounte: Deal with another Apple macOS Catalina SDK screwup: Since we are now building Screen() for macOS against 10.15 Catalina with the Catalina SDK we hit a new bug in Apples low-quality software. Apparently when built against the Catalina SDK, but running on older macOS versions than Catalina, then OpenGL rendering into a hidden window (via Preference ‘WindowShieldingLevel’ -1) is broken and triggers GL_INVALID_FRAMEBUFFER_OPERATION_EXT errors. The same works perfectly fine - as expected and tested before release - on Catalina itself. This caused error abort in the fontconfig cache rebuilt code which opens a hidden onscreen window when run under < Catalina. The bug is known to happen at least on 10.14 Mojave, 10.13 High Sierra, and 10.12 Sierra, so probably going back through all older macOS versions. Work around it by suppressing OpenGL error checking during this OpenWindow sequence, as we do not actually need rendering to work here. Work time spent to diagnose and workaround this bug which is again like almost all macOS issues fully Apples fault: 5 hours. Thanks Apple!

  • Note in help GStreamer that movie playback and high quality text rendering on macOS now also needs GStreamer 1.18 at a minimum, 1.18.2 is recommended.

  • Refine reporting of OS support status in Screen() startup and Screen(‘Computer’): Report everything before Catalina as untested and unsupported. Report everything beyond Catalina, ie. macOS 11+, as not yet tested or supported. As of now, i very rarely and infrequently spot-check stuff on my old 10.13.6 High Sierra system under some Matlab version. Given 10.13’s end of life and age of that machine, this won’t happen often anymore. Also testing Octave 6.1 on 10.13 is just too painful going forward, now that HomeBrew no longer provides Octave bottles for 10.13 and source build just takes way too long – like a dozen hours!

Psychtoolbox beta updated

kleinerm

Psychtoolbox 3.0.17 Beta update “Dynamically High!” SP5 was released at 6th December 2020. As usual, the complete development history can be found in our GitHub repository. The release tag is “3.0.17.5”, with the full tree and commit logs under the URL:

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

The most noteworthy improvements about the original “Dynamically High!” relesae are that it contains initial support for “High Dynamic Range” displays for visual stimulation (HDR) on Linux and Windows-10, sponsored by VESA (Read the press release by clicking this link), and a new installer and updater for use with Matlab, sponsored by Mathworks, which should hopefully especially help the less fortunate - people who are forced to use Apple macOS. This is also the first release supported under our new business model, and the first release built and at least somewhat tested under macOS Catalina 10.15.7 final.

What’s new in the Santa Claus update?

SP5 is mostly a release with bug fixes and smaller incremental improvements on top of that. See previous release announcements for the 3.0.17 series for the major features.

The major change is cancellation of support for Octave versions other than Octave 6.1 on Microsoft Windows and Apple macOS. If you use Octave on these systems, you must upgrade your Octave to the new version 6.1. macOS users of HomeBrew can do a brew update and brew upgrade to achieve this, followed by launching octave and running cd(PsychtoolboxRoot); SetupPsychtoolbox; Ditto for Windows users, after downloading and running the new installer from Octave’s website.

All systems

  • Lots of code cleanup and deletion of obsolete/long dead and unused code and functionality.

  • Octave mex files will now be stripped of the most verbose debug symbols. This drastically reduces the size of many Octave mex files, so this Psychtoolbox should shrink considerably in download size / disk space despite new functionality.

  • Convert EyelinkToolbox demo images from BMP to space saving JPEG for lower disc space consumption.

  • Docs and help text updates.

  • Make Postinstall routine more robust against fontconfig cache rebuild failures.

  • SimpleHDRDemo: No longer use .hdr demo image file from Matlab image processing toolbox. We don’t want to require an extra toolbox just for a sample image, when we ship our own set of free images!

  • PsychDataPixx(‘Verbosity’, 7) now allows logging of all actual calls to the Datapixx mex file for enhanced debugging of issues with VPixx hardware.

  • Add PsychContributed/Eduloggers: Simple Edulogger support. Contributed by Todd Parsons (@TEParsons) under MIT license, thanks! This is unmaintained and untested code, as it was partially rewritten to reach the minimal quality standard of PTB by Mario Kleiner, but could not be tested after the rewrite due to lack of Edulogger hardware. Hence the location in the PsychContributed folder for the time being, instead of proper placement in the PsychHardware folder.

  • Support the brand new GNU/Octave 6.1 on Windows, macOS, and future Linux distribution releases via NeuroDebian and upstream distribution Octave and Psychtoolbox packages. Cancel support for Octave 5 on Windows and macOS. Octave 6 has various improvements relevant to us, e.g.,:
    • Improved GUI, editor etc.
    • HiDPI per monitor scaling on Windows-10, which makes the UI nicer on HiDPI/Retina displays and should allow visual stimulation timing being less affected on mixed DPI setups under Windows (untested, that is the theory).
    • Supports the webread()/webwrite() family of functions for RESTful api’s. This allows, e.g., to now support Eduloggers under Octave.
    • Supports handles to nested functions. This allows, e.g., the following improvements to various fitting functions in Psychtoolbox.
  • Octave 6.1 and later now supports function handles to nested functions, and its ‘optim’ optimization toolbox supports fmincon() and some other non-linear optimization functions. This enables us to support some parts under Octave 6 which were so far not functional: Various new monitor calibration / gamma fitting routines used / supported by FitGamma(), Some psychometric fitting procedures like, e.g., FitCumNormYN() and FitWeibXXX Weibull function based fitting functions, as well as FitNakaRushton(). Additionally LjgToXYZFun() for color space conversions and FitConeFundamentalsWithNomogram(). Basically all functions that would utilize the Matlab optimization toolbox’s fmincon() and fminunc() solvers.

Linux

  • Make PsychHID on Linux robust against touchscreens that claim to be keyboards on the MS Surface Pro 6 tablet (ipts touchscreen!). GetKeyboardIndices() will no longer enumerate such touch screens as dysfunctional keyboards.

  • Fix PsychtoolboxVersion() for NeuroDebian installations.

  • MultiTouchDemo and MultiTouchMinimalDemo allow selection of target touchscreen to display on. Suggested by @iandol.

For Octave 5 on Ubuntu 20.04-LTS and similar modern Linux distros only so far:

These features will be provided in a later update for Ubuntu 18.04-LTS and Octave 3.8/4.0/4.2 and for Matlab.

  • Have special format handling for Video4Linux2 devices which provide video in MJPEG format.

  • Fix rejection of AMD DCN-2 / Navi gpu family gpu’s for low-level mmio access.

Windows

  • Switch required and supported Octave version from Octave 5.x to the brand-new Octave 6.1.

  • Special case handling for Microsoft Surface tablet’s builtin video cameras. Only on Octave 6.1, Matlab to follow later.

  • Support new mfvideosrc “Multimedia Foundation” capture plugin. Only on Octave 6.1, Matlab to follow later.

  • Minor video capture improvement: Use device monitors / device providers. Only on Octave 6.1, Matlab to follow later.

macOS

  • Switch required and supported Octave version from Octave 5.x to the brand-new Octave 6.1.

  • Minor video capture improvement: Use device monitors / device providers.

Psychtoolbox now offers priority support, community membership and more!

kleinerm

https://www.psychtoolbox.net

Have you got some leftover funds in your lab’s budget and wonder how to spend them before Christmas? Wonder no longer, we can help!

As many of you know, for over 15 years Psychtoolbox for Matlab and the free GNU/Octave has been primarily developed by Mario Kleiner, with almost no support for his efforts. Over this time, not only Psychtoolbox’s popularity and functionality, but also the required workload, has greatly increased, requiring his full time commitment.

Given the urgency of this issue, some years ago an event was held at VSS to discuss how to improve the sustainability of Psychtoolbox, focusing especially on the financial situation. Additionally a user survey was conducted during the years 2016 to 2018, asking labs about their willingness to financially support Psychtoolbox development. Out of 1270 responses of individual labs, 417 labs (~33% of all responses) stated they would certainly contribute financially if invoices could be provided [1]. That was very encouraging and we have now made this possible!

Since 2018, Psychtoolbox and Mario Kleiner have found a new home in Medical Innovations Incubator GmbH, which supports early-stage companies in the area of life sciences with know-how and methods. Since then, Mario and the incubator have together developed a concept for commercial support and services which will allow Mario to continue Psychtoolbox development.

Here we would like to introduce the outcome of this work with our companion website, https://www.psychtoolbox.net , detailing the options available for labs, companies and individuals to support the Psychtoolbox project.

In particular, we want to point labs to the ability to purchase a yearly membership for paid priority support. At a modest price of 150 Euros per year (+ VAT), this provides labs with fast expert advice and help for questions and problems related to Psychtoolbox and its surrounding ecosystem, in addition to supporting the future maintenance and development of Psychtoolbox and the software it depends upon. E.g., Mario also improves the open-source Linux operating system to make it even more suitable for experiments requiring high precision, performance, flexibility and robustness. He also develops workarounds for bugs in proprietary operating systems like Apple macOS and MS-Windows. All of this work additionally benefits other neuroscience toolkits, especially ones which use parts of Psychtoolbox as their underpinning, e.g., PsychoPy.

Additional options include contracting us for development and improvement of specific Psychtoolbox or Linux features which are vital for your experimental needs [2]. We also offer product integration partnerships for companies which manufacture and sell neuroscience products.

Lastly, for a small fee, individuals can become community members - essentially a small donation. You can also buy Psychtoolbox swag (from t-shirts, hoodies and mugs all the way to teddy bears) in the swag shop, where a fraction of the proceeds will go to support Psychtoolbox.

We hope that through https://www.psychtoolbox.net labs, companies and users can find the right support or partner program fitting to their individual needs, and can find a way to contribute to Psychtoolbox development and maintenance. As is the case with many open source projects, we depend on your support to keep the project viable and moving forward. We hope that we are now able to offer you viable and mutually beneficial ways of financially contributing to the project.

Please also contact us at https://www.psychtoolbox.net if you would like to discuss other options, or if you run into any problems with the purchase process.

As a recent example of the exciting new features added to Psychtoolbox, including High Dynamic Range support, that keep Psychtoolbox as the foremost option for demanding neuroscience and beyond, click this link to see what is new in the recent Psychtoolbox 3.0.17 release: https://psychtoolbox.discourse.group/t/psychtoolbox-3-0-17-beta-update-dynamically-high-released/3489

Your continued support will allow continuous progress, as well as maintenance, to ensure your code keeps working on old and new hardware and operating systems, and for exciting new paradigms to become possible over the years to come.

Rest assured: Psychtoolbox itself will remain open source software and will continue to be available for free.

Thank you for your time and support, The Psychtoolbox team

[1] Another 635 labs (~50%) responded that their support would depend on the specific payment or business model behind Psychtoolbox. If you are one of these labs and none of our current options are suitable for you, please get in touch with us at https://www.psychtoolbox.net

[2] A few examples of our happy contract work customers so far are PsychoPy for substantially improved audio, timing and response collection functionality; Denis Pelli for fixing severe issues with Apple macOS for visual stimulus timing and response collection; and the VESA industry consortium for High Dynamic Range display support (see https://vesa.org/featured-articles/vesa-funds-development-of-new-video-compression-test-tool-for-high-dynamic-range-displays/ for their press release).

News Archive