GUI for the StimJim Open Source electrophysiology stimulator
  • Python 99.2%
  • Shell 0.4%
  • Batchfile 0.4%
Find a file
2025-04-29 02:26:12 +00:00
resources First working version 2024-02-06 23:23:25 -05:00
src Merge branch 'main' into broadcast 2024-11-06 23:15:59 -05:00
.gitignore First working version 2024-02-06 23:23:25 -05:00
Installation.md Create Installation.md 2025-04-29 02:19:44 +00:00
LICENSE Initial commit 2024-02-06 23:21:20 -05:00
README.md Update README.md 2025-04-29 02:26:12 +00:00
requirements.txt added requirements.txt 2024-11-06 23:07:01 -05:00
setup.bat Create setup.bat 2025-04-29 02:23:24 +00:00
setup.sh Create setup.sh 2025-04-29 02:22:34 +00:00
StimJimGUI.py added option to broadcast StimJim train summary to OpenEphys GUI 2024-06-26 08:58:09 -04:00

StimJimGUI

GUI for the StimJim Open Source electrophysiology stimulator

The GUI offers two modes:

Simple Mode

Screenshot 2024-02-06 230855

In "Simple Mode", a rising pulse on TRIG0 triggers the output of a train of stimuli on OUT0, while a rising pulse on TRIG1 triggers OUT1. You can adjust the number and frequency of the output, as well as its intensity and duration of the pulses.

Bipolar mode

Checking the "bipolar checkbox" creates a bipolar pulse such as each stimulus is immediately followed by a stimulus of opposite amplitude. Both pulses have equal duration and their combined duration is equal to the pulse duration shown in the corresponding box.

Threshold

Amplitudes can be expressed in V or A (depending on the chosen output mode), or can be expressed relative to a "threshold" value. When the threshold amplitude as been measured, click on the threshold button, the value of the threshold amplitude now appear next to the button, and the pulse amplitude is expressed as a multiple of the threshold value (e.g. If the threshold were 200mV, 1.5 xT would correspond to a pulse 300 mV in amplitude)

"Full Mode"

Screenshot 2024-02-06 233854

In "Full Mode", all the settings can be freely adjusted as described in the StimJim Documentation

Screenshot 2024-02-06 230539

Usage

🚀 Installation and Running

Platform Python


📥 Quick Setup (One Command)

Windows (Command Prompt or PowerShell)

setup.bat

macOS / Linux (Terminal)

bash setup.sh

🛠️ These scripts:

  • Create and activate a virtual environment called StimJimGUI
  • Install all dependencies from requirements.txt
  • Optionally launch the application after installation

🛠 Manual Setup (Step-by-Step)

1. Install Python
  • Windows/macOS: Download from python.org.
  • Linux: Install via:
sudo apt update
sudo apt install python3 python3-venv python3-pip

Verify installation:

python --version

or

python3 --version
2. Clone the Repository
git clone https://github.com/MarinManuel/StimJimGUI.git
cd StimJimGUI
3. Create and Activate the Virtual Environment

Windows:

python -m venv StimJimGUI
.\StimJimGUI\Scripts\activate

macOS/Linux:

python3 -m venv StimJimGUI
source StimJimGUI/bin/activate
4. Install Dependencies
pip install --upgrade pip
pip install -r requirements.txt
5. Run the Application
python main.py

⚙️ Common Problems

  • pip not recognized: Make sure Python and pip are added to your PATH.
  • Linux/macOS permissions: Try adding sudo if needed.
  • Alternative (conda environment): Supported if you prefer.

Running

  1. Activate the environment
  2. Launch the GUI: python StimJimGUI.py The software attempts to detect the serial port automatically, but you can also specify the port to use using the --port command line argument

Other command line arguments:

usage: StimJimGUI [-h] [-p PORT] [-l LOG] [-v]

This software provides a graphical user interface for controlling a StimJim, an open source electrophysiology stimulator for physiology and behavior

optional arguments:
  -h, --help            show this help message and exit
  -p PORT, --port PORT  the serial port used to communicate with the StimJim. If not provided, then the software will try to find the port automatically, and/or offer a choice of possible ports
  -l LOG, --log LOG     save the log file to file FILENAME
  -v, --verbose         increase verbosity of output (can be repeated to increase verbosity further)

Acknowledgments

This work was supported in part by NIH-NINDS R01NS132487.

scientific_spinbox.py is from pyqt-labutils

Icons by Icons8