Git Product home page Git Product logo

frft's Introduction

frft: Multi-dimensional fractional Fourier transform in Python

CHANGELOG

May 24 2022

Created GPU implementation with PyTorch. To use the GPU module like the CPU module, the following changes need to be made.
- Module import: python import frft_gpu as frft - Conversion of the input array from fftshifted numpy array to fftshifted PyTorch array. See tutorial for details.

Measured the runtimes in the tutorial more accurately.

Introduction

The fractional Fourier transform (FRFT) is a valuable signal processing tool used in optics, physics, and radar engineering. It generalizes the familiar Fourier transform into real/reciprocal phase space as a partial rotation between these two spaces. Signal information represented in the fractional Fourier space can sometimes be far more illuminating than the Fourier transform.

Numerical convention

The definition of the one-dimensional FRFT for a parameter $\alpha \in \mathbb{R}$ can be found in Wikipedia. In our convention, $\alpha = 1$ indicates a quarter of the cycle of repetition, corresponding to a phase space 'rotation' of $\pi/2$ or $90^\circ$. Thus, the periodicity in $\alpha$ is $4$.

Implementation

The code uses Numpy's native fftn routine and therefore can be used for transforms of any dimensionality. This implementation follows the theory described in Ozaktas et al. \cite{Ozaktas1996}. It computes the FRFT as the chirp-modulated signal convolved with a chirp function, followed by a final chirp modulation. The chirp function (i.e., a parabolic phase) resides as an array within the namespace of the imported module. It is recalculated whenever the dimensions of the input array change. 1-D, 2-D and 3-D example data is provided as an HDF5 file data.hdf5.

Caveats

  1. Currently does not preserve signal norm. This has to be done manually. Will soon add a normalization parameter, similar to norm="ortho" in numpy.fftn.
  2. Currently selective transforms along user-defined dimensions are not implemented; transforms along all dimensions of the input array by default.

Tutorial

Here is a basic tutorial.

In these tutorials, the FRFT will be simulated in the range $\alpha \in [0, 2]$. This corresponds to the original signal ($\alpha = 0$) through to its Fourier transform ($\alpha = 1$), and ending with the inverted signal ($\alpha = 2$).

Acknowledgements

  • Dr. Ishwor Poudyal (Argonne National Laboratory) for generating the example data.

References

(Ozaktas, Arikan et al., 1996) H.M. Ozaktas, O. Arikan, M.A. Kutay and G. Bozdagt, Digital computation of the fractional Fourier transform, IEEE Transactions on signal processing, vol. 44, number 9, pp. 2141--2150, 1996.

frft's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.