A Python package aiming to provide an easy and efficient interface to various implementations of the Hexagonal Fast Fourier Transform.
See this blog post for background.
from hexfft import HexArray
from hexfft.plot import hexshow
import numpy as np
data = np.random.normal(size=(8, 6))
h = HexArray(data)
hexshow(h)
from hexfft import fft, ifft
X = fft(h)
from hexfft import FFT
shape = (32, 32)
fftobj = FFT(shape, periodicity="hex") # or "rect"
x = np.random.normal(size=(10, 32, 32))
X = fftobj.forward(x)
xx = fftobj.inverse(X)
...
1 - HexArray
and visualization
2 - FFT with rectangular periodicity
3 - FFT with hexagonal periodicity
pip install hexfft
The only dependencies are numpy
, scipy
, and matplotlib
. pytest
is required to run the tests.
git clone [email protected]:chris-langfield/hexfft.git
pip install -e hexfft/
cd hexfft
pytest tests/
R. M. Mersereau, "The processing of hexagonally sampled two-dimensional signals," in Proceedings of the IEEE, vol. 67, no. 6, pp. 930-949, June 1979, doi: 10.1109/PROC.1979.11356
J. C. Ehrhardt, “Hexagonal fast Fourier transform with rectangular output,” IEEE Transactions on Signal Processing, vol. 41, no. 3. Institute of Electrical and Electronics Engineers (IEEE), pp. 1469–1472, Mar. 1993. doi: 10.1109/78.205759.