pyxid2


Namepyxid2 JSON
Version 1.0.6 PyPI version JSON
download
home_pagehttp://www.github.com/cedrus-opensource/pyxid/
SummaryPython library for interfacing with Cedrus XID devices, e.g. StimTracker, Riponda, RB-x40, c-pod, and Lumina.
upload_time2023-10-31 19:18:22
maintainerCedrus Corporation
docs_urlNone
authorEugene Matsak
requires_python
licenseBSD
keywords cedrus xid xid stimulus response data collection
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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": "",
    "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/5b/7c/9075bd817f04465c77fa5ec4a9e7ba9304d54d55b440ad7b27528d43a4a7/pyxid2-1.0.6.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.6",
    "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": "c62e0d6c5affd35f7da81fb2ab10d1560a04c9a4f2f4d8934ebd2ed1d4ed280b",
                "md5": "27e60b067e1d4a1a03826ad941aafc20",
                "sha256": "35d174e39ea9e0534f46903608c4ae997143070b2b0e6c802199bec049f403e6"
            },
            "downloads": -1,
            "filename": "pyxid2-1.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "27e60b067e1d4a1a03826ad941aafc20",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 11528,
            "upload_time": "2023-10-31T19:18:20",
            "upload_time_iso_8601": "2023-10-31T19:18:20.480354Z",
            "url": "https://files.pythonhosted.org/packages/c6/2e/0d6c5affd35f7da81fb2ab10d1560a04c9a4f2f4d8934ebd2ed1d4ed280b/pyxid2-1.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5b7c9075bd817f04465c77fa5ec4a9e7ba9304d54d55b440ad7b27528d43a4a7",
                "md5": "fcdffc5db5c0b73f4c802ad58915a934",
                "sha256": "9011e4ca69c174ea4d6fc1d9c0f3dc85dbb3144dfdbcbb5fe360d6ed79d571ea"
            },
            "downloads": -1,
            "filename": "pyxid2-1.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "fcdffc5db5c0b73f4c802ad58915a934",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 11633,
            "upload_time": "2023-10-31T19:18:22",
            "upload_time_iso_8601": "2023-10-31T19:18:22.178870Z",
            "url": "https://files.pythonhosted.org/packages/5b/7c/9075bd817f04465c77fa5ec4a9e7ba9304d54d55b440ad7b27528d43a4a7/pyxid2-1.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-31 19:18: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"
}
        
Elapsed time: 0.13571s