A python implementation of the Unisens standard
Project description
pyunisens
Implementation of the Unisens data storage format
Installation
Stable version can be installed via pip install pyunisens
or most recent version via pip install git+https://github.com/Unisens/pyunisens
pyunisens
is running on Python 3.6+
Quickstart
You can load any unisens object simply like this
import unisens
u = unisens.Unisens('c:/folder/dataset/') # folder containing the unisens.xml
Entries are saved under .entries
can be accessed either via attributes or using the unisens object as a dictionary
print(u.entries)
# four ways to Rome
signal = u.signal_bin
signal = u['signal.bin']
signal = u.entries['signal.bin']
signal = u[0]
# shortcuts also work, if they are not ambiguous
signal = u.signal
signal = u['signal']
print(type(signal))
# signalEntry
Data can be loaded (if datatypeis supported, ie a standard numpy dtype) via data= signal.get_data()
You can add Entries simply by
import numpy as np
from unisens import SignalEntry
data = np.random(2, 2560)
s = SignalEntry(id='eeg.bin', parent=u)
# parent=u makes sure the signal is added to this Unisens object
# saving the data to eeg.bin
s.set_data(data, sampleRate=256, contentClass='EEG')
u.save() # will update the unisens.xml
Documentation
More documentation can be found at API-OVERVIEW.md and in the function descriptors
Bug reports / feedback
Please report any bugs or improvements via a Github issue.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyunisens-1.5.0.tar.gz
.
File metadata
- Download URL: pyunisens-1.5.0.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0ab359029e845bc76966ef67dd3b5a7de0a9cba8b091c5b85d8770573de3dd2 |
|
MD5 | 038d17da5487fb500447294e104a0f60 |
|
BLAKE2b-256 | a4617f1ea6d790a89a5c44dec7448e350641bd1cb56e3e34d11fe0843247765b |
File details
Details for the file pyunisens-1.5.0-py3-none-any.whl
.
File metadata
- Download URL: pyunisens-1.5.0-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be6f4ba8b53be9744221580c7badee40401c87398a7052bd3f3f5efb00e339f6 |
|
MD5 | 4723f198e4740a85fd78f893d8733a23 |
|
BLAKE2b-256 | 65b24a9a75a2c7f41b74cf151574485a25795cc826ea3ca347da80fafd1b5c3e |