In [1]:
using PyPlot
import DSP
In [2]:
include("../juwvid.jl")
Out[2]:
In [3]:
# multicomponent data (modified Example 6.2.2)
nsample=200
t,x=sampledata.genmultifm622x(nsample);
PyPlot.plot(t,x)
Out[3]:
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)
Out[4]:
In [5]:
# STFT does not, but it's a poor resolution
tfrstfta=stft.tfrstft(x);
PyPlot.imshow(abs.(tfrstfta[100:-1:1,:]))
Out[5]:
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)
Out[6]:
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,:]))
Out[7]:
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)
Out[8]:
In [ ]: