Interface to Lab Streaming Layer LSL in ezmsg.
pip install ezmsg-lslOr install the latest development version:
pip install git+https://github.com/ezmsg-org/ezmsg-lsl@devezmsgpylslnumpy
See the examples folder for more details.
LSLOutletUnit publishes incoming AxisArray messages to an LSL stream. Key settings (LSLOutletSettings):
stream_name/stream_type— name and type advertised on the LSL stream.use_message_timestamp(defaultTrue) — push samples with the incoming message timestamps, or withpylsl.local_clock()whenFalse.assume_lsl_clock(defaultFalse) — whenuse_message_timestampisTrue, whether the incoming timestamps are already in the LSL clock (otherwise they are converted from the system clock).sync_blocking(defaultFalse) — whenTrue, the outlet is created with thepylsl.transp_sync_blockingtransport flag, enabling the synchronous (zero-copy) outlet mode for high-bandwidth streams. Requirespylsl >= 1.18.3b1. LeaveFalsefor the standard asynchronous transport.
from ezmsg.lsl.outlet import LSLOutletUnit
outlet = LSLOutletUnit(
stream_name="my_stream",
stream_type="EEG",
sync_blocking=True, # synchronous zero-copy transport
)We use uv for development. It is not strictly required, but if you intend to contribute to ezmsg-lsl then using uv will lead to the smoothest collaboration.
- Install
uvif not already installed. - Fork ezmsg-lsl and clone your fork to your local computer.
- Open a terminal and
cdto the cloned folder. uv syncto create a .venv and install dependencies.- (Optional) Install pre-commit hooks:
uv run pre-commit install - After editing code and making commits, Run the test suite before making a PR:
uv run pytest tests- Currently, there are no substantial tests.