GithubHelp home page GithubHelp logo

axopy / pytrigno Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 21.0 7 KB

Simple Python interface to the Delsys wireless EMG system

License: MIT License

Python 100.00%
data-acquisition electromyography

pytrigno's Introduction

AxoPy Logo


JOSS Paper GitHub Actions CI testing status Documentation Status Codecov test coverage PyPI package Anaconda package

Documentation: https://axopy.readthedocs.io

Axo-Pythonic synapses are those in which an axon synapses upon a Python program. AxoPy aims to facilitate such connections between electrophysiolgical signals and machines by making it easy for researchers to develop human-computer interface experiments. If you've ever found yourself spending more time thinking about how to implement your experiments than thinking about what the experiment should be, AxoPy may be able to help.

AxoPy consists of:

Graphical interface
Central to AxoPy is the graphical user interface providing visual feedback to the subject and controlling the flow of the experiment. The GUI is backed by PyQt5, and you're free to implement customized graphical elements if those built in to AxoPy don't suit your needs.
Data acquisition
AxoPy establishes a fairly simple API for communicating with input hardware, so all that's usually needed is a bit of middleware to get going. Check out pytrigno or pymcc to see what this is like. A couple input devices are built in (keyboard, noise generator), so examples run without needing special hardware.
Data storage
Data is stored in a file structure with common file formats (CSV and HDF5) so you can a) start working with data as soon as an experiment session is over and b) you don't need anything but standard tools (pandas, h5py) to do so. A high-level interface to the storage structure is also provided to make traversing a dataset simple.
Pipeline processing
Estimating intentions of the user from raw electrophysiological signals often involves a large number of processing operations. AxoPy facilitates flexible construction of pipelines that can be reused in different parts of an experiment and re-used for offline post-processing, etc.

Quickstart

Installation

pip

AxoPy is available on PyPI, so the following should get it installed if you're using a standard Python installation with pip:

$ pip install axopy

Note: if you have Python < 3.5, pip will not be able to install the pyqt5 package for you because wheels for pyqt5 are only provided for Python >= 3.5. If you are stuck on an older version of Python, consider using conda (described below, works for any Python version) or installing Qt5 and PyQt5 yourself before running the command above.

See the development documentation for information on setting up a development environment to work on AxoPy itself.

conda

AxoPy is also available on conda-forge, so if you're using (Ana)conda with any Python version, you can install it with:

$ conda install -c conda-forge axopy

Hello, AxoPy

Here's a minimal example to display some randomly generated signals in an "oscilloscope":

import axopy

daq = axopy.daq.NoiseGenerator(rate=1000, num_channels=4, read_size=100)
exp = axopy.experiment.Experiment(daq=daq)
exp.run(axopy.task.Oscilloscope())

Next Steps

Check out the documentation for more information on creating experiments. Some examples are also available.

Citing

If you use AxoPy in your research and want to acknowledge us, see our instructions for citing AxoPy.

Contributing

Please feel free to share any thoughts or opinions about the design and implementation of this software by opening an issue on GitHub. Constructive feedback is welcomed and appreciated.

GitHub issues also serve as the support channel, at least for now. Questions about how to do something are usually great opportunities to improve documentation, so you may be asked about your thoughts on where the answers should go.

If you want to contribute code, open a pull request. Bug fix pull requests are always welcome. For feature additions, breaking changes, etc. check if there is an open issue discussing the change and reference it in the pull request. If there isn't one, it is recommended to open one with your rationale for the change before spending significant time preparing the pull request.

Ideally, new/changed functionality should come with tests and documentation. If you are new to contributing, it is perfectly fine to open a work-in-progress pull request and have it iteratively reviewed. See the development documentation for instructions on setting up a development environment, running tests, and building the documentation.

pytrigno's People

Contributors

ixjlyons avatar jdekarske avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pytrigno's Issues

Question about connection

Hi,
I'm trying to use your program in order to read data recorded by the trigno EMG and IMU system.
I keep raise de "Device disconnected" error. I think it is because I don't have the good samples_per_read value.
I used 200 because the sample rate is 2 kHz for EMG and I saw in the other question that the update rate is 10 Hz. But, I'm not sure what this update rate refers to.
Can you help me ?

Best regards,
Effie

Data acquisition with PyTrigno

Hi,

Thank you for your work!

I'm trying to read data from Trigno EMG using pyTrigno. I am able to connect, and when I send commands I can see an activity on the TCU. However, the results are always an array of zeros, both when I use TrignoAccel or TrignoEMG.

Any ideas what should I do differently?

this is the code i'm using:

from pytrigno import TrignoAccel
t=TrignoAccel((0,48),samples_per_read=200) t.start()
data=t.read() t.stop()
print (data.shape, data.sum())

and the result I get is:
(48, 200) 0.0

Thank you,
Uri

question

You have done a great work, and I want to know what data does the MCC get and What is the corresponding paper in IEEE Transactions on Neural Systems and Rehabilitation Engineering.

accelerometer data quality

Have you had any issues with quality of accelerometer data captured via the TCU or analog inputs? The accelerometer data I've collected both ways seems extremely noisy/nonsensical, even though data obtained through Delsys' proprietary software (and whatever signal processing is under the hood) looks very nice -- just wondering if you've run across these issues at all when working with the Trigno system.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.