I had some problems with scalloping and spectral leakage. I think I solved that.

I wrote an algorithm in C++ using FFTW3. It works. But now I want to show when you get scalloping.

It took me some time to really understand what is going on. To understand that a rectangular window has a sinc function as the DFT. And that you can have the bins of the sinc function at zero if you have integer numbers of periods in the window.

I read the Harris paper and it helped.

So I try to create a pure sine with certain sampling frequency and a certain window size to create scalloping. I can get leakage, but only the Eiffel Tower effect/leakage skirt. Shouldn't I get the most scalloping when there are 1.5 periods in a window?

For example, in this pdf: http://m.eet.com/media/1051177/Windowing_pt1_Carnes.pdf

I want to get something as shown in figure 1, but all I get is something like figure 4. I do not understand the difference between scalloping and Eiffel tower effect and this causes me to not be able to accurately show how windowing function helps.

Are they all secretly using zero-padding? Or you get scalloping only with infinitely high resolution? I don't get it. What dataset do I DFT to get extreme scalloping? Ill try it with matlab and my algorithm. But I can't generate it myself.

  • $\begingroup$ When it comes to demonstration, I already did similar stuff before that can be simply re-used. $\endgroup$
    – jojeck
    Aug 12, 2016 at 11:45
  • $\begingroup$ You also don't get scalloping. $\endgroup$
    – Almeisan
    Aug 12, 2016 at 12:13
  • $\begingroup$ Well, I do get it, but you can't see it directly without zero-padding. Please see other answer $\endgroup$
    – jojeck
    Oct 8, 2017 at 9:08
  • 1
    $\begingroup$ @Almeisan there's strong indication that jojek knows what he's talking about, and you're not. I recommend that you carefully read and try to evaluate the actually good answers you've gotten – you got quite some misconceptions and are liable to bad temper. $\endgroup$ Oct 20, 2017 at 20:36
  • 1
    $\begingroup$ Also, you must not vandalize your questions; we've discussed this before. $\endgroup$ Oct 20, 2017 at 20:37

1 Answer 1


With a low number of periods of a strictly real signal per FFT length, the positive frequency and negative frequency Sincs interfere. Try a higher number of periods (but not near Fs/2), or a complex exponential. Also zero pad by a multiple of your rectangular window length, that multiple being the number of samples of each Sinc lobe you want to see in the FFT result.

  • $\begingroup$ This is what I get from 300 * sin(6*Pi*t), so a 3 Hz sine. I Sample 15 times a second: i563.photobucket.com/albums/ss73/Harunobu/signal.png I create 4096 datapoints in a single 4096 window. This is what I get: i563.photobucket.com/albums/ss73/Harunobu/leakage.png No scalloping and no meaningful effect of the Hamming window. No zero-padding, but that seems pointless to even try anyway. Don't understand why it is done and can't imagine everyone is secretly doing it, without mentioning, then doing something to get rid of the artifacts it causes. $\endgroup$
    – Almeisan
    Aug 12, 2016 at 18:22
  • $\begingroup$ Padding creates a mess, Hamming does little to alleviate. But no scalloping. i563.photobucket.com/albums/ss73/Harunobu/padding.png $\endgroup$
    – Almeisan
    Aug 12, 2016 at 19:00
  • $\begingroup$ The scalloping is apparent in your zero-padded plot. But you have to zoom way in (magnify) to see it more clearly. $\endgroup$
    – hotpaw2
    Aug 12, 2016 at 20:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.