#### Transcript Lecture19

```Fourier / Wavelet Analysis
ASTR 3010
Lecture 19
Textbook : N/A
Fourier Transform
in signal processing, (time and frequency)
Number of input data points  number of frequency sampling in FT!
Example of FFT in astronomy : defringing a spectrum
heavily fringed raw spectrum
power spectrum of the input
defringed spectrum
Limits on Fourier Transform
it can only “see” one variable (period or time) at a time at sufficient precision!
Short-Time Fourier Transform
• Using a window function in time
STFTx (t, f ) = ò [x(t)× w (t - t')]× e
*
t
• Limited by the Uncertainty Principle : t*ω = constant
-i 2pft
dt
STFT resolution
problem
• Four different Gaussian
windows
Wavelet Transform
• Wavelet transform can get two different information (i.e., time and
frequency) simultaneously!
Wavelet Transform
g (s,t ) =
ò
f (t)Ys,*t (t)dt
where basis function is
s : scale parameter
τ : translation parameter
f (t) = ò g (s,t )Ys,t (t) dt ds
1 æ t -t ö
Ys,t (t) =
Yç
÷
s è s ø
Practical use of wavelet transformation
• Decomposition and recomposition of a signal
http://www.pybytes.com/pywavelets
PyWavelets
• pywt
o
o
o
o
pywt.wavelist
pywt.wavelet
pywt.wavedec
pywt.waverec
import pywt
pywt.wavelist()
['bior1.1',
'bior1.3',
'bior1.5',
'bior2.2',
'bior2.4',
…
'coif1',
'coif2',
…
'db1',
'db2',
'db3',
…
'sym15',
'sym16',
'sym17',
'sym18',
'sym19',
'sym20']
http://www.pybytes.com/pywavelets
PyWavelets
• pywt
o
o
o
o
pywt.wavelist
pywt.wavelet
pywt.wavedec
pywt.waverec
import pywt
myw=pywt.wavelet(‘db4’)
phi,psi,wx = myw.wavefun()
plot(wx,phi,’r’)
plot(wx,psi,’b’)
Daubechies Wavelet : order 4
http://www.pybytes.com/pywavelets
PyWavelets
• pywt
o
o
o
o
pywt.wavelist
pywt.wavelet
pywt.wavedec
pywt.waverec
import pywt
myw=pywt.wavelet(‘sym20’)
phi,psi,wx = myw.wavefun()
plot(wx,phi,’r’)
plot(wx,psi,’b’)
Wavelets
Decomposition Tree
• decomposition of a signal into
several resolution levels.
• First, the original signal is
decomposed by two
complementary half-band
filters (high-pass and low-pass
filters) that divide a spectrum
into high-frequency (detail
coefficients; D1) and lowfrequency (approximation
coefficients; A1) components
(bands). For example, the lowpass filter will remove all halfband highest frequencies.
Information from only the low
frequency band (A1), with a
half number of points, will be
filtered in the second
decomposition level. The A2
outcome will be filtered again
for further decomposition.
PyWavelets
decomposition
reconstruction
• pywt
o
o
o
o
pywt.wavelist
pywt.wavelet
pywt.wavedec
pywt.waverec
import pywt
myw=pywt.wavelet(‘db4’)
dec =
myw.wavedec(data,’db4’,’zpd’,5)
PyWavelets
decomposition
reconstruction
• pywt
o
o
o
o
pywt.wavelist
pywt.wavelet
pywt.wavedec
pywt.waverec
import pywt
myw=pywt.wavelet(‘sym20’)
dec =
myw.wavedec(data,’sym20’,’zpd’
,5)
pywt : Denoising
import pywt
… set high order “difference” coeffs to zero.
… among “diff” coeffs, clip small coeffs < 0.2*sigma
… then, reconstruct
dec = myw.wavedec(data,’db4’,’zpd’,5)
http://www.toolsmiths.com/docs/CT199809.pdf
Wavelet: Denoising
Wavelet: Denoise in 2D
Wavelet: Denoise in 2D
http://www.pixinsight.com/doc/legacy/LE/21_noise_reduction/example_1/04.html
```