syncmaster


Namesyncmaster JSON
Version 1.0.6 PyPI version JSON
download
home_pagehttps://github.com/conorkeogh/syncmaster
SummaryDevice and drivers for generating trigger signals to synchronise recorded signals with behavioural data
upload_time2023-05-25 09:40:20
maintainer
docs_urlNone
authorConor Keogh
requires_python>=3.7
licenseApache Software License 2.0
keywords nbdev jupyter notebook python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            SyncMaster
================

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

The SyncMaster provides a simple way to synchronise behavioural tasks
with recorded signals.

The device is connected to the computer running the task via USB and the
output port is connected to an input on the recording system. The task
script can then send commands to the device, producing event-specific
signals on the output channel which can be used to time-lock recorded
signals to behavioural events.

## Installation

The drivers to run the device using Python can be installed using pip:

``` sh
pip install syncmaster
```

Further details are given in the `installation` section.

Once the Python package is installed and the device connected as
outlined in the `setup` section, the device can be initialised and
triggered to synchronise behavioural events with recorded signals. A
simple application is shown below, with further details available in the
`initialisation` and `triggering` sections.

## Example application

After importing the library, the device must be initialised. This should
be done once at the beginning of the behavioural task.

Triggers can then be sent using simple commands. These can be integrated
with the behavioural task in order to indicate the occurence of events
of interest. This generates signals on the output channel which are
recorded and can be used to analyse recorded data relative to
behavioural events.

``` python
# Import library
import syncmaster

# Create device object
device = syncmaster.SyncMaster()

# Run trial with start and end signals
device.start()    # Send start signal

''' Run behavioural task '''

device.end()      # Send end signal

# Close communication channel when finished
device.close()
```

On completion of the task, the communication channel with the device
should be formally closed.

Note that more complex task designs with up to 100 user-defined event
types can be accommodated. This is outlined in detail in the
`triggering` section.

## Output

The device produced pulses of differing lengths on a single output
channel. Each pulse length corresponds to a specific event type.

The package includes a function for recovering the discrete event
timings from this single-channel pulse data in order to facilitate data
analysis. A simple example is shown below with raw recorded data above
and each subsequent row showing recovered trigger timings for each event
type. This is described in further detail in the `analysis` section.

![](index_files/figure-commonmark/cell-3-output-1.png)

This approach can also be used to recover precise event timings for
user-defined events. This is outlined in detail in the `analysis`
section.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/conorkeogh/syncmaster",
    "name": "syncmaster",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "nbdev jupyter notebook python",
    "author": "Conor Keogh",
    "author_email": "conor.keogh@nds.ox.ac.uk",
    "download_url": "https://files.pythonhosted.org/packages/f5/5f/961d0c0877f4436d9c49892046150d110cf753fe6ef2f84e8c84cf15ec15/syncmaster-1.0.6.tar.gz",
    "platform": null,
    "description": "SyncMaster\n================\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\nThe SyncMaster provides a simple way to synchronise behavioural tasks\nwith recorded signals.\n\nThe device is connected to the computer running the task via USB and the\noutput port is connected to an input on the recording system. The task\nscript can then send commands to the device, producing event-specific\nsignals on the output channel which can be used to time-lock recorded\nsignals to behavioural events.\n\n## Installation\n\nThe drivers to run the device using Python can be installed using pip:\n\n``` sh\npip install syncmaster\n```\n\nFurther details are given in the `installation` section.\n\nOnce the Python package is installed and the device connected as\noutlined in the `setup` section, the device can be initialised and\ntriggered to synchronise behavioural events with recorded signals. A\nsimple application is shown below, with further details available in the\n`initialisation` and `triggering` sections.\n\n## Example application\n\nAfter importing the library, the device must be initialised. This should\nbe done once at the beginning of the behavioural task.\n\nTriggers can then be sent using simple commands. These can be integrated\nwith the behavioural task in order to indicate the occurence of events\nof interest. This generates signals on the output channel which are\nrecorded and can be used to analyse recorded data relative to\nbehavioural events.\n\n``` python\n# Import library\nimport syncmaster\n\n# Create device object\ndevice = syncmaster.SyncMaster()\n\n# Run trial with start and end signals\ndevice.start()    # Send start signal\n\n''' Run behavioural task '''\n\ndevice.end()      # Send end signal\n\n# Close communication channel when finished\ndevice.close()\n```\n\nOn completion of the task, the communication channel with the device\nshould be formally closed.\n\nNote that more complex task designs with up to 100 user-defined event\ntypes can be accommodated. This is outlined in detail in the\n`triggering` section.\n\n## Output\n\nThe device produced pulses of differing lengths on a single output\nchannel. Each pulse length corresponds to a specific event type.\n\nThe package includes a function for recovering the discrete event\ntimings from this single-channel pulse data in order to facilitate data\nanalysis. A simple example is shown below with raw recorded data above\nand each subsequent row showing recovered trigger timings for each event\ntype. This is described in further detail in the `analysis` section.\n\n![](index_files/figure-commonmark/cell-3-output-1.png)\n\nThis approach can also be used to recover precise event timings for\nuser-defined events. This is outlined in detail in the `analysis`\nsection.\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "Device and drivers for generating trigger signals to synchronise recorded signals with behavioural data",
    "version": "1.0.6",
    "project_urls": {
        "Homepage": "https://github.com/conorkeogh/syncmaster"
    },
    "split_keywords": [
        "nbdev",
        "jupyter",
        "notebook",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9969f1415a2a22e8525247f3d3f4c40cefa4b595099c90aa46ec7ecfb7181437",
                "md5": "1c1de679124015cc8f10d57efc0eeb71",
                "sha256": "8e9bcfd39dcaf829b2b414405cb78ceb0990d2816afc004f9991b9623cf103eb"
            },
            "downloads": -1,
            "filename": "syncmaster-1.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1c1de679124015cc8f10d57efc0eeb71",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 10389,
            "upload_time": "2023-05-25T09:40:17",
            "upload_time_iso_8601": "2023-05-25T09:40:17.810711Z",
            "url": "https://files.pythonhosted.org/packages/99/69/f1415a2a22e8525247f3d3f4c40cefa4b595099c90aa46ec7ecfb7181437/syncmaster-1.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f55f961d0c0877f4436d9c49892046150d110cf753fe6ef2f84e8c84cf15ec15",
                "md5": "a2c1c68a32afb6dbfd1fdbfd751bfecb",
                "sha256": "e2bad52a2f8a8d6b1d030a39293bcfe0e111f410ad9ee0934b7bd4893184ab04"
            },
            "downloads": -1,
            "filename": "syncmaster-1.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "a2c1c68a32afb6dbfd1fdbfd751bfecb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 11583,
            "upload_time": "2023-05-25T09:40:20",
            "upload_time_iso_8601": "2023-05-25T09:40:20.202026Z",
            "url": "https://files.pythonhosted.org/packages/f5/5f/961d0c0877f4436d9c49892046150d110cf753fe6ef2f84e8c84cf15ec15/syncmaster-1.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-25 09:40:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "conorkeogh",
    "github_project": "syncmaster",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "syncmaster"
}
        
Elapsed time: 0.07426s