Metadata-Version: 2.4
Name: bispy-polar
Version: 0.10.0
Summary: An open-source Python framework for processing bivariate signals.
Keywords: signal processing,bivariate signals,polarization,quaternion,time-frequency analysis,spectral analysis
Author: Julien Flamant
Author-email: Julien Flamant <julien.flamant@cnrs.fr>
License-Expression: MIT
License-File: LICENCE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Dist: numpy>=1.25
Requires-Dist: scipy>=1.10
Requires-Dist: matplotlib>=3.7
Requires-Dist: numpy-quaternion>=2024.0.2
Requires-Python: >=3.10
Project-URL: Homepage, https://github.com/jflamant/bispy
Project-URL: Documentation, https://jflamant.github.io/bispy/
Project-URL: Source, https://github.com/jflamant/bispy
Project-URL: Issues, https://github.com/jflamant/bispy/issues
Description-Content-Type: text/markdown

# BiSPy : Bivariate Signal Processing with Python

[![docs-page](https://img.shields.io/badge/docs-latest-blue)](https://jflamant.github.io/bispy/)
[![PyPI version](https://badge.fury.io/py/bispy-polar.svg)](https://badge.fury.io/py/bispy-polar)
[![Tests](https://github.com/jflamant/bispy/actions/workflows/tests.yml/badge.svg)](https://github.com/jflamant/bispy/actions/workflows/tests.yml)

BiSPy is an open-source python framework for processing bivariate signals. It supports our papers on time-frequency analysis [1], spectral analysis [2] and linear time-invariant filtering [3] of bivariate signals.

> [1] Julien Flamant, Nicolas Le Bihan, Pierre Chainais: “Time-frequency analysis of bivariate signals”, Applied and Computational Harmonic Analysis, 2017; [arXiv:1609.0246](http://arxiv.org/abs/1609.02463), [doi:10.1016/j.acha.2017.05.007](https://doi.org/10.1016/j.acha.2017.05.007)

> [2] Julien Flamant, Nicolas Le Bihan, Pierre Chainais: “Spectral analysis of stationary random bivariate signals”, 2017, IEEE Transactions on Signal Processing; [arXiv:1703.06417](http://arxiv.org/abs/1703.06417), [doi:10.1109/TSP.2017.2736494](https://doi.org/10.1109/TSP.2017.2736494)

> [3] Julien Flamant, Pierre Chainais, Nicolas Le Bihan: “A complete framework for linear filtering of bivariate signals”, 2018; IEEE Transactions on Signal Processing; [arXiv:1802.02469](https://arxiv.org/abs/1802.02469), [doi:10.1109/TSP.2018.2855659](https://doi.org/10.1109/TSP.2018.2855659)

These papers contains theoretical results and several applications that can be reproduced with this toolbox.


This python toolbox is currently under development and is hosted on GitHub. If you encounter a bug or something unexpected please let me know by [raising an issue](https://github.com/jflamant/bispy/issues) on the project page.

### Install from PyPi

Because of a name conflict, the package is published on PyPI as `bispy-polar`. To install it, type

```
pip install bispy-polar
```

or, in a [uv](https://docs.astral.sh/uv/) project, `uv add bispy-polar`. Dependencies are installed automatically (see below).

To get started, simply use 
```
import bispy as bsp
```

Requirements
============
BiSPy works with Python 3.10+.

Dependencies:
 -   [NumPy](http://www.numpy.org)
 -   [SciPy](https://www.scipy.org)
 -   [Matplotlib](http://matplotlib.org)
 -   [numpy-quaternion](https://github.com/moble/quaternion)

[numpy-quaternion](https://github.com/moble/quaternion) adds quaternion dtype support to numpy. Implementation by [moble]. Since this python toolbox relies extensively on this module, you can check out first the nice introduction [here](https://github.com/moble).


License
=======
This software is distributed under the [MIT License](LICENCE).

Cite this work
==============
If you use this package for your own work, please consider citing it with this piece of BibTeX:

```bibtex
@misc{BiSPy,
    title =   {{BiSPy: an Open-Source Python project for processing bivariate signals}},
    author =  {Julien Flamant},
    year =    {2018},
    url =     {https://github.com/jflamant/bispy/},
    howpublished = {Online at: \url{github.com/jflamant/bispy/}},
    note =    {Code at https://github.com/jflamant/bispy/, documentation at https://bispy.readthedocs.io/}
}
```

Development
===========
The project is managed with [uv](https://docs.astral.sh/uv/). The file `uv.lock` pins the exact versions of every dependency used for development and CI.

```shell
git clone https://github.com/jflamant/bispy.git && cd bispy
uv sync                      # create .venv with bispy and all dev tools
uv run pytest                # run the test suite
uv run ruff check            # lint
uv run sphinx-build -b html docs docs/_build/html   # build the docs
```

The test suite contains three kinds of tests:
- **Property tests** check mathematical identities (round trips, Parseval, symmetries).
- **Snapshot tests** compare outputs with reference values stored in `tests/<module>/*.npz`. After an intentional change to numerical results, regenerate them with `uv run pytest --force-regen`, check that the change is the expected one, and commit the updated `.npz` files.
- **Known-bug tests** are marked `xfail`; `uv run pytest -rx` lists them. Once a bug is fixed its test passes, and pytest reports a failure until the `xfail` marker is removed.

To make a release:
1. Set the version with `uv version X.Y.Z`. This updates `pyproject.toml` and `uv.lock`.
2. Commit, then tag `vX.Y.Z`.
3. Publish a GitHub Release from that tag. CI tests the package, builds it and uploads it to PyPI.
