Nyquist Frequency and Window Length
(this should possibly be a comment but I don't have the rep yet, so I'm submitting it as an answer) Restricting your view of the signal to a finite time window will always introduce artifacts, unless the signal itself is zero everywhere outside of that window. Using a &quot;square&quot; window (simple sampling the signal for a finite duration) will have the effect of convolving the signal's true spectrum with a Dirichlet Sinc function (Dirichlet Kernel). See https://en.wikipedia.org/wiki/Window_function#Spectral_analysis