Setting Up A Psychopy Lab: COMPUTER HARDWARE QUESTIONS: CPU; GPU; Monitors; Response Devices!

269 views
Skip to first unread message

Brian Drwecki

unread,
Sep 8, 2014, 12:15:08 AM9/8/14
to psychop...@googlegroups.com
Hi Everyone, 

First, let me say, if you are willing to help me, great!  I really, really appreciate it! 

I'm building two computers that will only be used for running experiments with psychopy.  They will also not be connected to the internet (except once or twice to add drivers). I will likely put office or another word processor on there to construct stimuli lists for builder view.   I will likely run Windows 7.0. 

I do a lot of reaction time experiments (Stroop tasks, IATs, Shooter bias) and I want to have the ability to confidently present simple words subliminally.  Ultimately, I want very good response accuracy (is 20ms an unreasonable expectation with modern technology?) and the ability to present stimuli for 50 ms. 

I don't have a grant and am spending my own money;I'm thinking middle range gaming PC kits + mid range GPU will work well. 


Here's what I'm thinking right now, please help me with suggestions. 

Main Components

CPU:   Intel Core i3-4130 Haswell Dual-Core 3.4GHz LGA 1150 54W

GPU: Radeon R7 260X 1GB 128-Bit GDDR5 PCI Express 3.0 HDCP Ready Video Card. 
1188MHz  I don't really know what videocard to choose (sometimes I show pictures)

RAM: 8gb 2 CORSAIR XMS 4GB 240-Pin DDR3 SDRAM DDR3 (do I need more?)

Monitors?  I have no idea, in about 2005 everyone recommended CRT monitors. Is this still true, is everyone using CRTs?  I want to use an LCD monitors but don't know what to look for here.   

Response Devices.  OK, I'm probably naive here, but I want to buy a Razer blackwidow, they claim that their keyboards are 1000hz ultra poling (which means 1ms if you buy their marketing).  Also commercial button boxes are very expensive. 

Additionally I also want to build my own button box, if anyone has done this I would appreciate a plan and some advice (I do have a small electronics soldering hobby so it's in my skill level, I just have no plan)

Testing the final build.  Finally, how do you test your final system to see how good it is at presentation and response time?  I know there are built in tests for psychopy, but how accurate are they?  Is there a better way to test your PC for presentation and response time accuracy?  


I thank you so much. 


Bran Drwecki (Regis University, Denver). 

Michael MacAskill

unread,
Sep 8, 2014, 2:25:49 AM9/8/14
to psychop...@googlegroups.com
Hi Brian,

Welcome along, it is always good to see someone being very interested in establishing the precision/accuracy of their system before using it.

A interesting place to start might be this discussion on the developer list, initiated by Jonas Lindelöv: <https://groups.google.com/forum/#!msg/psychopy-dev/u3WyDfnIYBo/RC767Zp1HMYJ>. He implemented a great hardware testing system which can "close the loop" in testing keyboard responses by knowing objectively when the key was pressed, allowing accurate assessment of response lag and variability.

I'm sure the computer hardware you describe will be more than adequate for what you want to do. We are using veritable museum pieces in comparison, and getting good performance. Though sometimes older hardware is actually better, retaining access to "legacy" ports like serial and parallel, which are well suited to home-made response boxes.

In terms of measuring reaction times, the limiting factor will not be the computer, but the input method. There is huge variation between keyboards, and specs can't always be believed. And even if a keyboard has 1 kHz polling, that doesn't mean that it doesn't also have a constant or variable lag of tens of milliseconds as well. i.e. it is crucial to separate the issues of accuracy (largely driven by input lag or delay, which can be fixed or variable) from precision (driven purely by variability).

The good news is that most variable errors are dwarfed by the physiological variability of the subject, where the standard deviation is tens or hundreds of milliseconds. And whether you are interested in comparisons across groups or within subjects, constant input lags cancel anyway so in practice aren't usually something to worry about (you seldom know how other people's labs perform, so comparisons in terms of absolute reaction times across labs are always going to be fraught).

If timing is crucial to you, you'll need to test the performance for individual input devices. A home-made response box, connected to the parallel or ethernet port, might very likely give you much better performance in terms of both lag and variability, than an expensive USB keyboard. And an expensive keyboard may be worse than a cheap one…

On the software side, there are limitations with PsychoPy builder in that it checks for keypress responses only once per screen refresh, which imposes a certain limit on timing resolution. Writing your own scripts in Coder, you can implement much tighter checking loops, but the best solution is to use Sol Simpson's ioHub system, which allows for true asynchronous monitoring of keyboard and other hardware responses. That isn't integrated into Builder yet, but can be used with your own custom code to get better timing performance than the standard PsychoPy keyboard events.

e.g. this shows an example of ioHub being used within Builder: <http://stackoverflow.com/questions/25495252/psychopy-key-down-code-using-iohub> In that example, although ioHub is being queried only every screen refresh, it collects events in a parallel asynchronous process and have timing attached to them which is not limited by the screen refresh cycle. Actual RTs aren't mentioned in that example, but they for part of each event.

Display-wise, it sounds like you could get away with a standard 60 Hz LCD as this would allow you to present stimuli for exactly 50 ms (3 screen refreshes). The key thing to look for is the lag in the display. Original LCDs were terrible for that (up to tens of milliseconds delay) and often tried to fudge it in the specs by talking about transitions from grey to grey rather than white to black. I'm beginning to think that you can get away with modern LCDs now, but we are still mostly using DLP and CRT, so I don't have any specific model recommendations for you. One thing to definitely avoid would be the new G-sync variable refresh rate monitors. They have a lot of potential for some demanding studies, but for most standard purposes, without a fixed refresh rate, they would be tricky to program for accurate timing.

RAM isn't likely to be an issue when running PsychoPy: your 8 GB is likely much more than enough. The limits people report are much more likely to be in VRAM (if they are trying to pre-load lots of large images).

Lastly, I'd avoid installing Office. It comes with a lot of baggage that could steal CPU cycles with background processes. If you want to edit spreadsheet files, try something lighter weight like Open Office that won't install such a kitchen sink of background tasks.

Regards,

Michael
--
Michael R. MacAskill, PhD 66 Stewart St
Research Director, Christchurch 8011
New Zealand Brain Research Institute NEW ZEALAND

Research Fellow, michael....@nzbri.org
Te Whare Wānanga o Otāgo, Otautahi Ph: +64 3 3786 072
University of Otago, Christchurch http://www.nzbri.org/macaskill



Jonathan Peirce

unread,
Sep 8, 2014, 7:42:05 AM9/8/14
to psychop...@googlegroups.com
Hi Brian,

I agree with pretty much everything that Mike has said below. The
hardware you're suggesting looks sensible for sure. Increasingly
(surprisingly) one of the biggest considerations though is the operating
system. And the question of LCDs is an extra issue, so I'm extending
info a little on those below.

Operating system advice
------------------------------------

If you're wanting this purely for PsychoPy experiments, and timing is
critical, you might want to think about a linux installation instead of
windows7. Windows and microsoft office are still handy in a university
environment, where you need compatible software with the rest of the
establishment, but the timing is definitely worse on win7 than OSX or
linux. (If you install MS Office then turn off all its background stuff
like auto-updating and quick-launch functions). Basically, every now and
then the computer goes off and does something for no good reason such
that, even when the experiment isn't intensive in its processing
occasionally a screen refresh is missed. (WinXP was actually better at
this!)

It used to be hard to get up and running with linux, but I don't think
that's true any more. I recently switched to Ubuntu on several of my
machines and installation was a complete breeze.

If you don't want to commit to this you could partition the hard disk
into two and try linux on one partition, with windows still there on the
other in case you really hate it.

Flat panel displays
----------------------------

I agree that these can now be a sensible option for many things except
possible measuring contrast detection thresholds. You can also now pick
up 120Hz flat panel monitors fairly cheapy. The problem with modern ones
is actually not so much the issue of slow liquid crystal reaction times
but the fact that some of them do further image processing to the output
from the graphics card and this causes a delay in your image being
presented.

Unfortunately this is something that's hard to know until you buy a
screen and see what happens, and you won't even find out unless you have
a way (e.g. a photodiode) to time when a screen event occurs.

BUT such lags usually add a constant (the processing is applied to all
frames form the graphics card, so all are delayed). So your subliminal
stimuli will still show up, and still for the right number of frames,
but 1 frame (e.g. 16.66ms) later than you thought. I expect
gaming-designed screens will have it less because they're trying to
reduce lag and may care less about brilliance of the image. Definitely
avoid using a flat-panel TV: even though it probably has a computer
input and might be lovely ang big they nearly always do extra processing
to make the images more visually appealing.

best wishes,
Jon
Jon Peirce
http://www.peirce.org.uk

Brian Drwecki

unread,
Sep 8, 2014, 12:26:10 PM9/8/14
to psychop...@googlegroups.com
I want to say thank you guys so much.  I am familiar with Linux on a spare laptop, so, yeah, that makes more sense!  The new Windows versions are atrocious (I use a mac for personal use). As for everything else, thank you again! This was so magnificently helpful (just like the program is also helpful!) 

Sol Simpson

unread,
Sep 8, 2014, 4:33:01 PM9/8/14
to psychop...@googlegroups.com
I would add that if you have a little more $ and are planning on using iohub, or playing videos, spending an extra $120 to go from the i3 you mention to an i5 or higher quad core CPU would be really worth it (like the i5-4670K). If your experiment is using 2 + processes, having 4 cores gives the OS much more to work with when it needs to schedule any other services/processes running other than psychopy.
Reply all
Reply to author
Forward
0 new messages