Skip to content

s2mLab/pyScienceMode

Repository files navigation

pyScienceMode

Functional electrical stimulation (FES) research would benefit of an open, flexible control method for customizable stimulation patterns. pyScienceMode provides a unified Python API for both Rehastim2 and P24 devices, enabling real-time adjustment of frequency, intensity, pulse width, train duration and sensor-triggered control. It supports rapid prototyping of personalized, real-time FES protocols, making novel rehabilitation strategies reproducible, adaptable and easily extensible as new hardware emerges. Please have a look to the documentation for more information about pyScienceMode.

How to install

These are the different ways to install pyScienceMode for the Rehastim2 control. To control the P24, please follow the given steps in Installing from source as it requires an additional wheel compilation.

Installing from PyPI

pip install pysciencemode

Installing from Anaconda

conda install -c conda-forge pysciencemode

Installing from source

Please refer to the documentation to install pyScienceMode.

Additional installation step for the P24 stimulator

pysciencemode is not compatible with macOS and Linux for the control of the stimulator P24. As soon as the P24 wrapper will be compatible with macOS and Linux, we will update the documentation.

For Python 3.10 only: navigate to the folder where the file sciencemode_cffi-1.0.0-cp310-cp310-win_amd64.whl is located and run the following command

pip install sciencemode_cffi-1.0.0-cp310-cp310-win_amd64.whl

For other Python version: build your own wheel from https://github.com/ScienceMode/ScienceMode4_python_wrapper and pip install it in your environment.

How to use

▶ How to use pysciencemode

A set of example is provided in the examples folder to show how to control the Rehastim2 and the P24: Please take a look at the documentation example page for description of each example.

Instruction for use

User manual Rehastim2: https://github.com/ScienceMode/ScienceMode2/tree/main/01_User%20Manual

User manual P24: https://github.com/ScienceMode/ScienceMode4_P24/tree/main/01_IFU_and_Protocol

The P24 Science/P24 Module is a device that can be controlled by a computer system via a specified interface to generate and output electrical pulses. The P24 Science/P24 Module is intended for research applications only and is not intended to be used for medical purposes on human beings according to Regulation (EU) 2017/745.

Main differences between the Rehastim2 and the P24

They are some differences between the Rehastim2 and the P24. Please take a look at the documentation main differences page for more information.

How to contribute

You are welcome to contribute to this project by following the steps describes in the how to contribute page.

How to cite

status

Co et al., (2025). pyScienceMode: an Open-Source Python Package to control electro-stimulator through the Hasomed’s science mode protocol. Journal of Open Source Software, 10(111), 8259, https://doi.org/10.21105/joss.08259

Acknowledgements

The software development was supported by Ingénierie de technologies interactives en réadaptation INTER #160 OptiStim.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages