Changelog#
All notable changes to BiSPy are documented in this file. The format follows Keep a Changelog. Since 1.0.0, versions follow semantic versioning: changes that break existing code only happen in a new major version.
Releases up to 0.9.4.dev0 were development snapshots and have no changelog.
Unreleased#
1.1.0 - 2026-11-26#
Added#
utils.polarizationAxis(theta, chi)returns the polarization axis of an ellipse: the unit pure quaternion i S3 + j S1 + k S2 (normalized Stokes parameters), as expected byspectral.quaternionPSDand the filters. The filtering tutorial uses it.The spectral analysis tutorial explains why estimates are averaged: the periodogram of a single realization always has a degree of polarization of 1. Adapted from the second notebook of the EUSIPCO 2024 tutorial.
timefrequency.Hembedding.plot()displays the instantaneous amplitude, orientation, ellipticity and phase. The phase is unwrapped, including the jumps of pi that occur when the orientation wraps around.The time-frequency tutorial starts with a section on the quaternion embedding and the instantaneous polarization parameters, adapted from the third notebook of the EUSIPCO 2024 tutorial.
CITATION.cffgives the Zenodo concept DOI of BiSPy, so GitHub’s “Cite this repository” button includes it.A getting-started tutorial: bivariate signals as quaternion arrays, the polarization ellipse and its quaternion polar form, Stokes parameters and the Poincaré sphere, and the QFT. It is adapted from the first notebook of the EUSIPCO 2024 tutorial.
A tutorial on linear filtering (
filtersmodule): simulating a signal with a prescribed quaternion PSD with a Hermitian filter, rotating polarization states with a unitary filter, and splitting a signal in two with a Hermitian filter (an unpolarized remainder, or two uncorrelated polarized parts). Parts of it are adapted from the EUSIPCO 2024 tutorial by N. Le Bihan and J. Flamant.
Changed#
The docstring of
timefrequency.Hembeddingstates the expected input: the bivariate signal itself, not its quaternion embedding.The documentation uses the Sphinx Book Theme instead of the Read the Docs theme. Each page links to the GitHub repository, to the issue tracker and to its own source for edits.
Fixed#
utils.Stokes2geoandutils.normalizeStokesno longer emitRuntimeWarnings where there is no power (S0 = 0) or no polarization (Phi = 0). They return NaN there, as before. Sospectral.quaternionPSD.plot()is now silent for band-limited PSDs.utils.normalizeStokes, and soutils.Stokes2geo, ignore NaN values in S0 when computing the tolerance. Before, a single NaN made every output NaN, even withtol=0.Math written as
$...$in the tutorials is rendered as equations, instead of being shown as raw LaTeX.
1.0.0 - 2026-11-25#
First stable release, archived on Zenodo. The code is the same as in 0.10.0, apart from documentation fixes.
Added#
CITATION.cff: GitHub’s “Cite this repository” button and Zenodo use it to cite BiSPy.The documentation includes this changelog and documents
utils.polarizationEllipse.
Changed#
The tutorials are Jupyter notebooks run every time the documentation is built, so their outputs always match the current code. The notebooks moved from
notebooks/todocs/tutorials/.
Fixed#
The formula in the
utils.StokesNormdocstring had a wrong sign (the code was correct).
0.10.0 - 2026-11-25#
First release after the 0.9.x development snapshots. When upgrading, note that:
results change for
QCWTwith the Morlet wavelet (S0toS3are 4 times larger with the default parameters) and forHembeddingof odd-length signals, which were wrong before;progress messages are no longer printed but logged (see Changed);
some invalid operations now raise
ValueErrorinstead of silently giving wrong results.
Changed#
BiSPy is now distributed under the MIT License (previously CC-BY-4.0, and CeCILL before 2023).
Python 3.10 or later is required.
Packaging moved from
setup.pytopyproject.toml, built with uv. The PyPI name (bispy-polar) and the import name (bispy) are unchanged.Progress messages (“Computing Time-Frequency Stokes parameters”, “Ridge added”, “Number of data tapers: …”) are no longer printed. They go through Python’s
loggingmodule (loggersbispy.timefrequencyandbispy.spectral) and are silent unless enabled, for example withlogging.basicConfig(level=logging.INFO).utils.visual.plot3D,Periodogram.plotandMultitaper.plotno longer callfig.show(). Figures still display in notebooks; scripts callplt.show()as usual.
Added#
bispy.__version__.A test suite covering all modules, run in CI on Linux, macOS and Windows.
rngargument forsignals.bivariatewhiteNoiseandsignals.stationaryBivariate.simulate. A seed or anumpy.random.Generatorgives reproducible results without touching NumPy’s global random state. The default,rng=None, keeps using the global state, so results seeded withnp.random.seedare unchanged.Hembeddingoption ofsignals.bivariatewhiteNoise, returning the H-embedding (quaternion analytic signal) of the noise (#8).
Fixed#
quaternionPSD.plot()andquaternionPSD.plotStokes()crashed with matplotlib 3.1 and later.quaternionPSD.plot(single_sided=False)limited the frequency axis to (-π/4, π/4).Plotting functions advanced NumPy’s global random number generator (a random array set the figure aspect ratio), so making a plot changed the random numbers drawn afterwards.
utils.visual.plot2Dnow accepts complex input, as documented.spectral.quaternionPSD,filters.HermitianFilterandfilters.UnitaryFilter(and thereforesignals.stationaryBivariate) failed for odd signal lengths.HermitianFilterandUnitaryFilteroverwrote the caller’sK,eta,alphaandphiarrays with their symmetrized versions. The symmetrized arrays remain available as the filter attributesK,eta,alphaandphi.Adding two spectral estimates (
Periodogram,Multitaper) computed on different time arrays was silently accepted. It now raisesValueError, as intended.Multitaper+and*returned an object with the default bandwidth, whose per-taperdensitiesanddpssdid not match itsdensity. Results now keep the bandwidth and the combined per-taper densities. Adding twoMultitaperestimates with different bandwidths raisesValueError.With
computeFlag=False, a later call tocompute()did not update the Stokes parameters (nor, forMultitaper,density), andMultitaper.compute()ignored the bandwidth given to the constructor.QSTFT.extractRidges()(andQSTFT.compute(ridges=True)) failed whennfftwas not given.timefrequency.Hembeddingwas inexact for odd signal lengths: the highest positive frequency was halved, so the embedding no longer contained the original signal. Even lengths are unchanged.QSTFT.plotRidges()andQCWT.plotRidges()crashed when no ridge was found.An unknown
normoption for Morse wavelets inQCWT.computeraised an obscureUnboundLocalError. It now raises aValueErrornaming the valid options,'bandpass'and'energy'.Values change:
QCWTwith the Morlet wavelet used a wrong normalization constant ((...)**1/2instead of(...)**(-1/2)). Coefficients were too small by a factor 2·sqrt(1 + exp(-η²) - 2 exp(-3η²/4)), which equals 2 for the default η = 2π. With the default,tfpris now 2 times larger andS0,S1,S2,S3are 4 times larger. Normalized Stokes parameters, orientation, ellipticity and ridges are unchanged. Morse wavelets are not affected.