S-method with NUFFT


In [1]:
using PyPlot
import DSP

In [2]:
include("../juwvid.jl")


Out[2]:
juwvid

In [3]:
# multicomponent data (modified Example 6.2.2)
nsample=200
t,x=sampledata.genmultifm622x(nsample);
PyPlot.plot(t,x)


Out[3]:
1-element Array{PyCall.PyObject,1}:
 PyObject <matplotlib.lines.Line2D object at 0x7ff8db6b35f8>

In [4]:
# Wigner Ville suffers the cross talk
z=DSP.Util.hilbert(x);
tfr=cohenclass.tfrwv(z);
PyPlot.imshow(abs.(tfr[end:-1:1,:]),aspect=0.5)


Single Wigner Ville
Use fft.
Out[4]:
PyObject <matplotlib.image.AxesImage object at 0x7ff8db640c18>

In [5]:
# STFT does not, but it's a poor resolution
tfrstfta=stft.tfrstft(x);
PyPlot.imshow(abs.(tfrstfta[100:-1:1,:]))


Use fft.
Out[5]:
PyObject <matplotlib.image.AxesImage object at 0x7ff8da8a4a20>

In [6]:
# The results of the STFT w/ NUFFT shows that the poor resolution is not due to the sampling rate
fin=collect(linspace(10,75,nsample*16));
tfrstft=stft.tfrstft(x,NaN,NaN,fin,NaN,NaN,4);
PyPlot.imshow(abs.(tfrstft[end:-1:1,:]),aspect=0.03)


Use nufft.
Out[6]:
PyObject <matplotlib.image.AxesImage object at 0x7ff8da882160>

In [7]:
# The S-method w/o NuFFT suppresses the cross talk. 
sm=smethod.tfrsm(x,NaN,5,NaN,2)
PyPlot.imshow(Real.(sm[100:-1:1,:]))


Single S-method
Use fft.
Out[7]:
PyObject <matplotlib.image.AxesImage object at 0x7ff8da5cbf98>

In [8]:
# The S-method w/ NuFFT improves the sampling rate.
fin=collect(linspace(10,75,nsample*8));
sm=smethod.tfrsm(x,NaN,100,fin,2)
PyPlot.imshow(Real.(sm[end:-1:1,:]),aspect=0.06)


Single S-method
Use nufft.
Out[8]:
PyObject <matplotlib.image.AxesImage object at 0x7ff8da5aa4e0>

In [ ]: