Python example UI for OPEN LIFU used for Hardware Testing and Basic Usage
- Python 3.10 or later: Make sure you have Python 3.10 or later installed on your system. You can download it from the official Python website.
-
Clone the repository:
git clone https://github.com/OpenwaterHealth/OpenLIFU-TestAPP.git cd OpenLIFU-TestAPP -
Create and activate a virtual environment (recommended):
python -m venv .venv # On Windows: .venv\Scripts\activate # On macOS/Linux: source .venv/bin/activate
-
Install the application with dependencies:
# Install base dependencies pip install -e . # Or install with development tools pip install -e .[dev] # Or install with test dependencies pip install -e .[test] # Or install everything pip install -e .[dev,test]
-
Install OpenLIFU Python:
git clone https://github.com/OpenwaterHealth/OpenLIFU-python.git cd OpenLIFU-python pip install -e . cd ..
-
Run the application:
python main.py
The Demo page displays a few timing and frequency fields in operator-friendly units. Internally, solution data and device configuration still use SI base units.
- Frequency in the UI is shown in kHz.
- Example:
400in the UI is stored/sent as400000Hz.
- Example:
- Duration in the UI is shown in uS.
- Example:
200in the UI is stored/sent as0.0002s.
- Example:
- Pulse Interval in the UI is shown in ms.
- Example:
100in the UI is stored/sent as0.1s.
- Example:
Additional notes:
- Pulse Train Interval remains in seconds in the UI.
- Loading a solution from JSON converts SI values back to UI units for these fields.
- Sending a solution to configuration/plot paths converts those displayed values back to SI units.
Simply double-click build.bat or run it from command prompt:
build.bat-
Install development dependencies:
pip install -e .[dev]
-
Run the build script:
python build.py
-
Find your executable:
- Executable location:
dist/OpenLIFU-TestApp/ - Use the launcher:
dist/OpenLIFU-TestApp/launch.bat
- Executable location:
The build script automatically:
- Cleans previous builds
- Creates a one-folder distribution
- Includes all QML files and assets
- Creates a Windows launcher script
- Handles PyQt6 and other dependencies
