A PEBL in the neuroscience sea

If you’re a psychology or neuroscientist, part of your job likely involves conducting experiments for research or clinical purposes. Unfortunately, the most common software tools used to create experiments typically require restrictive and expensive licenses. Not PEBL, however. This seven-year-old special-purpose programming language lets psychologists and neuroscientists create, modify, run, and share computer-based experiments.

The Psychology Experiment Building Language is also useful in the Psychology classroom, because it lets instructors and professors distribute tests to students or set them up in a computer lab so that students can experience firsthand the research paradigms they read about in a textbook. It includes special-purpose functions that make it easy to create visual stimuli, collect responses, randomize and counterbalance experimental designs, and record data.

PEBL is available on Windows, Linux, and Mac OS X. It bundles a set of experiments and tests in the form of the PEBL Test Battery that provide free implementations of many classic studies from cognitive and clinical neuropsychology. PEBL and the PEBL Test Battery have been used by researchers around the world, ranging from clinicians in their own offices to laboratories at Ivy League universities to government labs, including NASA and NIH.

Shane Mueller, a cognitive scientist and research psychologist who works in Dayton, Ohio, created and maintains PEBL. It’s a full-fledged programming language, heavily influenced by LISP and R, and written in C++, using the Standard Template Library and, increasingly, PEBL itself. It uses a parser/lexer created with Bison and flex, which gives PEBL a lot of flexibility in experimental design.

PEBL compiles text files to a parsed tree of executable nodes, and then executes that tree to run the experiment. It heavily leverages the SDL gaming libraries (including SDL_ttf, SDL_image, SDL_gfx, and SDL_net) to help provide simple creation and manipulation of stimuli. It is designed to be forgiving for beginner users (who are often graduate students in psychology) and to avoid many subtleties that create problems in other programming languages.

One script in the package allows you to collect survey data without working with PEBL code at all. You specify the survey questions in a .csv file, and the software runs the questions and saves the results in data files for you. “This turns out to be much easier than paper-and-pencil surveys that researchers still use frequently,” Mueller says, “because you don’t have to hand-code your data after you are done.”

Why make the software open source when similar applications are making money as proprietary tools? “I felt the community was turning over the keys to the scientific kingdom to vendors whose best interest was in keeping the doors locked,” Mueller says. “This, to me, is anti-scientific, because it means that you can’t share your experiments easily, unless the person you are sharing with buys the license. And you can’t check others’ experiments for errors, which is especially true for boutique companies that sell special-purpose test batteries. Plus, if your license lapses for whatever reason, you don’t have access to your own past experiments. Data are not much good if you can’t reproduce the conditions under which they are collected.”

Mueller chose to host on SourceForge.net because “it provides a level of permanence that hosting on your own site cannot, and a level of independence that hosting at a university cannot. Plus, SourceForge offers a number of useful tools (mailing lists, wiki, CVS, web hosting, etc.) to help a grow a community around a piece of software.”

In the next version of PEBL, Mueller plans to work on support for various devices and trigger mechanisms that researchers use to link their experiment software with hardware such as eyetrackers, response buttons, and EEG systems. He makes new releases of the core software about once a year, with releases to the test battery coming about twice a year. He welcomes help with translations. “Many of the experiments I distribute can be localized into different languages, and researchers do this, but I don’t get many translations contributed back to the project.”

He’d also like help with validation studies. “One of the biggest obstacles researchers face when considering PEBL Battery tests is that there are currently only a few published studies showing performance distributions of typical research participants in these specific tasks. This is improving, with ongoing studies collecting norms for different tests, but it is really an ideal setting for open source collaboration, where researchers from multiple sites, world-wide, can contribute small studies to a large pool so that better norms can be developed.”

If you’d like to help with the project, e-mail the pebl-list or pebl-norms list.

Quamachi: The VPN GUI with the funny name

Need to connect to a remote client securely and simply? One way to do that is to employ Hamachi, a zero-configuration VPN service. While zero configuration sounds pretty easy, you can make things easier still by using Quamachi, a Hamachi GUI for Linux.

Once installed, Quamachi checks to see if the Hamachi system service is running, and prompts the user to start it if necessary. After that, users can control Hamachi via both Quamachi’s menus and the right-click functionality of its network/peer list box.

Together, Hamachi and Quamachi let you access VPNs via a mature GUI, browse remote Samba fileshares, remotely control systems via SSH and VNC, and flexibly choose optional dependencies.

Australian developer Chris Giles created Quamachi more than three years ago to fill a void that was slowing him down. “Back then I could find only a couple of other Hamachi GUIs for Linux. One of them sucked and the other wouldn’t even load.

“I wrote Quamachi in Python because I’m a fan of its minimalist syntax. KDE has always been my preferred desktop environment, and I knew that my applications would remain relatively small, so the Qt GUI toolkit was the perfect fit. I simply needed to fork and remodel the Q7Z source code, which uses the PyQt v4 bindings. These have proven to be reasonably stable over the years. PyQt is particularly suited to applications that need an attractive GUI and aren’t very resource-intensive.”

Giles just released a new version of Quamachi to correspond with a new version of the underlying software. “I recently realised that Hamachi had pulled v1 from its website and replaced it with a v2 release. I quickly added basic Hamachi v2 support into Quamachi and rushed v0.4.5 out the door a few days ago. Hamachi v2 brings several new features to the table, and upcoming releases of Quamachi will focus on supporting these and providing changes that accord with feedback received from users.”

Expect great script automation from expect-lite

expect-lite is an quick and easy command-line automation tool that’s designed to directly map an interactive terminal session into an automation script. You can create basic expect-lite scripts by simply cutting and pasting text from a terminal window into a script, and adding “>” and “< " or other special character to indicate the action. Because the software ignores any line that does not begin with a special character, any screen log can be turned into a script in the matter of seconds.

Expect-lite is targeted at the verification testing environment; it produces a pass/fail result at the end of the script. However, its use is not limited to this environment. The tool is written in the Expect scripting language, but it requires no knowledge of Expect. In fact, it's so simple it takes no more than five minutes to learn.

Developer Craig Miller created expect-lite after leaving a job where he worked with a proprietary automation language. "I wanted to use a more standardized language like Expect, but it uses just too many curly braces, and it is easy to create cryptic code, which is hard to debug. I wanted to create a simple language that focused on getting the job done, rather than making users spend hours learning and debugging. Expect seemed like a good place to start.

"After three years of using expect-lite heavily at my job, I was able to convince management to open-source the software. I chose SourceForge for hosting, because at that time (and still today) it was the premier open source hosting site."

Although expect-lite follows the keep-it-simple principle, Miller has added features over the years, many of them suggested by users, giving it the power to solve just about any automation problem. One trick he suggests is to use -vv to enable debug logging.

While the software contains an Integrated Debugger Environment, Miller says it doesn’t see much use by the community, and could stand improvement. If you’d like to help with the project, or have a suggestion for improving the software, the best way to get in touch is via email.