Industrialise ind_ls_r2x4
Driver package for the R2X4 programmable light source from Industrialise.
The R2X4 is a powerful and precise programmable constant-current LED light source. It has four independent LED channels and is temperature stabilized. It is powered using USB Power Delivery or by a DC adapter.
Installation
The package can be installed from PyPI using pip or uv:
pip install ind-ls-r2x4
uv add ind-ls-r2x4
There is an optional Qt-based GUI available, next to a tkinter-based one.
The Qt GUI uses QtPy to abstract the Qt backend. The package can be installed with:
pip install qtpy
uv add qtpy
The actual Qt backend needs to be installed separately. For example, to use the PySide6 backend:
pip install PySide6-Essentials
uv add PySide6-Essentials
PySide2, PyQt5 and PyQt6 are also supported. Checkout the QtPy documentation for information on which version of backend
is supported by which version of QtPy.
There is also a R2X4Panel available for use in Gamma Desk which uses the same widget as the Qt GUI. Check the
ls_r2x4.gui.gdesk_panel module for more information. To install Gamma Desk:
pip install gamma-desk PySide6
uv add gamma-desk PySide6
Usage
Demo
A text-based demo is started when the package is run as a module:
python -m ls_r2x4
uv run -m ls_r2x4
These top level scripts are available when the Python environment is active:
-
r2x4_gui_tkinter: Start the GUI using thetkinterbackend. -
r2x4_gui_qt: Start the GUI using a Qt backend. This is needspyqtorpysideto be installed! -
r2x4_demo: Start the same demo as when the package is run as a script.
More demo scripts are available in the ls_r2x4.demo.demo module.
JupyterLab users may refer to a demo Jupyter Notebook available in the ls_r2x4.demo folder.
GUI
To run the GUI, run:
r2x4_gui_qt
uvx --from ind-ls-r2x4 --with pyside6,qtpy r2x4_gui_qt
Programming API
The main class to use is the LightSourceR2X4 class.
from ls_r2x4 import LightSourceR2X4
ls = LightSourceR2X4()
ls.connect()
A serial port name can be passed to the constructor, if left None it will try to find the correct port automatically.
Once the instance is connected, the light source can be controlled using the methods and attributes of the class.
import time
ls.triggering_force_a_channels()
ls.blue_a.value = 5 # set the blue a channel to 5%
ls.red_b.value = 3 # set the red b channel to 3%
time.sleep(2)
ls.triggering_force_b_channels()
time.sleep(1)
ls.blue_a.value = 0 # turn back off
ls.red_b.value = 0
Checkout the demo scripts for more examples.
Metadata
Release files for ind-ls-r2x4 0.4.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ind_ls_r2x4-0.4.6.tar.gz | 114.2 kB | Without provenance | Details for ind_ls_r2x4-0.4.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ind_ls_r2x4-0.4.6-py3-none-any.whl | Python 3 | none | any | Details for ind_ls_r2x4-0.4.6-py3-none-any.whl |
Total release size: 149.4 kB
Release files / ind_ls_r2x4-0.4.6.tar.gz
| Download URL | ind_ls_r2x4-0.4.6.tar.gz |
|---|---|
| Size | 114.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2308f3132473697db254942154bc4cb4521fd1dce920c2a13eacf9b2b8b76333
|
|
BLAKE2b-256 checksum How to use checksums |
d4cd71de2fc0ef55633017bd749b74c4105d58ddcddce45233cb3b695489a4d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ind_ls_r2x4-0.4.6-py3-none-any.whl
| Download URL | ind_ls_r2x4-0.4.6-py3-none-any.whl |
|---|---|
| Size | 35.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
69f4d0122bc6551cb0ea742d784dc34c1788bb0535acf3c965631e6971522526
|
|
BLAKE2b-256 checksum How to use checksums |
27a05f854e02d1d8ac59781712a7457367060d1781538e31d68041c28d9af362
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for ind-ls-r2x4 0.4.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.