File: cedrusResponseBox.rst

package info (click to toggle)
psychopy 2020.2.10%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 44,056 kB
  • sloc: python: 119,649; javascript: 3,022; makefile: 148; sh: 125; xml: 9
file content (51 lines) | stat: -rw-r--r-- 2,034 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.. _cedrusButtonBox:

Cedrus Button Box Component
---------------------------------

This component allows you to connect to a Cedrus Button Box to collect key presses.

*Note that there is a limitation currently that a button box can only be used in a single Routine. Otherwise PsychoPy tries to initialise it twice which raises an error.* As a workaround, you need to insert the start-routine and each-frame code from the button box into a code component for a second routine.

Properties
~~~~~~~~~~~

Name : string
    Everything in a PsychoPy experiment needs a unique name. The name should contain only letters, numbers and underscores (no punctuation marks or spaces).

Start :
    The time that the button box is first read. See :ref:`startStop` for details.

Stop :
    Governs the duration for which the button box is first read. See :ref:`startStop` for details.

Force end of Routine : true/false
    If this is checked, the first response will end the routine.

Allowed keys : None, or an integer, list, or tuple of integers 0-7
    This field lets you specify which buttons (None, or some or all of 0 through 7) to listen to.

Store : (choice of: first, last, all, nothing)
    Which button events to save in the data file. Events and the response times are saved, with RT being recorded by the button box (not by PsychoPy).

Store correct : true/false
    If selected, a correctness value will be saved in the data file, based on a match with the given correct answer.

Correct answer: button
    The correct answer, used by Store correct.

Discard previous : true/false
    If selected, any previous responses will be ignored (typically this is what you want).

Advanced
+++++++++++++

Device number: integer
    This is only needed if you have multiple Cedrus devices connected and you need to specify which to use.

Use box timer : true/false
    Set this to True to use the button box timer for timing information (may give better time resolution)

.. seealso::

	API reference for :class:`~psychopy.hardware.iolab`