spkit.frft

spkit.frft(x, alpha=0.1, method=1, verbose=0)

Fractional Fourier Transform

Fractional Fourier Transform

Fα(x)=FRFT(x)
Parameters:
x: real signal
alpha: scalar, 0<a<4
method=1, other methods to be implemented
Returns:
Y: complex signal

See also

ifrft

Inverse Fractional Fourier Transform

ffrft

Fast Fractional Fourier Transform

iffrft

Inverse Fast Fractional Fourier Transform

Notes

#TODO

References

Examples

#sp.frft
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.frft(x,alpha=0.5)
plt.figure(figsize=(10,4))
plt.subplot(211)
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(212)
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.tight_layout()
plt.show()
../../_images/spkit-frft-1.png

Examples using spkit.frft

Analysis and Synthesis Models

Analysis and Synthesis Models

Fractional Fourier Transform: FRFT

Fractional Fourier Transform: FRFT