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
.npyfile (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.
Metadata
Release files for spike2loader 0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spike2loader-0.5.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spike2loader-0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / spike2loader-0.5.tar.gz
| Download URL | spike2loader-0.5.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1139e476b94b182441475853f1217f4070ae925d7404796178973b1e44bc942d
|
|
BLAKE2b-256 checksum How to use checksums |
20e1e6e8a28f06f14c33a84c71826a4890aa3832433a2b54579f3edeb343b848
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Release files / spike2loader-0.5-py3-none-any.whl
| Download URL | spike2loader-0.5-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ab364bbf56f23f8c2de0bf31affc48365b0b8612d1dec003cf5a7124c87d2a6
|
|
BLAKE2b-256 checksum How to use checksums |
0c95f2d7a68eb78c0f6929758cbb4967c7aaca1b2c33029b0e31e9eb83d0cab0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|