pyScienceMode

pyScienceMode: an Open-Source Python Package to control electro-stimulator through the Hasomed’s science mode protocol - Published in JOSS (2025)

https://github.com/s2mlab/pysciencemode

Science Score: 93.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software
Last synced: 9 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: s2mLab
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 14.1 MB
Statistics
  • Stars: 4
  • Watchers: 1
  • Forks: 8
  • Open Issues: 1
  • Releases: 0
Created over 3 years ago · Last pushed 10 months ago
Metadata Files
Readme Contributing License

README.md

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

bash pip install pysciencemode

Installing from Anaconda

bash 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 sciencemodecffi-1.0.0-cp310-cp310-winamd64.whl is located and run the following command bash 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/ScienceMode4pythonwrapper 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/ScienceMode4P24/tree/main/01IFUandProtocol

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.

Owner

  • Name: s2mLab
  • Login: s2mLab
  • Kind: organization

JOSS Publication

pyScienceMode: an Open-Source Python Package to control electro-stimulator through the Hasomed’s science mode protocol
Published
July 11, 2025
Volume 10, Issue 111, Page 8259
Authors
Kevin Co ORCID
School of Kinesiology and Human Kinetics, University of Montreal, Montreal, QC, Canada
Amedeo Ceglia ORCID
Institute of Biomedical Engineering, Faculty of Medicine, University of Montreal, Canada
Mickael Begon ORCID
School of Kinesiology and Human Kinetics, University of Montreal, Montreal, QC, Canada, Institute of Biomedical Engineering, Faculty of Medicine, University of Montreal, Canada
Editor
Stefan Appelhoff ORCID
Tags
python functional electrical stimulation stimulator control Rehastim ScienceMode

GitHub Events

Total
  • Create event: 8
  • Release event: 3
  • Issues event: 1
  • Watch event: 3
  • Delete event: 6
  • Issue comment event: 3
  • Push event: 16
  • Pull request event: 17
  • Fork event: 2
Last Year
  • Create event: 8
  • Release event: 3
  • Issues event: 1
  • Watch event: 3
  • Delete event: 6
  • Issue comment event: 3
  • Push event: 16
  • Pull request event: 17
  • Fork event: 2

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 1
  • Total pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 minute
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 minute
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Sarthak-Kakkar-03 (1)
Pull Request Authors
  • Kev1CO (12)
  • pariterre (1)
  • ophlariviere (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 13 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 6
  • Total maintainers: 1
pypi.org: pysciencemode

Python interface to control the Rehastim2 and P24 devices.

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 13 Last month
Rankings
Dependent packages count: 10.0%
Forks count: 15.9%
Average: 28.2%
Stargazers count: 30.2%
Dependent repos count: 56.5%
Maintainers (1)
Last synced: 9 months ago