openhdemg is a powerful toolbox for the analysis of HDsEMG recordings.
openhdemg is an open-source framework written in Python 3 with many functionalities specifically designed for the analysis of High-Density surface Electromyography (HDsEMG) recordings. Some of its main features are listed below, but there is much more to discover! For a full list of available functions, please refer to the API reference section at www.giacomovalli.com/openhdemg.
- Load Raw HDsEMG signals or decomposed files from virtually any source (either via built-in or custom functions).
- Visualise your EMG or force/reference signal, as well as the motor unit firing times and their action potential shapes.
- Decompose your multichannel EMG signal into motor unit discharge times using convolutive blind source separation.
- Edit your file changing the reference signal offset, filtering noise, calculating differential derivations and removing unwanted motor units.
- Analyse motor unit recruitment/derecruitment thresholds, discharge rate, conduction velocity, action potentials amplitude and more...
- Track motor units across different recording sessions.
- Save the results of the analyses and the edited file.
If you already know how to use Python, that's the way to go! Otherwise, have a look at the tutorial explaining how to Setup your Python working environment.
openhdemg can be easily installed using pip:
pip install --upgrade openhdemgTo test pre-release builds (including v0.2.0-beta), use:
pip install --pre --upgrade openhdemgIf you want an overview of what you can do with the openhdemg library, have a look at the Quick Start section and then explore all the functions in the API reference.
In addition to the rich set of modules and functions presented in the API reference, the openhdemg library is now integrated in the openhdemg software{:target="_blank"}, which offers a practical interface from which many tasks can be performed without writing a single line of code!
Please visit the official website page dedicated to the software for more info by clicking here{:target="_blank"}.
The openhdemg project was born in 2022 with the aim to provide the HDsEMG community with a free and open-source framework to analyse motor unit properties.
The field of EMG analysis in humans has always been characterized by a lack of available software for signal post-processing and analysis. This has forced users to code their own scripts, which can lead to problems when the scripts are not shared open-source. Why?
- If different users use different scripts, the results can differ.
- Any code can contain errors, if the code is not shared, the errors will never be known and them will repeat in the following analyses.
- There is a significant difference between the methods presented in research papers and the practical implementation of a script. Reproducing a script solely based on written instructions can be challenging, making the reproducibility of a study unrealistic.
- Anyone who doesn't code, will not be able to analyse the recordings.
In order to overcome these problems, we developed a fully transparent framework for the analysis of motor unit properties.
This project is intended for the users that already know the Python language, for those willing to learn it and even for those not interested in coding, thanks to the friendly openhdemg software{:target="_blank"}.
Both the openhdemg project and its contributors adhere to the Open Science Principles and especially to the idea of public release of data and other scientific resources necessary for conducting honest research.

