spkit.iffrft

spkit.iffrft(x, alpha)

Inverse Fast Fractional Fourier Transform

Inverse Fast Fractional Fourier Transform

Parameters:
x: complex-signal
alpha: scalar, 0<a<4
method: default=1
  • other methods to be implemented

Returns:
y: complex signal
  • reconstruction using IFRFT
  • imaginary part is mostly zero

See also

frft

Fractional Fourier Transform

ifrft

Inverse Fractional Fourier Transform

ffrft

Fast Fractional Fourier Transform

Notes

  • FRFT: frft Fractional Fourier Transform, is classic and more accepted approach. Compared to FFRFT

References

  • wikipedia

Examples

#sp.iffrft
import numpy as np
import matplotlib.pyplot as plt
import spkit as sp
t = np.linspace(0,2,500)
x = np.cos(2*np.pi*5*t)
xf = sp.ffrft(x,alpha=0.5)
x1 = sp.iffrft(xf,alpha=0.5)
plt.figure(figsize=(10,5))
plt.subplot(311)
plt.plot(t,x,label='x: input signal')
plt.xlim([t[0],t[-1]])
plt.xlabel('time (s)')
plt.ylabel('x')
plt.legend(loc='upper right')
plt.subplot(312)
plt.plot(t,xf.real,label='xf.real',alpha=0.9)
plt.plot(t,xf.imag,label='xf.imag',alpha=0.9)
plt.plot(t,np.abs(xf),label='|xf|',alpha=0.9)
plt.xlim([t[0],t[-1]])
plt.ylabel(r'xf: FRFT(x) $\alpha=0.5$')
plt.legend(loc='upper right')
plt.subplot(313)
plt.plot(t,x1.real,label='x1.real',alpha=0.9)
plt.plot(t,x1.imag,label='x1.imag',alpha=0.9)
plt.plot(t,np.abs(x1),label='|x1|',alpha=0.9)
plt.xlim([t[0],t[-1]])
plt.ylabel(r'x1: IFRFT(xf) $\alpha=0.5$')
plt.legend(loc='upper right')
plt.tight_layout()
plt.show()
../../_images/spkit-iffrft-1.png