[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reaction time measures
On 8 Jun 2007 at 12:22, Christophe Pallier wrote:
> Check psychopy (http://www.psychopy.org/) (for visual presentations)
>
> If you do not mind programming, python/pygame is good enough for many
> experiments.
>
> It is difficult to ensure than you have millisecond precision on each trial
> because non real-time, pre-emptive operating systems like Windows or Linux
> can switch to other processes and create latencies ( i.e. delays in stimulus
> delivery or detection of button press). But this is not often a difficulty
> in practice. First, you can check for latencies in your program, second the
> variance of human subjects' decision times is typically order of magnitude
> larger than the variance in the timing of the computer.
>
Auditory stimuli and their responses can have microsecond precision (the
precision of the sound card timing clock) because they are buffered in
hardware on the sound card. Windows latencies may cause a buffer to
be transferred at an indeterminate time, but the timing of the samples is
unaffected since the sound card keeps filling buffers according to its own
clock.
Since you are interested in the latency between a stimulus and a response
to that stimulus, you must record the stimulus stream in parallel with the
response stream. The easiest way to do this is to put (say) the stimulus
on the Left input and the response on the Right. (The Left and Right channels
are sampled synchronously.) You should do this even if the same software
is producing the stimulus on an output channel, since Windows does not
provide any means of insuring or knowing the relative timing between input and
output streams. (They may even proceed at slightly different sample rates,
if you choose a sample rate that is not the native rate for the card!)
>From your recorded data streams, you can then measure the latencies of the
responses relative to the stimuli. With a typical sample rate of 48000 Hz,
you will get a timing resolution of 20.833 microseconds.
Note that sound cards do not pass DC signals. This is typically no problem
when generating acoustic stimuli, but for responses you may want to use a
simple switch closure. It turns out that switching DC can actually work quite
well here, since the card's AC coupling does pass the switching transient
just fine. For example, the response can be a switch closure that applies
(say) 1 Volt DC to the input. The recorded response will show a spike up
to 1V, then a slow decay back to zero as the coupling capacitor charges up.
When the button is released, the response is reversed: A negative spike
that then drifts up to zero. (IMPORTANT: You may need to provide a "bleeder"
resistance across the sound card input to insure that it discharges. Some
cards provide this, some don't. Doesn't hurt to add your own as well.)
Best regards,
Bob Masta
D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Scope, Spectrum, Spectrogram, Signal Generator
Science with your sound card!