Python library for communicating with all Cedrus XID devices: StimTracker, RB-x40 response pads, c-pod, Lumina, and SV-1.
XID (eXperiment Interface Device) devices are used with software such as SuperLab, Presentation, and E-Prime for receiving input as part of stimulus/response testing experiments. This handles all of the low level device handling for XID devices in python projects.
Minimal samples for collecting responses and sending event markers are available in the Git repo.
------
Response collection in pyxid
When a physical key is pressed on the device, a set of bytes describing it go into the serial buffer. This also occurs when the physical key is released. Calling poll_for_response() makes pyxid check the serial buffer for bytes constituting a response packet, and put a response object in its internal response queue. It does so once per poll_for_response() call. Calling get_next_response() pops a single response from the response queue. If you want to avoid seeing more responses than necessary, you can use flush_serial_buffer() to prevent more responses from being added to the queue by poll_for_response(), and you can clear already processed responses with clear_response_queue().
The response object is a python dict with the following keys:
port: Device port the response was from (typically 0)
key: Response pad key pressed by the subject
pressed: True if the key was pressed, False if it was released
time: value of the Response Time timer when the key was pressed/released
For an example see sample/responses.py
------
Sending a TTL pulse signal via the library can be done via the following methods:
set_pulse_duration()
activate_line()
clear_line()
clear_all_lines()
For an example see sample/event_markers.py
------
Timers
Each XID device has an internal timer. This timer can be reset via reset_timer() or automatically on the onset of a light sensor or onset of audio. It's commonplace to reset the timer at the start of the experiment and/or at the onset of a simulus.
Raw data
{
"_id": null,
"home_page": "http://www.github.com/cedrus-opensource/pyxid/",
"name": "pyxid2",
"maintainer": "Cedrus Corporation",
"docs_url": null,
"requires_python": null,
"maintainer_email": "developers@cedrus.com",
"keywords": "cedrus xid XID stimulus response data collection",
"author": "Eugene Matsak",
"author_email": "developers@cedrus.com",
"download_url": "https://files.pythonhosted.org/packages/03/04/78d19eb3dfa7e56eae8310adadf2807b40921fb72293af2235e585aff64b/pyxid2-1.0.8.tar.gz",
"platform": null,
"description": "Python library for communicating with all Cedrus XID devices: StimTracker, RB-x40 response pads, c-pod, Lumina, and SV-1.\r\n\r\nXID (eXperiment Interface Device) devices are used with software such as SuperLab, Presentation, and E-Prime for receiving input as part of stimulus/response testing experiments. This handles all of the low level device handling for XID devices in python projects.\r\n\r\nMinimal samples for collecting responses and sending event markers are available in the Git repo.\r\n\r\n------\r\nResponse collection in pyxid\r\n\r\nWhen a physical key is pressed on the device, a set of bytes describing it go into the serial buffer. This also occurs when the physical key is released. Calling poll_for_response() makes pyxid check the serial buffer for bytes constituting a response packet, and put a response object in its internal response queue. It does so once per poll_for_response() call. Calling get_next_response() pops a single response from the response queue. If you want to avoid seeing more responses than necessary, you can use flush_serial_buffer() to prevent more responses from being added to the queue by poll_for_response(), and you can clear already processed responses with clear_response_queue().\r\n\r\nThe response object is a python dict with the following keys:\r\n\r\n port: Device port the response was from (typically 0)\r\n key: Response pad key pressed by the subject\r\n pressed: True if the key was pressed, False if it was released\r\n time: value of the Response Time timer when the key was pressed/released\r\n\r\nFor an example see sample/responses.py\r\n\r\n------\r\nSending a TTL pulse signal via the library can be done via the following methods:\r\n\r\n set_pulse_duration()\r\n activate_line()\r\n clear_line()\r\n clear_all_lines()\r\n\r\nFor an example see sample/event_markers.py\r\n\r\n------\r\nTimers\r\n\r\nEach XID device has an internal timer. This timer can be reset via reset_timer() or automatically on the onset of a light sensor or onset of audio. It's commonplace to reset the timer at the start of the experiment and/or at the onset of a simulus.\r\n",
"bugtrack_url": null,
"license": "BSD",
"summary": "Python library for interfacing with Cedrus XID devices, e.g. StimTracker, Riponda, RB-x40, c-pod, and Lumina.",
"version": "1.0.8",
"project_urls": {
"Homepage": "http://www.github.com/cedrus-opensource/pyxid/"
},
"split_keywords": [
"cedrus",
"xid",
"xid",
"stimulus",
"response",
"data",
"collection"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "61405ec63e46c0015b3c4c353e5a895a3b6d94e17729c1b53fac50271fedea11",
"md5": "21383afca98c04c1fa64b07d4f3152fb",
"sha256": "3e250ebcb5078d8bccbce7807019b2778264a0a4a5ea55b12949ef91dfe25866"
},
"downloads": -1,
"filename": "pyxid2-1.0.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "21383afca98c04c1fa64b07d4f3152fb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 11802,
"upload_time": "2024-11-26T19:07:20",
"upload_time_iso_8601": "2024-11-26T19:07:20.823849Z",
"url": "https://files.pythonhosted.org/packages/61/40/5ec63e46c0015b3c4c353e5a895a3b6d94e17729c1b53fac50271fedea11/pyxid2-1.0.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "030478d19eb3dfa7e56eae8310adadf2807b40921fb72293af2235e585aff64b",
"md5": "361cf463d919d4e9c25c7db63bfa7a5d",
"sha256": "5b3c1f253d323aeba8f7ce234c0b8fae0c19cc9a9916dd743f264540d91700af"
},
"downloads": -1,
"filename": "pyxid2-1.0.8.tar.gz",
"has_sig": false,
"md5_digest": "361cf463d919d4e9c25c7db63bfa7a5d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11742,
"upload_time": "2024-11-26T19:07:22",
"upload_time_iso_8601": "2024-11-26T19:07:22.429019Z",
"url": "https://files.pythonhosted.org/packages/03/04/78d19eb3dfa7e56eae8310adadf2807b40921fb72293af2235e585aff64b/pyxid2-1.0.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-26 19:07:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cedrus-opensource",
"github_project": "pyxid",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pyxid2"
}