# Spike2Loader
A simple loader for Spike2 files (.smrx). Note that this package uses the sonpy package provided by spike2 which requires python 3.9.
It provides one executable named `smrx2python` that directly operates on files and a function named `as_python_data` to load an smrx file as a pandas table and numpy arrays.
## smrx2python executable
The usage is the following:
`smrx2python -i MYFILE.smrx`, where *MYFILE.smrx* is the path to your spike2 file.
It will create a tsv file *MYFILE.tsv* and a folder named *MYFILE_data* in the same folder as *MYFILE.smrx*. The contents are:
- *MYFILE.tsv* contains metadata for each channel
- *MYFILE_data* contains an `.npy` file (numpy array) for each channel.
- For event channels, the contents of the array are the timing of the events in seconds.
Note if the channel is registered as a rise and fall event (*EventBoth* on spike2), then the array will have two columns, one for rise and one for fall.
- For continuous channels the arrays are simply the set of values at the given sampling frequency (given by *fs* (in Hertz) from *MYFILE.tsv*)
## as_python_data function
Similar to `smrx2python -i MYFILE.smrx` but returns the pandas dataframe and a dictionary of numpy array instead of files.
Raw data
{
"_id": null,
"home_page": "https://github.com/JulienBrn/Spike2Loader",
"name": "spike2loader",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, logging",
"author": "Julien Braine",
"author_email": "julienbraine@yahoo.fr",
"download_url": "https://files.pythonhosted.org/packages/20/e1/e6e8a28f06f14c33a84c71826a4890aa3832433a2b54579f3edeb343b848/spike2loader-0.5.tar.gz",
"platform": null,
"description": "# Spike2Loader\n\nA simple loader for Spike2 files (.smrx). Note that this package uses the sonpy package provided by spike2 which requires python 3.9.\n\nIt provides one executable named `smrx2python` that directly operates on files and a function named `as_python_data` to load an smrx file as a pandas table and numpy arrays.\n\n\n## smrx2python executable\n\nThe usage is the following:\n\n`smrx2python -i MYFILE.smrx`, where *MYFILE.smrx* is the path to your spike2 file.\n\nIt will create a tsv file *MYFILE.tsv* and a folder named *MYFILE_data* in the same folder as *MYFILE.smrx*. The contents are:\n- *MYFILE.tsv* contains metadata for each channel\n- *MYFILE_data* contains an `.npy` file (numpy array) for each channel. \n - For event channels, the contents of the array are the timing of the events in seconds. \n Note if the channel is registered as a rise and fall event (*EventBoth* on spike2), then the array will have two columns, one for rise and one for fall.\n - For continuous channels the arrays are simply the set of values at the given sampling frequency (given by *fs* (in Hertz) from *MYFILE.tsv*)\n\n\n## as_python_data function\n\nSimilar to `smrx2python -i MYFILE.smrx` but returns the pandas dataframe and a dictionary of numpy array instead of files.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Reads smrx (spike2) files as pandas dataframes",
"version": "0.5",
"project_urls": {
"Download": "https://github.com/JulienBrn/Spike2Loader.git",
"Homepage": "https://github.com/JulienBrn/Spike2Loader"
},
"split_keywords": [
"python",
" logging"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0c95f2d7a68eb78c0f6929758cbb4967c7aaca1b2c33029b0e31e9eb83d0cab0",
"md5": "c2696cc7a8b2ff862e04e38743f882b1",
"sha256": "8ab364bbf56f23f8c2de0bf31affc48365b0b8612d1dec003cf5a7124c87d2a6"
},
"downloads": -1,
"filename": "spike2loader-0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c2696cc7a8b2ff862e04e38743f882b1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4988,
"upload_time": "2024-04-30T13:04:26",
"upload_time_iso_8601": "2024-04-30T13:04:26.019460Z",
"url": "https://files.pythonhosted.org/packages/0c/95/f2d7a68eb78c0f6929758cbb4967c7aaca1b2c33029b0e31e9eb83d0cab0/spike2loader-0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "20e1e6e8a28f06f14c33a84c71826a4890aa3832433a2b54579f3edeb343b848",
"md5": "dba32e2c4da094b853d737ed1083bc13",
"sha256": "1139e476b94b182441475853f1217f4070ae925d7404796178973b1e44bc942d"
},
"downloads": -1,
"filename": "spike2loader-0.5.tar.gz",
"has_sig": false,
"md5_digest": "dba32e2c4da094b853d737ed1083bc13",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4542,
"upload_time": "2024-04-30T13:04:27",
"upload_time_iso_8601": "2024-04-30T13:04:27.151684Z",
"url": "https://files.pythonhosted.org/packages/20/e1/e6e8a28f06f14c33a84c71826a4890aa3832433a2b54579f3edeb343b848/spike2loader-0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-30 13:04:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "JulienBrn",
"github_project": "Spike2Loader",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "spike2loader"
}