|
1 | | -# ezmsg.sigproc |
| 1 | +# ezmsg-sigproc |
2 | 2 |
|
3 | | -## Overview |
| 3 | +Signal processing primitives for the [ezmsg](https://www.ezmsg.org) message-passing framework. |
4 | 4 |
|
5 | | -ezmsg-sigproc offers timeseries signal‑processing primitives built atop the ezmsg message‑passing framework. Core dependencies include ezmsg, numpy, scipy, pywavelets, and sparse; the project itself is managed through hatchling and uses VCS hooks to populate __version__.py. |
| 5 | +## Features |
6 | 6 |
|
7 | | -## Installation |
8 | | - |
9 | | -Install the latest release from pypi with: `pip install ezmsg-sigproc` (or `uv add ...` or `poetry add ...`). |
10 | | - |
11 | | -You can install pre-release versions directly from GitHub: |
| 7 | +* **Filtering** - Chebyshev, comb filters, and more |
| 8 | +* **Spectral analysis** - Spectrogram, spectrum, and wavelet transforms |
| 9 | +* **Resampling** - Downsample, decimate, and resample operations |
| 10 | +* **Windowing** - Sliding windows and buffering utilities |
| 11 | +* **Math operations** - Arithmetic, log, abs, difference, and more |
| 12 | +* **Signal generation** - Synthetic signal generators |
12 | 13 |
|
13 | | -* Using `pip`: `pip install git+https://github.com/ezmsg-org/ezmsg-sigproc.git@dev` |
14 | | -* Using `uv`: `uv add git+https://github.com/ezmsg-org/ezmsg-sigproc --branch dev` |
15 | | -* Using `poetry`: `poetry add "git+https://github.com/ezmsg-org/ezmsg-sigproc.git@dev"` |
| 14 | +All modules use `AxisArray` as the primary data structure for passing signals between components. |
16 | 15 |
|
17 | | -> See the [Development](#development) section below for installing with the intention of developing. |
18 | | -
|
19 | | -## Source layout & key modules |
20 | | -* All source resides under src/ezmsg/sigproc, which contains a suite of processors (for example, filter.py, spectrogram.py, spectrum.py, sampler.py) and math and util subpackages. |
21 | | -* The framework’s backbone is base.py, defining standard protocols—Processor, Producer, Consumer, and Transformer—that enable both stateless and stateful processing chains. |
22 | | -* Filtering is implemented in filter.py, providing settings dataclasses and a stateful transformer that applies supplied coefficients to incoming data. |
23 | | -* Spectral analysis uses a composite spectrogram transformer chaining windowing, spectrum computation, and axis adjustments. |
| 16 | +## Installation |
24 | 17 |
|
25 | | -## Operating styles: Standalone processors vs. ezmsg pipelines |
26 | | -While each processor is designed to be assembled into an ezmsg pipeline, the components are also well‑suited for offline, ad‑hoc analysis. You can instantiate processors directly in scripts or notebooks for quick prototyping or to validate results from other code. The companion Unit wrappers, however, are meant for assembling processors into a full ezmsg pipeline. |
| 18 | +Install from PyPI: |
27 | 19 |
|
28 | | -A fully defined ezmsg pipeline shines in online streaming scenarios where message routing, scheduling, and latency handling are crucial. Nevertheless, you can run the same pipeline offline—say, within a Jupyter notebook—if your analysis benefits from ezmsg’s structured execution model. Deciding between a standalone processor and a full pipeline comes down to the trade‑off between simplicity and the operational overhead of the pipeline: |
| 20 | +```bash |
| 21 | +pip install ezmsg-sigproc |
| 22 | +``` |
29 | 23 |
|
30 | | -* Standalone processors: Low overhead, ideal for one‑off or exploratory offline tasks. |
31 | | -* Pipeline + Unit wrappers: Additional setup cost but bring concurrency, standardized interfaces, and automatic message flow—useful when your offline experiment mirrors a live system or when you require fine‑grained pipeline behavior. |
| 24 | +Or install from GitHub for the latest development version: |
32 | 25 |
|
33 | | -## Documentation & tests |
34 | | -* `docs/ProcessorsBase.md` details the processor hierarchy and generic type patterns, providing a solid foundation for custom components. |
35 | | -* Unit tests (e.g., `tests/unit/test_sampler.py`) offer concrete examples of usage, showcasing sampler generation, windowing, and message handling. |
| 26 | +```bash |
| 27 | +pip install git+https://github.com/ezmsg-org/ezmsg-sigproc.git@dev |
| 28 | +``` |
36 | 29 |
|
37 | | -## Where to learn next |
38 | | -* Study docs/ProcessorsBase.md to master the processor architecture. |
39 | | -* Explore unit tests for hands‑on examples of composing processors and Units. |
40 | | -* Review the ezmsg framework in pyproject.toml to understand the surrounding ecosystem. |
41 | | -* Experiment with the code—try running processors standalone and then integrate them into a small pipeline to observe the trade‑offs firsthand. |
| 30 | +## Documentation |
42 | 31 |
|
43 | | -This approach equips newcomers to choose the right level of abstraction—raw processor, Unit wrapper, or full pipeline—based on the demands of their analysis or streaming application. |
| 32 | +Full documentation is available at [ezmsg.org](https://www.ezmsg.org). |
44 | 33 |
|
45 | 34 | ## Development |
46 | 35 |
|
47 | | -We use [`uv`](https://docs.astral.sh/uv/getting-started/installation/) for development. It is not strictly required, but if you intend to contribute to ezmsg-sigproc then using `uv` will lead to the smoothest collaboration. |
| 36 | +We use [`uv`](https://docs.astral.sh/uv/) for development. |
48 | 37 |
|
49 | | -1. Install [`uv`](https://docs.astral.sh/uv/getting-started/installation/) if not already installed. |
50 | | -2. Fork ezmsg-sigproc and clone your fork to your local computer. |
51 | | -3. Open a terminal and `cd` to the cloned folder. |
52 | | -4. `uv sync` to create a .venv and install dependencies. |
53 | | -5. `uv run pre-commit install` to install pre-commit hooks to do linting and formatting. |
54 | | -6. Run the test suite before finalizing your edits: `uv run pytest tests` |
55 | | -7. Make a PR against the `dev` branch of the main repo. |
| 38 | +1. Fork and clone the repository |
| 39 | +2. `uv sync` to create a virtual environment and install dependencies |
| 40 | +3. `uv run pre-commit install` to set up linting and formatting hooks |
| 41 | +4. `uv run pytest tests` to run the test suite |
| 42 | +5. Submit a PR against the `dev` branch |
0 commit comments