Learning Scientific Programming with Python (2nd edition)

P6.7.1: Apodization

Question P6.7.1

Consider a signal in the time domain defined by the function $$ f(t) = \cos ( 2\pi \nu t) e^{-t/\tau}, $$ with frequency $\nu = 250\;\mathrm{Hz}$ decaying exponentially with a lifetime $\tau = 0.2\;\mathrm{s}$. Plot the function, sampled at 1000 Hz, and its discrete Fourier transform against frequency. Examine, by means of a suitable plot, the effect of apodization on the DFT by truncating the time sequence after (a) 0.5 s, (b) 0.2 s.