# How can I create computer based psychology experiments using OS X?

I've used E-prime to create computer based psychology experiments (you know, the kind where you for example show a number of pictures to the participant and record their responses to them, for example keypresses) for Windows. However, I'd now like to create similar experiments in OS X.

If I search Google for this, I find a couple of different hits but it's hard to evaluate the quality of these programs. What's a good program to use for this purpose?

-
Good question! I mostly use E-Prime on PC, so I am not sure, but more and more people seem to be using python and writing code "from scratch" and I've heard good things about PsychoPy – Dan M. Feb 28 '12 at 13:25
To note: PsychoPy doesn't require you to write code from scratch, but its capabilities are greatly expanded by doing so. (Disclosure: I haven't actually used it). – Jeff Feb 28 '12 at 23:58
A professor recently told me that python was "the industry standard" for stimulus presentation. Though I have heard R is better for running advanced statistics. – user1056 Aug 14 '12 at 21:59
You should specify whether you need psychophysics-level precision timing, or whether you just want to present stimuli. If it's the latter, then flash and all sorts of other roll-your-own solutions are fine. If it's the former, then you probably want something like psychopy, where the designers have already done a lot of the testing and the low-level black magic necessary to get precision timing of stimulus display and responses. – octern Nov 13 '12 at 18:46

My research group has gone pure python for coding experiments; we've been burned too many times by glitches and implicit behaviour in boxed experiment-building software to bother trusting it. Moving from a point-and-click experiment design interface to pure code does have a large learning curve, and you want to be careful to model your own code on well validated code from others (esp. for ensuring that you're implementing timing properly, which can be nuanced).

It may be tempting to hire CS students to code your experiments, but the danger there is they don't come to the table with the same experimental design background as you do and we've encountered some implementation errors as a consequence (ex. failing to check for input during dead time between stimulus presentation, etc).

While I recognize and indeed support the push to specialization in cognitive science, I do think that in the same way that we require all researchers to have a bit of background in statistics, we should also require all researchers to have a bit of background in coding, not least because it helps engender a mindset amenable to considering formal models of mind.

-
Here's a zip of one of my moderately well-commented experiments: filedropper.com/castforweb – Mike Lawrence Feb 28 '12 at 17:44
Yet another addendum: the code I linked is very much written in a procedural style rather than an OOP style. This is because I find OOP unnecessary for the simple stuff I tend to do and find it takes a little more effort (both coding and planning) to do fully OOP experiments. Possibly just a personal quirk though. – Mike Lawrence Feb 28 '12 at 18:34
@ArtemKaznatcheev I haven't empirically tested things myself, but I've been told by sources I trust that web-based RT collection isn't reliable. However, it's easy enough to take a python script and create a stand-alone app (or exe) using py2app (or py2exe) that your participants can download. – Mike Lawrence Mar 11 '12 at 18:09
@Mike : Any plans of creating a open-source python project(aimed at replacing e-prime or such)?? I am a python programmer, have some experience with eye-tracking experiments and would be happy to contribute to such an effort. – Software Mechanic Apr 17 '12 at 17:28
@AnandJeyahar You should check out PsychoPy (psychopy.org) and OpenSesame (cogsci.nl/software/opensesame) two free software approaches that are what you are looking for. The only thing missing is a nice implementation of questionnaires and other simple item types. But I have some ideas based on PyQt4 and webkit. Let me know if you are interested in doing something. – Henrik May 17 '12 at 13:25

I would recommend Matlab and the Psychophysics Toolbox. It lets you display all sorts of stimuli in full-screen mode, and it lets you capture key strokes and mouse clicks.

-
Just make sure that you install MATLAB R2010a or earlier. R2010b and later versions of MATLAB are 64-bit-only, and PsychToolbox is 32-bit-only. – Mark L Mar 7 '12 at 6:16
@Solus: which platform? 32-bit Windows is still supported in the latest release. – Dima Mar 7 '12 at 14:57
OS X (the comment was intended for Speldosa, but also for anyone else wanting to use PsychToolbox on OS X. Just something to be aware of; it's not a show-stopper [e.g., you can install multiple instances of Matlab, or just install the latest 64-bit version and use the 32-bit version of Octave to run PsychToolbox scripts]). – Mark L Mar 8 '12 at 5:28

OpenSesame is a recent entry that is cross-platform and seems to promote GUI-based design while allowing customization via Python scripting.

It can be found at their website (link above). A recent article has references and summarizes 16 other tools as well (including some reported in the other stackexchange responses). I found great video tutorials and the interface to be friendly and easy to use.

It seems to not yet provide included ways of networking experiments (e.g. for yoked experiments or multi-subject games), but I suspect you could add this in with the custom Python scripting. For simple stimulus presentation and response tracking, I found it worked great and allowed rapid development. I wrote the experiment on my Linux machine and deployed for subject testing on Windows machines with no problems.

-
Welcome to the site! Is it possible to expand your answer to list the names of the 16 other tools the article summarized? For those that are not behind the pay-wall. – Artem Kaznatcheev Aug 16 '12 at 22:12
I agree, OpenSesame is great! – crash Apr 24 '14 at 8:34

I use Adobe Flash. My colleague Yana Weinstein has written a book on Flash Programming for the Social & Behavioral Sciences that should be out next month. I'm a contributor and helped write some of it! Check it out by clicking here.

-
I am the author of the book on Flash mentioned by Andy DeSoto. I have found Flash to be very straightforward and reliable for online data collectiong. – user2389 Nov 13 '12 at 5:29

Another option is to program in C/C++ using the Tscope library. If you're not experienced with programming, it's a bit tricky at first, but I'd say it pays off in the end.

Tscope is a C/C++ experiment programming library for cognitive scientists. It is distributed under the Gnu Public License, and is intended to run on Windows 2000 and XP platforms. It provides functions for graphics, sound, timing, randomization and response registration. Restricted Linux and Mac OS X versions are also available.

-
Usually it is preferred to not just link to a resource, but also give some information about it. I added the quote from the main page and a more direct link to the list of features. Thank you for the answer! – Steven Jeuris Mar 25 '12 at 13:44

Great question. There are two software packages that might be interesting to you:

1. I have tried to run EPrime in a virtual machine on my Mac and it was a catastrophe. As I found out it used to work, but some of the later updates made it impossible. In the process of figuring this out, I came across PsyScope X. It is an actively developed open source alternative for EPrime on the Mac and, apparently, even the collected data is somewhat compatible to EPrime. If you are interested in the importing of PsyScope-data into Eprime see the EPrime-FAQ.

2. However, agreeing with Mike, I felt like I needed more flexibility and control for my recent experiment and turned to LiveCode, as it was recommended to my by a neighboring department. It is a high-level programming language similar to VisualBasic but the language is very English-like and the software suite is quite cheap. What I particularly like about LiveCode is that you can program on your Mac and create Executables for Mac, Windows, Linux, and even iOS and Android if necessary. I collected all my data on Windows machines and there were only very minor compatibility issues (such as native fonts etc.). I would recommend LiveCode as the learning curve is not as steep as that of other languages and there is a great documentation with (video) tutorials and a responsive community happy to help.

Also, for a further overview of behavioral experiment software refer to the Wikipedia comparison page‌.

-
From what I know, PsyScope X is not as “actively developed” as you think. – Hisham Sep 21 '12 at 4:28
EPrime would just run on Windows on a Mac. You could have multiple OS sessions running at once but they're haven't been virtual machines necessary for that for years. Nevertheless, it's probably good to get away from it because it's timing is terrible. – John Sep 21 '12 at 7:49
Thanks for your comments. You're right, John, running Windows on your Mac is a possiblity. However, this way you have no access to your Mac applications while developing in Windows. I wanted to avoid the hassle of having to constantly reboot my machine when switching tasks. – crash Sep 21 '12 at 10:46

You should consider SuperLab. It runs on Mac and Windows.

It uses a point-and-click user interface that makes it really easy to setup experiments. Even "programming" contingencies are done via point-and-click.

Disclaimer: I wrote the original version of SuperLab and I work at Cedrus, its developer.

-

As of version 4 Inquisit has Mac support. See this announcement. You can run experiments locally or over the web. It is a commercial product.

To quote the website:

Inquisit is used by behavioral scientists throughout the world for creating and administering numerous cognitive, social, and neuropsychological measures. Now in use in over 1077 research institutions throughout the world.

The Mac support was only introduced in early 2012 so I imagine there will be a polishing process. I've used it many times. I wrote up a few introductory notes about Inquisit.

-

It has been a while since I asked this question, but I've tried out PsychoPy as some people suggested in the comments, and so far I'm really digging it. If you want you can use only the GUI to create your experiment, but if you're doing more advanced stuff you can export the code and start digging around in it.

As a bonus, it's also compatible with all major operating system, that is: Windows, OS X, and Linux.

-

It has been a while since the question was asked, but I am going to give my answer anyway. PsychoPy is really good and easy to use and is what I typically recommend people to use.

However, I recently found the Python library Expyriment and it seems promising. Although you will have to write your own code there are available methods for creating the window, presenting a fixation cross, and so on. A plus with this library is that you can also code experiments for Android devices (and, of course, Windows, Linux, and OS-X).

-