Submind YouTube summaries
Thumbnail for VSS 2024 -  Psychbench

VSS 2024 - Psychbench

Watch on YouTube

Video summary

The speaker introduces Psychbench, a MATLAB-based software suite built upon the PsychoToolbox framework designed to streamline the creation and execution of psychological experiments. Its primary goal is to provide a high-level interface that accelerates experiment development while minimizing computational overhead and preserving precise timing accuracy essential for visual studies. The system operates on an object-oriented architecture where every element, such as stimuli or response listeners like key presses, is represented by specific objects with defined types and customizable properties. This structure allows researchers to set parameters in degrees of visual angle or other units without needing to manage low-level code details, effectively bridging the gap between conceptual experimental design and technical implementation. To construct an experiment, users must first define a set of distinct trials using these building block objects before organizing them into a specific run order that can include repetitions and randomization. The speaker demonstrates two primary methods for achieving this: a traditional scripting approach in MATLAB involving loops to automate trial generation, and a newer visual method utilizing spreadsheet applications like Excel. In the visual workflow, researchers define each unique trial combination within table cells using property names and values; if a specific value is constant across trials, it can be entered once with column headers indicating its scope. This flexibility extends to generating complex combinations efficiently through special syntax options that automatically create all permutations of defined variables without manually listing every single instance. Recent developments have significantly expanded the capabilities of Psychbench, particularly through this intuitive visual interface which reduces reliance on explicit coding loops while maintaining full efficiency and flexibility for intricate experimental designs. The software library currently includes 36 open-source object types ranging from basic stimuli to niche inputs, but it also offers an API that allows users to write custom MATLAB code to create new stimulus objects if specific needs are not met by the existing collection. These user-created components can be seamlessly integrated into any experiment and shared with others via a centralized repository. The speaker emphasizes their commitment to continuously adding features and object types based on community requests, ensuring the tool remains adaptable for diverse research requirements while providing full documentation and tutorials for those wishing to explore its evolving capabilities further.
Read the full video transcript
so at this panel a couple years ago I introduced this software called psych bench and it's probably a pretty different audience this time around so I thought what I'd do is kind of a retake on that intro but from a different angle and also talk about developments from the last couple of years so this is just going to scratch the surface it'll be pretty Whirlwind but there's full documentation at psych.org and there's a new tutorial video there as well so the basics psych bench is mat lab software built on psych toolbox it's free to use and currently a mix of Open Source and closed source and it aims to add a highle layer for building and running experiments to make that faster and easier while being careful to minimize overhead retain timing precision and retain as much of the flexibility as possible so psych bench is object-oriented each stimulus is represented in mat lab by an object each time you want to listen for a response is another object and so on each object has a type or class and has properties depending on its type that you can set for options and parameters so for example in mat lab we could make an object of type picture using the command picture object and then we could set a property called file name using do syntax or another property called height for its height on screen and by default everything is in degrees visual angle but you can use other units as well and then maybe some properties start and end to set its timing in the trial and then we might have another objective type key press to listen for response by keyboard in the trial oh back and we could set some properties for it too and there are lots more properties depending on the object type but typically you only need to set a few to get the effect that you want and the rest you can omit to leave at default so the basic idea is that you're working at the level of experiment and stimulus Concepts while the py toolbox level is automated underneath that being said there are properties that provide a handle on the technical side if you need and you can also write code which I'll touch on at the end so objects are like building blocks as for how to put them together into an experiment there are now two ways and you can choose either one writing a script in madlab or a visual method using tables in any spreadsheet app that you like so either way the basic approach is the same two basic steps first Define a set of distinct trials for the experiment by setting the objects for each trial and by distinct trials I just mean you can omit any repetition here you just need to Define each distinct trial once and you can Define them in any convenient order and then two set a list drawing from those for the experiment to run through and here's where you would add in any trial repetition and order so super basic example let's say we want to do a Stroop experiment where each trial is going to show one of three color words in one of those three actual colors so we might test these more than once each but here we would have nine distinct trials one for each combination of word and color that we want to test and if we number those 1 through nine and if we want to run say two repetitions of each and all in random order our trial list would look something like this it's just a vector which we could generate with a mat lab expression so like I said there's a script method and a visual method the script method just at a glance this is what our stro example might look like with response by keyboard so we Define each trial by setting its objects in this case a text object and a key press and we can use four Loops to automate defining our nine distinct trials one for each combination of word and color and then at the bottom the trial list to run through and then just the command run experiment to run it so this a super basic example but hopefully it's enough to show the general idea so the visual method has been the biggest addition in the last couple of years so here you still work with property names and matlb values or Expressions but lay them out in tables using any spreadsheet app so here's what the sto example would look like done that way so the approach is the same we Define our nine distinct trials here one in each row and across columns are object property values wherever it's just one that just means the same for every trial in the table and heading rows of course specify the objects and properties being set and then in this sheet here is the expression setting the trial list just in a single cell so what we don't have here are things like for loops and other goodies you could use in matlb but the visual method has options to try to keep things flexible and efficient so just one example of an option rather than write out each of our nine combinations of word and color like this we could write just the three distinct values in each column and then put a star here for those columns to tell psych bench to generate trials for all combinations so 3 * 3 equal 9 combinations so this is equivalent to what we had before now this is just an option we could also spell out the nine trials for clarity like we had that would be fine I just want to show it as an example of the kind of options that are available and there are lots of other options and they can be really useful for actual complex experiments not like this one so to use this we would save or export to an Excel file and then in Matlab use the command load experiment to load that and then once that's in it's the same as before so just the command run experiment to run it and that is the visual method in a nutshell so I'll just put a few key features up on the screen these are just some there's a a more complete list on the website there's also a change log on the website so if you're interested you can see the kinds of prog the kinds of progress happening over time and as for object types for stimuli and subject input currently there are 36 in the library ranging from basic to pretty Niche all these object types are open source and there's an API for making new object types so if a certain kind of stimulus you need isn't in the library you can write matlb plussy toolbox code for it and then using the API it will click into your library and then you can use it anywhere in any experiment or share it with other people if you want that being said I'm always adding to this library and I want it to have a lot more object types in the future so I'm very happy to receive requests that's actually really help and actually fleshing out the library more is something I'll be especially focusing on in the immediate future and that's it I'll leave it there thanks