[](https://github.com/MartinHeroux/spike2py)
[](LICENSE)
[](https://github.com/psf/black)

[](code_of_conduct.md)
[](https://spike2py.readthedocs.io/en/latest/?badge=latest)
**spike2py** provides a simple interface to analyse and visualise data collected using [Spike2](http://ced.co.uk/products/spkovin) software and [Cambridge Electronics Design (CED)](http://ced.co.uk/) data acquisition boards. With it you can easily plot individual channels or all channels from a given trial. In addition, you can easily apply various signal processing methods to your `waveform` data. Finally, you can easily save your data at any point, allowing you to re-open and continue your work from where they left off.
To demonstrate, the following snippet of code shows you how to:
1. Read a file
2. Plot the electromyography (EMG) signal from one of the channels
2. Remove the mean of the first 500 samples and rectify EMG signal, and plot the result
```python
>>> from spike2py.trial import TrialInfo, Trial
>>> trial_info = TrialInfo(file="sample.mat")
>>> sample = Trial(trial_info)
>>> sample.muscle_emg.plot()
>>> sample.muscle_emg.remove_mean(first_n_samples=500).rect().plot()
```
[](https://github.com/MartinHeroux/spike2py)
## Documentation
Introductory tutorials, how-to's and other useful documentation are available on [Read the Docs](https://spike2py.readthedocs.io/en/latest/index.html)
## Installing
**spike2py** is available on PyPI:
```console
$ python -m pip install spike2py
```
**spike2py** officially supports Python 3.8+.
## Caveat
**spike2py** works with Matlab files exported from Spike2 v7, or any other Spike2 version that exports to Matlab 5.0 format.
Spike2 v10 exports files to Matlab 7.3 format, which is currently not supported by **spike2py**.
The ability to open both Matlab file formats will be added in future version of **spike2py**.
## Contributing
Like this project? Want to help? We would love to have your contribution! Please see [CONTRIBUTING](CONTRIBUTING.md) to get started.
## Code of conduct
This project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [heroux.martin@gmail.com](heroux.martin@gmail.com).
## License
[GPLv3](./LICENSE)
Raw data
{
"_id": null,
"home_page": "https://github.com/MartinHeroux/spike2py",
"name": "spike2py",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "",
"author": "Martin Heroux",
"author_email": "\"Martin Heroux\" <heroux.martin@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/e3/5d/8d7d723a87592a7ad113219bb9304eaef2364fba9bed924574574eb39455/spike2py-0.2.10.tar.gz",
"platform": null,
"description": "[](https://github.com/MartinHeroux/spike2py)\n\n\n[](LICENSE)\n[](https://github.com/psf/black)\n\n [](code_of_conduct.md)\n[](https://spike2py.readthedocs.io/en/latest/?badge=latest)\n\n**spike2py** provides a simple interface to analyse and visualise data collected using [Spike2](http://ced.co.uk/products/spkovin) software and [Cambridge Electronics Design (CED)](http://ced.co.uk/) data acquisition boards. With it you can easily plot individual channels or all channels from a given trial. In addition, you can easily apply various signal processing methods to your `waveform` data. Finally, you can easily save your data at any point, allowing you to re-open and continue your work from where they left off.\n\nTo demonstrate, the following snippet of code shows you how to:\n\n1. Read a file\n2. Plot the electromyography (EMG) signal from one of the channels\n2. Remove the mean of the first 500 samples and rectify EMG signal, and plot the result\n\n```python\n>>> from spike2py.trial import TrialInfo, Trial\n>>> trial_info = TrialInfo(file=\"sample.mat\")\n>>> sample = Trial(trial_info)\n>>> sample.muscle_emg.plot()\n>>> sample.muscle_emg.remove_mean(first_n_samples=500).rect().plot()\n```\n\n[](https://github.com/MartinHeroux/spike2py)\n\n## Documentation\n\nIntroductory tutorials, how-to's and other useful documentation are available on [Read the Docs](https://spike2py.readthedocs.io/en/latest/index.html)\n\n## Installing\n\n**spike2py** is available on PyPI:\n\n```console\n$ python -m pip install spike2py\n```\n\n**spike2py** officially supports Python 3.8+.\n\n## Caveat\n**spike2py** works with Matlab files exported from Spike2 v7, or any other Spike2 version that exports to Matlab 5.0 format.\nSpike2 v10 exports files to Matlab 7.3 format, which is currently not supported by **spike2py**.\nThe ability to open both Matlab file formats will be added in future version of **spike2py**.\n\n## Contributing\n\nLike this project? Want to help? We would love to have your contribution! Please see [CONTRIBUTING](CONTRIBUTING.md) to get started.\n\n## Code of conduct\n\nThis project adheres to the Contributor Covenant code of conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [heroux.martin@gmail.com](heroux.martin@gmail.com).\n\n## License\n\n[GPLv3](./LICENSE)\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": "\"Import, parse and process data collected with Spike2\".",
"version": "0.2.10",
"project_urls": {
"Homepage": "https://github.com/MartinHeroux/spike2py"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "719c686e3a610ebf9aac2b6ee1266b710979f2d71c275deb38284f0251929ef0",
"md5": "86e95bfb95ecfae950094a1b2b2ca5e7",
"sha256": "8d71829781b02541b3626f20e2799b79bb726f13826fc61307cde1de2746c942"
},
"downloads": -1,
"filename": "spike2py-0.2.10-py3-none-any.whl",
"has_sig": false,
"md5_digest": "86e95bfb95ecfae950094a1b2b2ca5e7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 26785,
"upload_time": "2023-09-22T10:54:30",
"upload_time_iso_8601": "2023-09-22T10:54:30.503856Z",
"url": "https://files.pythonhosted.org/packages/71/9c/686e3a610ebf9aac2b6ee1266b710979f2d71c275deb38284f0251929ef0/spike2py-0.2.10-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e35d8d7d723a87592a7ad113219bb9304eaef2364fba9bed924574574eb39455",
"md5": "48191f2d1ad73ad409b5583619d1ae6a",
"sha256": "45fc2e6d2e7f0d44487d2234029b8217173a8472b8c34fe47dfb8f1da53aa98b"
},
"downloads": -1,
"filename": "spike2py-0.2.10.tar.gz",
"has_sig": false,
"md5_digest": "48191f2d1ad73ad409b5583619d1ae6a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 30335,
"upload_time": "2023-09-22T10:54:33",
"upload_time_iso_8601": "2023-09-22T10:54:33.398227Z",
"url": "https://files.pythonhosted.org/packages/e3/5d/8d7d723a87592a7ad113219bb9304eaef2364fba9bed924574574eb39455/spike2py-0.2.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-22 10:54:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MartinHeroux",
"github_project": "spike2py",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "scipy",
"specs": []
},
{
"name": "numpy",
"specs": []
},
{
"name": "matplotlib",
"specs": []
}
],
"lcname": "spike2py"
}