# Talk:Window function

WikiProject Mathematics (Rated C-class, Low-importance)
This article is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of Mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Mathematics rating:
 C Class
 Low Importance
Field: Applied mathematics
WikiProject Statistics (Rated C-class, Low-importance)

This article is within the scope of the WikiProject Statistics, a collaborative effort to improve the coverage of statistics on Wikipedia. If you would like to participate, please visit the project page or join the discussion.

C  This article has been rated as C-Class on the quality scale.
Low  This article has been rated as Low-importance on the importance scale.

## Incorrectness

Let's start with the very first sentence: The Fourier transform of the function: ${\displaystyle \cos(\omega t)\,}$ is zero, except at frequency ${\displaystyle \pm \omega \,}$.

For flip's sake, this is a completely inappropriate function to mention because ${\displaystyle \cos(\omega t)\,}$ is NOT lebesgue integrable on the real line. If you actually go and read the page on fourier analysis, you will discover that fourier transforms are only defined on L1 functions. I would delete the paragraph, but as everyone would probably then misunderstand my point completely, I thought I'd just write it here. Can't you do any better? —Preceding unsigned comment added by 212.44.43.13 (talk) 15:28, 7 August 2008 (UTC)

Despite that technicality, it is extremely common for textbooks to refer to the Fourier transform of sinusoids. That's really all the justification required for Wikipedia to do the same. And if you read on past Fourier analysis, to Fourier_series#Fourier series on a general interval [ab], you will discover the reason.
--Bob K (talk) 20:33, 7 August 2008 (UTC)

Well, it is true that ${\displaystyle \exp(2i\pi ft)\,}$ cannot be integrated over t into a classic function; however, people had been using this sum for decades, especially in quantum mechanics, sometimes with confusing demonstrations. However, "Distribution theory" from French mathematician Laurent Schwartz clarified this point in the 50's: it postulates an extension of the set of usual functions to include mathematical strange things such as the "Dirac distribution", that could be considered zero everywhere but at f=0, and the measure of which (i.e. the area) is 1. This integration precisely produces this distribution.

Almipa (talk) 19:42, 16 April 2010 (UTC)

Square integrable does not imply "that the function goes sufficiently rapidly toward zero." One can construct L2 functions (i.e. square integrable) that grow very large and are even continuous. I would suggest to remove that part of the sentence and stop after square integrable. — Preceding unsigned comment added by 141.52.58.13 (talk) 12:15, 18 December 2013 (UTC)

Doesn't a window need to be absolutely integrable? Something like a sinc function or a ${\displaystyle 1/(1+abs(t))}$ that goes too slowly to zero, that is square integrable but not absolute integrable, does not make a usable window, does it?
FWIW, I don't know the answer, and don't care. If there is a WP:TOO_ACADEMIC card, this is a good place to play it, because in my 4 decades of using window functions, it's not something I ever worried about. And I have no scars to show for it. The "more general definition" is not sufficiently justified. It should be deleted, until its practical value can be convincingly demonstrated.
--Bob K (talk) 04:41, 21 December 2013 (UTC)
True, we usually use windows of finite support in DSP, but windows such as Gaussian and exponential are sometimes encountered, too. I wish I could see what the cited book says. Dicklyon (talk) 05:58, 21 December 2013 (UTC)

## Comparison Table

this article is in dire need of a big comparison table that summarizes the key metrics of the various window functions. the comparison table should be similar to table 1 in the seminal article by harris "on the use of windows", page 5. see article, which is linked in the references.

## Scalloping loss

The paragraph about scalloping loss seems to refer to a figure that isn't there. Sdrpyh 06:23, 14 February 2007 (UTC)

It's just as Bob K wrote it on 18 December 2005, this diff. The figure above is still the same "zoom view" figure in the previous subsection. I find it a bit confusing, too. Dicklyon 06:30, 14 February 2007 (UTC)

## All about frequency analysis?

In this article, it sounds like windowing's only use is in frequency analysis, as for example I am using it for making a windowed-sync FIR filter, and in this case the use of a window function (i chose the Blackman one) is to avoid riple in the frequency response of the FIR filter kernel. --SuperBleda 15:27, 19 August 2005 (UTC)

I still don't know, what is a window function? --anon

Whoever redid this, it's much much better now. 81.105.21.22 13:59, 7 April 2006 (UTC)

I can't claim all the credit, but I did a lot of it. So on behalf of the whole team... thanks! --Bob K 07:18, 10 April 2006 (UTC)

## DFT-even vs. Matlab

For a more recent discussion on this topic, see Talk:Window_function#I.27m_back.21, below.
--Bob K (talk) 17:44, 30 November 2011 (UTC)

I'm a bit puzzled as to why the window functions given were not put in "DFT-even" form ( /N rather than /(N-1)). The reason to use "DFT-even" windows is covered in one of the articles's references. See pg 52 of the following:

Frederic J. Harris, On the use of Windows for Harmonic Analysis with the Discrete Fourier Transform, Proceedings of the IEEE, Vol.66, No.1, January 1978, pp 51-83.

--SAMerritt 10 May 2006

I had the same question when I first arrived at this article. What I subsequently discovered is that Matlab defines the windows the way it's done here, not the "DFT-even" way. That seemed like a good enough reason to leave it as is. But in spite of that, I was the one who added the classic F.J.Harris reference, for historical reasons, if nothing else. --Bob K 04:03, 10 May 2006 (UTC)

I agree some work needs to be done here. Looking at the Matlab documentation, Matlab can return either a "periodic" window or a "symmetric" window. Symmetric is the default; they say it is more appropriate for filter construction while the periodic form is more appropriate for spectral analysis. (There seems to be agreement on this; see "periodicity of window functions" below.) Numerical Recipes (3rd edition) doesn't discuss the distinction but (in chapter 13 on spectral applications) uses the periodic form where n goes from 0 to N-1 and the window has a zeroes at 0 and N. I'm not sure if Matlab's "periodic" or "symmetric" terminology is broadly accepted; ideally this page should describe them both and provide some guidance on how to choose between them. (I may try to take a stab at this later.)

--Rob Calhoun 18 Jul 2011 — Preceding unsigned comment added by Rcalhoun (talkcontribs) 20:25, 18 July 2011 (UTC)

A simple and effective practice is to always use an odd value of N (as we have defined it). For an FIR filter, keep all N coefficients. For an FFT window, discard one of the endpoints (which gets a virtual replacement by periodicity). The advantage of the odd-length FIR is that its delay is (N-1)/2, which is an integer number of samples. In terms of the description at the Matlab documentation, I would use hann(L,'periodic') for my FFT window and hann(L+1,'symmetric') for my FIR, where L is even in both cases. The only difference is one more coefficient in the FIR than the window.
--Bob K (talk) 11:56, 26 July 2011 (UTC)

## The Comparison Graph

The comparison graph is great. The logarithmic frequency axis (in units of "DFT bins") is an excellent idea. It would also be helpful to label the axes. --Bob K 00:17, 10 September 2006 (UTC)

SUGGESTION: Please add a similar time-domain comparison of step-response, and maybe a table of statistics from that graph such as %-overshoot, group-delay, settling-time (to 1%, 0.5%, 0.1%). ALSO maybe add a step-response to each of the graphs in the "Window examples" section above. -- citizenDAK —The preceding unsigned comment was added by 70.91.225.169 (talkcontribs).

What does that mean? What is the step response of a window function? Dicklyon 22:29, 3 July 2007 (UTC)
Step response is (in summary) a way to see + compare important characteristics like the TRANSITION-DELAY or SETTLING-TIME and the RINGING or OVERSHOOT of a filter (a Window function *IS* a kind of FIR digital filter, commonly called a "moving average"). (Try a search-engine for "step response DSP window" for more info... One good example I just found is slide 10 of this Intro to Digital Filters PDF-file.) -- citizenDAK
Yes, I know about filters and step responses; but in what sense is a window usefully viewed as a filter? It's not convolved with an input, so it's not being used as a moving-average filter. If it were, its step response would have no overshoot, since windows are non-negative. They would all look very similar, sort of like the windows themselves. Maybe you can compute one of what you have in mind and show us. Dicklyon 19:23, 9 July 2007 (UTC)

## confusing wording

Can someone change this? In the third sentence of the following excerpt, it is unclear what "they" refers to (does it refer to window functions with low dynamic range, or window functions with poor resolution?): "This characteristic is sometimes described as low dynamic range. At the other extreme of dynamic range are the windows with the poorest resolution. And they are also poorest in terms of sensitivity." Lavaka 06:08, 8 January 2007 (UTC)

Yes, very. I believe I have fixed it correctly, but I invite others to check me. Dicklyon 06:30, 8 January 2007 (UTC)

## Bartlett/Triangle Window

Can someone check the equation for the triangle window? I've normally seen it as 1-abs((n-.5N)/.5N), or equivalently 1-abs((2n-N)/N). This page shows 1-abs((2n-N+1)/N)

Kelauder 06:05, 2 April 2007 (UTC)Kevin

It's easy enough to verify by inspection that at the defined end indices of 0 and N-1 the values of the Barlett are 0 and of the triangle are 1/N; that is, the formulas work as expected. Your formula would work if the range was defined from 0 to N for Bartlett, or 1 to N-1 for triangle. But it's not. Dicklyon 06:35, 2 April 2007 (UTC)
I have made a correction to the equation for Triangle Window with non-zero endpoints. The new equation obeys the property that the next point outside the window on each side, following the same slope, would be zero, i.e., w(-1) = w(N) = 0. Note that Matlab's (7.9.1.705) triang function for Odd N is equivalent to the equation I have placed on Wikipidia. For even N, it is my belief that Matlab's implementation is "incorrect", because the equation in their documentation does not exhibit the property w(-1) = w(N) = 0, and because it seems unnecessarily complicated to use a different equation for N even than for N odd. Perhaps The MathWorks has some other rationale for preferring their definition -- I will take that up with them separately.--Rtbehrens (talk) 20:15, 6 March 2012 (UTC)

## Gauss window

In the provided plots, I was suprised to see that the Gauss window in the Fourier doimain does seem to have sidelobes. This should not be the case though as the FT of a Gauss function is again Gauss. —The preceding unsigned comment was added by 129.27.140.171 (talk) 08:33, 17 April 2007 (UTC).

Read (or re-read) the part about spectral leakage. A Gauss function has infinite duration. A Gauss window does not.
--Bob K 11:24, 17 April 2007 (UTC)

## Tighter format?

What do you think of my "tighter format" edit? I can do the same on the next section, but it might run into problems for narrow browser windows with its longer equations. Any other good suggestions for how to format this without wasting tons of white space? I also like the tight way because it's so much easier to look at several equations at once to compare them. Dicklyon 20:03, 3 June 2007 (UTC)

The tighter format is also what I chose (e.g. http://en.wikipedia.org/w/index.php?title=Window_function&direction=prev&oldid=31779771).
--Bob K 21:30, 3 June 2007 (UTC)

OK, I'll do it. I see the "left" format was contributed by an anon. Dicklyon 23:20, 3 June 2007 (UTC)

## PNG and SVG plots

mmm... how can you say that "The .png files have better resolution?, no bit-map picture can have higher resolution than a vector image! I have noticed that unfortunately I have lost the grid in the SVG generation and I couldn't fix it, but the grid is not necessary in this context. Alessio Damato 21:07, 26 October 2007 (UTC)

## Request for revision

I think that this article is lacking in having a specification for how a window is applied (which would hopefully include an explicit equation). Also a non-technical intro about what windowing is used for, and why. Melcombe (talk) 08:53, 4 April 2008 (UTC)

Two+ years later, I must plead for the same. I read the upper sections of the article over and over, but still have no idea WHY windows are used. The article just says they used in particular applications, and goes on to describe the (apparently deleterious?) effects that applying a window has. It never explains the impetus for using them in the first place. Meanwhile I will repair some of the flaccid verbiage in the parts I do understand. Strebe (talk) 19:25, 10 August 2010 (UTC)
It does seem that it could be more written such that it is more obvious. The usual answer is that many signals are valid for infinite time, but computers can only process signals with a finite length. Note the integral in the Fourier transform is from t=-infinity to t=+infinity. The obvious solution is to cut off the ends, which is mathematically the rectangular window. I thought of adding this to the first paragraph, but I think I will let someone else try that. Gah4 (talk) 01:38, 17 February 2016 (UTC)
The second reason this exists is that the results of using a transform with periodic basis functions on non-periodic data is, what is called in the article spectral leakage. If the data doesn't naturally go to zero at the ends, the DFT, with periodic basis functions, gives the result as if the first point followed the last point, resulting in a discontinuity. That is, that the input is processed as periodic in its length (or, if zero padded, to some longer length). Windowing, other than rectangle, smooths off the discontinuity, giving more appropriate spectral results. Gah4 (talk) 01:38, 17 February 2016 (UTC)
I'm simplifing this explanation. The conclusion is unchanged. But my apologies to any followups specifically directed at the original explanation.
I think a better definition of leakage, in the context of the Fourier analysis, is an operation (such as truncation) that causes frequency components to appear that aren't in the original function. The result can still be periodic, such as squaring a sinusoid. For discrete-time functions, truncation of a sinusoid always creates leakage in the discrete-time Fourier transform (DTFT), which is a continuous function of frequency in general. And the DTFT definition does not change between comparisons. Only the input function changes. But the definition of the DFT has a parameter, N, the number samples, because it is just a sparse sampling of one cycle of the DTFT. In order to define leakage in a useful way, that parameter has to be held constant. So if you perform a DFT on 1000 samples of a sinusoid, and if there are exactly 10 samples per cycle, your "spectrum" has just one non-zero component, at bin 100. If you then rectangularly window the sinusoid to 500 samples, and perform the same DFT (now including 500 zeros), you see leakage in about half the bins, I think. Only if you change the DFT size to 500 (which is a more sparse sampling of the DTFT), do you miss all the leakage. Concluding that a rectangular window has no leakage for certain sinusoids is nonsense. Truncating any sinusoid with any kind of window causes leakage. So windowing is a necessary evil to extract a manageable subset of a long sequence (as you said), and the reason for non-rectangular windows is to obtain a more favorable tradeoff between side-lobe leakage vs main-lobe leakage.
--Bob K (talk) 22:07, 18 February 2016 (UTC)
The exact periodic case isn't so pathological if you can phase-lock the sample clock to the source. As an example, when measuring power-line signals, it should be easy to lock to a multiple of the power line frequency. Gah4 (talk) 20:49, 18 February 2016 (UTC)
My interpretation of this seemingly irrelevant remark is that my help here is not welcome. Good-bye.
--Bob K (talk) 22:07, 18 February 2016 (UTC)

## Questions

Is there a terminology describing calculating two windows and using the best features of each?

I will be writing a "dual window FFT/IFFT" (basicly two seperate functions ran in sequence on the same data) that will calculate and use both "Low-resolution (high-dynamic-range) windows" and "High-resolution windows" (to use the terminology of this page) in order to provide (the FFT portion) a spectrum with high dynamic range and high resolution, and (the IFFT portion) a reproduction of the input wave with a low loss of residuals.

I've tried searching for any programs or papers describing (what would seem to be) this simple idea but there seems to be no information on this subject.

In the event that there is such a thing a description of it is missing from this page. —Preceding unsigned comment added by 24.85.104.61 (talk) 23:27, 2 June 2008 (UTC)

I'm not sure I would put it here anyway. For instance the Welch method uses window functions, but it is described in a separate article.
Also not sure why you need to "reproduce the input wave". Don't you already have it? And what does that have to do with this article?
--Bob K (talk) 02:45, 3 June 2008 (UTC)

## Definitions

It is good to see that start has been made with provoding some proper definitions. But .... (and this may differ between fields of application) ... isn't there a need to start with a definition of the time-period over which a time-signal is defined, possibly called a data-window, and then define the window function as producing a new time-signal, possibly over a different data-window. Mathematically it might be convenient to define time-signals as zero outside a data-window but the exact definition of a data-window can radically affect the outcome of data-processing (eg application of discrete-time FFTs.). Melcombe (talk) 09:11, 11 August 2008 (UTC)

A specific example of the "problem" might help.
--Bob K (talk) 12:37, 11 August 2008 (UTC)
I don't really understand what you're trying to say. But I always think of signals (including windows) as functions defined on the entire real line. --Drizzd (talk) 14:21, 12 August 2008 (UTC)

## Noise bandwidth

Besides that fact that the formula

${\displaystyle B_{n}={\frac {1}{g}}\int _{0}^{\infty }|H(f)|^{2}df}$ where ${\displaystyle g=|H(f)|_{max}^{2}}$

applies to filtering applications (which is not the subject of the article), it also assumes real-valued, continuous-time I/O, which is not the main point of the article either. It is well-intentioned, but not sufficient. Let's either remove it or caveat its relevance and add the other necessary cases (especially complex-valued, discrete-time data). I.e., if it's worth doing, it's worth doing right.

But this particular subject, with the associated math, could distract from the main points that follow. It's a relatively unimportant (but interesting) detail. If done right, I think it deserves it's own article with a link from this one.

--Bob K (talk) 12:27, 15 September 2008 (UTC)

## The Example Images for all the filters should be larger.

You can't read them at the current state without zooming-in (but this requires 2 clicks: one on the image, then one on "Full resolution"). I think this is important, as on aspect of the filtering is how much they filter the signal (-50dB, -100dB etc), so two images might look almost the same, but if you look at the scale, you will see that one filter actually suppresses side-lobes by -50dB the other by -80dB. I tried to increase the images to 400px (just in the sandbox), but then the thumb-text underneath goes away... perhaps someone with better knowledge on how formatting images could do the reformatting? Kusmi (talk) 08:07, 9 December 2008 (UTC)

It actually takes me 3 clicks, because my screen is 1024 wide, and the figures are about 1040-1050. The Wikipedia instructions say to always upload the full resolution. And that, of course, is because the article can use "thumbnails" to compress it. Anyhow, this is how to do what you suggest (see below). It's not the standard Wikipedia way of handling large images.
The general instructions for images are here:
Wikipedia:Extended_image_syntax#New_syntax_for_images
--Bob K (talk) 13:39, 9 December 2008 (UTC)
[[Image:Window_function_(blackman).png|frame|none|Blackman window; α = 0.16; B=1.73]]

Added pre tags around the image, it was so large after updating it that it was distracting. Olli Niemitalo (talk) 19:47, 9 February 2013 (UTC)

## periodicity of window functions

IMHO, in order to minimise artifacts when calculating the DTFT of a finite time series of length N (0<=n<=N-1), it is recommended that 1.) both the signal and the window function are periodic with N, 2.) the window function as well as its first and second derivatives take a value of zero at n=0. At least, that's what I was taught 20 years ago by H.-P. Harjes, a German Geophysicist, whose lessons roughly followed the book of M. Bath, Spectral Analysis in Geophysics, Elsevier, Amsterdam 1974. In the present version of the text, the window functions introduce a double zero for n=N-1 and n=N.

If by n=N you mean n=0, yes some of them are zero at n=0 and n=N-1. And others are not. That is addressed in the 3rd bullet of section Window_function#Window_examples. I think you are agreeing with that bullet.
--Bob K (talk) 23:23, 5 February 2009 (UTC)

I found a significiantly higher "background noise level" when comparing the results of a DTFT calculated with a double-zero window function to that obtained using a single-zero WF. I thus would recommend to change the denominator N-1 in the corresponding formulae to N instead of providing the somewhat non-binding comment on that point. Regards Georg Morscher schorsch (talk) 21:06, 5 February 2009 (UTC)

## Practical Recommendation When Using Hann Window

When using Hann windows for signal processing, better to use the form 0.5*[1-cos(2pi*[n+1]/(N+1))]

This squeezes an extra two points of size into the window, for free(ish). The DFT-even form also adds two non-zero points, but only one effective point of added width (while preserving many other esoteric properties, like an average window amplitude independent of N). —Preceding unsigned comment added by Kristo Miettinen (talkcontribs) 19:58, 27 April 2009 (UTC)

I agree that in practice that's the best thing to do. But the article also has a goal of introducing windows to newbies with minmal distracting details. In that spirit, there is a benefit to limiting the differences between formulas to just the ones that are unavoidable. For those who are going to go on and generate a window, we have the caveat about zero-valued coefficients and widening the window to prevent it. IMO, that's a good compromise.
--Bob K (talk) 21:58, 27 April 2009 (UTC)

## Fixed a couple formulas

I noticed that the formula for the Hamming window was not the standard one, but seemed instead to be a modification that is sometimes suggested under another name. I put the Hamming window formula into a standard form. I also decompiled the factor of ${\displaystyle \pi }$ out of the parameter for the Kaiser window formula, so this way the parameter will be more in line with the literature where a reasonable value is around 3. 08:36, 28 April 2009 (UTC) —Preceding unsigned comment added by Safulop (talkcontribs)

## Specific goals

It seems that many of these windows were created to solve a specific problem. Can you describe this problem and the derivation in each section? —Preceding unsigned comment added by 71.167.61.179 (talk) 07:00, 30 November 2009 (UTC)

## Merge separate Hann function page

Of all the types of windowing functions only two have their own page, the Hann function and the Kaiser window. Of the two the Hann function does not provide any further useful information than is available in this page, and what is there is mostly incorrect or unclear. In its current state I think it's not that useful to have the Hann function as a separate page, until it is expanded upon perhaps it should be removed? Nonnumquam (talk) 07:39, 30 November 2009 (UTC)

Closes as unsupported. Dicklyon (talk) 20:56, 20 February 2011 (UTC)

## diagram

show a graph of a sine wave before and after windowing, to make the function clear —Preceding unsigned comment added by 71.167.63.79 (talk) 20:56, 12 December 2009 (UTC)

## the Applications section

There are numerous problems with this section. It is redundant with information elsewhere (and previously) in the article. It is not in a logical position within the article. And some of it is just nonsense, for instance "the ideal frequency response of a window is a Dirac delta function, as that results in the frequency response of the FIR filter being identical to that of the IIR filter". Deletion is necessary. Rewrite is optional. I'm happy to do the deletion, but not the rewrite.

--Bob K (talk) 22:37, 14 December 2009 (UTC)

I agree, so I took it out, and reorganized the following sections as subsections. There may be some recoverable bits in there if anyone wants to work on that. Dicklyon (talk) 23:15, 14 December 2009 (UTC)

## flat top function

The "flat top" function that is mentioned here requires references.

Moreover it is not normalized.

Therefore, its present use to design a FIR will require a multiplication by a constant.

Because of its form, the way to normalize it is to choose ak coefficients so that their sum is one.

Regards,

Almipa (talk) 11:27, 12 April 2010 (UTC)

It is already normalized (in the now referenced form) so that the integral over it is 1 (from the constant term, the cosine terms do not contribute). Or should it be normalized to peak value = 1 instead? I found a Max Planck Institute technocal report reference (Heinzel G, R?udiger A and Schilling R, 2002) for the flat top window and changed a4 to 0.028 accordingly. This only improved the frequency spectrum, so the previous value was probably in error. The source also gives a value for B for flat top, and other windows, I'll check if more of them can be harvested from it. The current practice to calculate B ourselves is somewhat suspect. Olli Niemitalo (talk) 08:25, 10 February 2013 (UTC)

## Tukey function definition

I found it vexing that the Tukey function seemed to be the only function defined from -N/2 to N/2. Even the graph to the right of the function definition appears to plot it from 0 to N. I thought it would be more clear define it from 0 to N as it is in the other window functions and in the Matlab reference. Also, I realize now that there was nothing wrong with the original definition, just that it was defined on a different interval. Cheers. Ebmi (talk) 05:36, 28 September 2010 (UTC)

This seems taken care of. Olli Niemitalo (talk) 20:46, 10 February 2013 (UTC)

## Frequency response graphs should have the same scale

Frequency response graphs (in orange) do not have the same scale: some are from -60dB to 0 ; others are from -100dB to 0 and even others are from -120dB to 0. It is thus very difficult to compare them quickly. I suggest all the graphs to be redrawn using the same scale. —Preceding unsigned comment added by 213.244.14.206 (talk) 14:17, 18 November 2010 (UTC)

The comparisons are done at Comparison of windows
--Bob K (talk) 02:24, 19 November 2010 (UTC)
The problem is that the scale is not visible on small graphs, and it leads to the false impression that some windows are almost identical whereas it is not the case at all. I suggest: either to make the scale visible on small pictures ; either make them all with the same scale. By the way, an harmonization is needed, because some frequency response graphs are in svg format and others are in png. --213.244.14.206 (talk) 12:51, 14 December 2010 (UTC)
I agree about the harmonization. A couple of editors started replacing png links with svg links, but they only did about four and lost interest. And the svg versions do not preserve the grid lines. The png links should still work, so one of us should restore them.
Regarding the scale variations, my opinion is that it's good the way it is, since there is also a fixed-scale comparison graph. The "small pictures" are only intended to serve as icons. Drawing conclusions from icons is certainly risky, but that's to be expected.
--Bob K (talk) 20:46, 15 December 2010 (UTC)
I made new images that address the raised issues. The amplitude scale is now different only for the flat top window which is really funky anyhow compared to others. Olli Niemitalo (talk) 19:24, 9 February 2013 (UTC)

## Added OLA-Hann window in Other Windows

This article seems extremely well written, so the addition I've made likely needs to be improved. Advice welcome. Full disclosure: I am the inventor of the OLA-Hann window technique, but only work in this area as a hobby.WaywardGeek (talk) 12:41, 24 December 2010 (UTC)

If I understand correctly, you add a pair of 50% overlapped Hann windows, so you get a cosine-tapered window, flat in the middle, 50% longer than the Hann windows that it's based on (your article says 2X longer, which I don't get). Anyway, though it may be a novel and useful window, it's really not appropriate to report it in wikipedia until after you get it published in what we can cite as a WP:RS. Dicklyon (talk) 18:11, 24 December 2010 (UTC)
Close, but not quite right. The first frame is tapered on the left, the second frame is tapered on the right, and when overlapped and added, the resulting frame is not tapered at all, yet has very little spectral noise. A sine wave at a frequency equal to one of the FFT bins is not in any way modified by this window function, resulting in the 1.0 B. No other window functions on this page have anywhere near as low spectral noise. Sine waves that change phase by exactly 180 degrees from beginning to the end of the window result in half the amplitude assigned to the adjacent bins, with zero spectral noise outside this range. Sine waves that end 90 degrees out of phase are close to the worst case, generating some spectral noise, but the levels are many DB lower than other windows.
I have no intention of writing any papers for submission to any conference. If you believe only academics have valuable knowledge that belongs on Wikipedia, I guess there's nothing to be done. If only old and well established knowledge, rather than cutting edge technology, belongs in Wikipedia, then I can revisit this in a few years.WaywardGeek (talk) 18:32, 24 December 2010 (UTC)
I don't believe that, but we do have wikipedia policy and guidelines to follow, like WP:RS and WP:OR. So is it just a double-length Hann window then? Dicklyon (talk) 23:20, 24 December 2010 (UTC)
It is a double-length Hann window that is then split into a first and second half. The first half is then added to the second half, resulting in a single-length set of samples. I've added an informal introduction on the web page to give readers a better feeling for what's going on in this algorithm.
I read the guidelines you linked to, and I agree my web page isn't an acceptable source. Worse, I was able to get expert feedback on the algorithm, and while the algorithm does perform very well, it's a subset of "weighted overlapp-add DFT" algorithms that have been carefully explored. In my case, comp.dsp was a better place to post my algorithm than Wikipedia.org.WaywardGeek (talk) 12:13, 25 December 2010 (UTC)
Oh, I see, it's not exactly a window in the sense of the others. I'm glad you found a good place for it. Thanks. Dicklyon (talk) 16:50, 25 December 2010 (UTC)

## Unnecessary complexity with the definition of N

This line threw me for a loop:

• In practice, N is typically an odd number. An even-length FFT window is generated by using only the coefficients corresponding to 0 ≤ n ≤ N-2.[note 1]

Then, all of the functions are defined in terms of ${\displaystyle N-1\,}$. It seems clear that if ${\displaystyle N\,}$ were simply defined as the even-length FFT window, the function definitions would be simplified as well.

(To be fair, the triangular window with non-zero endpoints does use the odd-length ${\displaystyle N\,}$. Substituting ${\displaystyle N+1\,}$ in that case still seems like a net win.)

I imagine this might be a sort of "traditional" notation, but it sure seems to make things more confusing with no benefit that I can see. Is there a reason for it? Can we change it, or at least explain it a little better? --4368 (talk) 11:55, 26 October 2011 (UTC)

Not just the triangle, but for many windows it's useful to have a "center" point. Or at least, common, if not so useful. Might as well leave it. Dicklyon (talk) 15:17, 26 October 2011 (UTC)
Looking at all of the functions defined, ${\displaystyle N-1\,}$ seems much more common than ${\displaystyle N\,}$. That, in addition to a desire for symmetry with the way power-of-two lengths are common for FFTs, is my rationale. Could you explain how having a "center point" is actually more common/useful? Perhaps there's something in the literature not mentioned in the article? Thanks. --4368 (talk) 12:31, 27 October 2011 (UTC)
##### Details of proposed changes

First, the bullet point on ${\displaystyle N}$ (quoted above) would be removed. I believe that the existing definition of ${\displaystyle N}$ as the "width, in samples", will still be correct as-is. Then, here are some functions simplified with the new definition of ${\displaystyle N}$:

• Hann window: ${\displaystyle w(n)=0.5\;\left(1-\cos \left({\frac {2\pi n}{N}}\right)\right)}$
• Hamming window: ${\displaystyle w(n)=0.54-0.46\;\cos \left({\frac {2\pi n}{N}}\right)}$
• Tukey window: ${\displaystyle w(n)=\left\{{\begin{matrix}{\frac {1}{2}}\left[1+\cos \left(\pi \left({\frac {2n}{\alpha N}}-1\right)\right)\right]&{\mbox{when}}\,0\leqslant n\leqslant {\frac {\alpha N}{2}}\\[0.5em]1&{\mbox{when}}\,{\frac {\alpha N}{2}}\leqslant n\leqslant N(1-{\frac {\alpha }{2}})\\[0.5em]{\frac {1}{2}}\left[1+\cos \left(\pi \left({\frac {2n}{\alpha N}}-{\frac {2}{\alpha }}+1\right)\right)\right]&{\mbox{when}}\,N(1-{\frac {\alpha }{2}})\leqslant n\leqslant N\\\end{matrix}}\right.}$
• Gaussian windows: ${\displaystyle w(n)=e^{-{\frac {1}{2}}\left({\frac {n-N/2}{\sigma N/2}}\right)^{2}}}$

There would also be some implicated changes on the Hann function and Kaiser window pages (and perhaps others). These changes would bring the function definitions closer in line with Wolfram MathWorld (for example, 'Hanning' Function). However, I'd like to get some kind of agreement before making any changes, since I (admittedly) am not any kind of expert on this topic, and there are a lot of involved changes. --4368 (talk) 14:47, 29 October 2011 (UTC)

### It's complicated

On further inspection, I see it's more complicated than I thought. See for example this page. The N+1 gives a "symmetric" window (N can be odd or even, giving a center point or not). But this gives the same point at beginning and end, which is zero for some windows, non zero for others, and messes up some of the analysis shown. The Hamming window in particular shouldn't have the repeated value at the end, and the hann window, with the extra zero, has the wrong periodicity to agree with note 2 if you include the extra zero. I'm not sure what we should do here. Probably discuss the alternatives and the complication. In fact, I think sampling continuous windows to get these discrete windows is inherently not quite right. Dicklyon (talk) 15:33, 29 October 2011 (UTC)

There's an approach like our current one in The DSP Primer, called the "Data Window" form. It also has the "Lag Window" form which is symmetric about zero index. It allows this one to be both even-numbered and symmetric, and hence correct periodicity, by offsetting the sample halfway between what it does for the odd N, which seems to me a good approach.

In any case, the spectra that we show are for some unstated large N, or for the continuous window function, effectively. It's not clear to me why we want these discrete expressions at all, especially given the complications that bring up. Dicklyon (talk) 17:09, 29 October 2011 (UTC)

### I'm back!

Thank you for jumping in while I was not paying attention. And thanks everyone for your restraint. Yes, there are subtlties involved here. A version of this discussion can also be found at DFT-even_vs._Matlab (above). I will try to pick up where it left off. There are actually two different issues:

1. How to define N? Here it is the actual length of a symmetrical window. When N is odd, the window has a single maximum. When N is even, the window has a double maximum. Choosing N odd and discarding the last point gives a slightly asymmetrical window with a single maximum. Why one might want to do that is the 2nd question (below). Setting that question aside, we are back to considering the other definitions of N. Noting all the N-1 terms in the window formulas, it is tempting to simplify them by defining N as one less than the length of a symmetrical window. But that's just a bit awkward/unnatural, don't you think? Rather than that, I would leave N as is and define L=N-1, and substitute L into the formulas. But that kind of leaves N stranded with no real purpose. I did consider all those options back in July.
2. Why asymmetry? The Fred Harris paper introduces that practice. I haven't refreshed my memory, but the way I think of his argument is that a windowed FFT behaves as if both the window and the data are periodic. That usually means the data contains a discontinuity, and the window's job is to remove the discontinuity. Since the first and last samples of a symmetrical window are equivalent, there is no discontinuity in the periodically extended window if we remove one of the end points. And since it is a relatively small number (or zero), removing it improves (reduces) the noise bandwidth, which is given by "B = N*sum(w.^2)/sum(w)^2" in the Matlab scripts associated with the figures. It's probably more of an academic issue than a practical one.
3. In my own experience there is a more important reason in the design of an FFT channelizer/transmultiplexer, where the window function operates as an FIR filter in each output channel, and the FFT implementation forces it into an even number of coefficients. My unconstrained choice for symmetrical FIR filters is an odd length, because the filter delay, (N-1)/2, is always an integer number of samples. When N is even, (N-1)/2 is as far from an integer number as is possible. And (to make a long story short) that creates a noticeable phase difference between adjacent channels, which manifests as distortion when adjacent channels are recombined (synthesized) into a wider bandwidth. The problem is solved by an asymmetrical window, whose delay is much much closer to an integer. There is a theoretical amount of phase non-linearity associated with the asymmetrical FIR, but in my experience, it is imperceptable.

Just one last point, for the sake of completeness. I think the ${\displaystyle w_{0}(n)\,}$ mentioned in our article is the same as the "Lag Window form" that Dick mentioned above. If so, I should probably mention that name in the article.

Yes indeed... here is a quote from page 196 (section 10.5): "The data window form can be obtained by substituting [n-(N-1)/2] for n in Eq. 10.28." And our article says ${\displaystyle \scriptstyle w(n)=w_{0}\left(n-{\tfrac {N-1}{2}}\right).\,}$  So ${\displaystyle \scriptstyle w(n)}$ and ${\displaystyle \scriptstyle w_{0}(n)}$ are respectively called data window form and lag window form. But I hesitate to use those labels, because they seem rather arbitrary, and in fact misleading, because in my vernacular ${\displaystyle \scriptstyle w_{0}(n)}$ leads ${\displaystyle \scriptstyle w(n)}$, not lags it(!)
--Bob K (talk) 17:21, 30 November 2011 (UTC)

--Bob K (talk) 16:42, 30 November 2011 (UTC)

### FWIW

By the way... in Matlab-ese, I believe:

• hann(512,'periodic') creates an asymmetric FFT Hann window of length 512.
• hann(513,'symmetric') produces the same sequence plus one more sample equal to the first sample. (which makes it symmetric)

They both have a single maximum.

And:

• hann(512,'symmetric') produces a symmetric window (of length 512) with a double maximum.
• hann(511,'periodic') produces the same sequence, minus the 512th sample. (though I can't think of any reason to ever do that)

In my opinion, it is a lot easier to understand how to achieve those four cases (and what you are getting) using the description in our article than it is to understand the nuances of Matlab's hann() function.

--Bob K (talk) 18:36, 30 November 2011 (UTC)

## conversion to "vector graphics"

Regarding the last 3 edits, please explain why it is more important to have figures in .svg form than it is to have grid lines. And please explain why .svg cannot support the grid lines. As I recall, the guidelines for converting to .svg state that is should not detract from the rendered result.

--Bob K (talk) 18:52, 30 November 2011 (UTC)

Yes, we shouldn't lose the grid lines. I think it's great that the editor provided his matlab code; it should be straightforward now for him or someone else to add grid lines, and otherwise adjust the styling. Dicklyon (talk) 19:26, 30 November 2011 (UTC)
Now there are SVG images with grid lines. I set N to such a high value (2^17) that aliasing in the spectrum was eliminated and only plotted a portion of the Fourier transform. Making the SVG's was a big mess with rendering and font issues and I sympathize with anyone who made an effort for it. Olli Niemitalo (talk) 15:14, 13 February 2013 (UTC)

## Two-dimensional window, separability error

The article suggests that functions of the form ${\displaystyle \scriptstyle W(m,n)=w(r)}$ are unseparable, whereas ${\displaystyle \scriptstyle exp(-r^{2})=exp(-(m^{2}+n^{2}))=exp(-m^{2})exp(-n^{2})}$ clearly is separable. 58.96.115.119 (talk) 02:03, 5 February 2013 (UTC)

I think you misread it. It's talking about a form w(r) that is not separable, in general. You are referring to the separable gaussian special case; if you wanted that case, you'd use the separable form. Dicklyon (talk) 03:21, 5 February 2013 (UTC)
I rewrote the section to include that exception. Olli Niemitalo (talk) 15:03, 5 February 2013 (UTC)

## Frequency response

Is it correct to talk of a "frequency response" of a window function? A window function is not the impulse response of a system. Should we say "Fourier transform" instead? Olli Niemitalo (talk) 11:47, 14 February 2013 (UTC)

Good point. ${\displaystyle w(t)}$  is a dc-response, not an impulse response. --Bob K (talk) 16:40, 14 February 2013 (UTC)
We could explicitly say that  ${\displaystyle {\mathcal {F}}\{w(t)\}}$  is the "frequency response" to input   ${\displaystyle 1\ {\stackrel {\mathcal {F}}{\Longleftrightarrow }}\ \delta (f),}$  which is probably how most people think of it. But I don't know what the concensus of the technical references might be. "Frequency domain plot" is one example. It might be customary, but it's also vague. --Bob K (talk) 16:24, 15 February 2013 (UTC)
Search string (with quotes) Google Scholar hits Google Books hits
"window function and its fourier transform" 23 6
"window function and its frequency response" 2 0
"window function and its frequency spectrum" 0 0
"window function and its frequency domain" 0 0
I did a bit of survey on the frequency of usage of different terms. So far "Fourier transform" seems the most common. Feel free to add further alternatives above. My guess why "frequency response" is sometimes used is that people are used to deal with filters and intuitively borrow the terminology from there. Olli Niemitalo (talk) 17:29, 15 February 2013 (UTC)
Fourier transform is a clear winner, by Wikipedia's criterion (popular usage).  My personal reason for preferring "frequency response" is different than your guess, because it actually is the spectral response to input ${\displaystyle \delta (f).}$  And the Fourier transform of a windowed waveform is the convolution of the transforms of the waveform and the window, just as in the time domain the output of an LTI system is the convolution of the input and the impulse response. --Bob K (talk) 13:46, 16 February 2013 (UTC)
I'll start converting things to "Fourier transform". What you have said also makes sense. Olli Niemitalo (talk) 16:15, 16 February 2013 (UTC)

## List of window functions

I see that the Other Windows section has been marked for extension. More generally, it might be nice to include further examples of window functions. The question is which merit inclusion. As a starting point, I have compiled a list of the windows in the works of Harris[1] and Nuttall[2]. These miss more modern developments but should include all the classics.

Window functions and parameter choices in literature. Search string for ghit count was "xxx window" signal.
Window Scholar ghits Books ghits Parameters Peak sidelobe (dB) Asymptotic decay (dB/octave) Included
Rectangle[1]
Dirichlet[1]
Rectangular
Unit
994
91
19,700
ambiguous
328
54
15,100
ambiguous
none -13[1] -6[1] Yes
Triangle[1]
Fejer[1]
Bartlett[1]
Triangular
276
23
1,330
2,220
118
35
1,580
1,980
none -27[1] -12[1] Yes
cosα(x) Hanning[1]
Hanning[2], if α = 2
Power-of-cosine
Hann window, if α = 2
ambiguous
20,200
3
3,440
ambiguous
9,080
1
1,660
α = 1.0[1]
α = 2.0[1]
α = 3.0[1]
α = 4.0[1]
-23[1]
-31[2]
-39[1]
-47[1]
-12[1]
-18[1][2]
-24[1]
-30[1]
Yes
Hamming[1][2] 23,900 13,800 α = 0.54[1]
α = 0.53836[2]
α = 0.53856[1]
-42[1]
-43.19[2]
-43[1]
-6[1]
-6[2]
-6[1]
Yes
Riesz[1]
Welch
Parabolic
25
456
ambiguous
10
127
ambiguous
none -21[1] -12[1] No
Riemann[1]
Lanczos
8
150
6
76
none -26[1] -12[1] Yes
B-spline window
De la Vallé-Poussin[1], if order = 4
De la Vallée-Poussin, if order = 4
Parzen[1], if order = 4
58
6
4
ambiguous
3
4
2
ambiguous
order = 4 -53[1] -24[1] No
Tukey 1,150 391 α = 0.25[1]
α = 0.5[1]
α = 0.75[1]
-14[1]
-15[1]
-19[1]
-18[1]
-18[1]
-18[1]
Yes
Bohman[1] 17 8 none -46[1] -24[1] No
Poisson
Exponential
Two-sided exponential
26
ambiguous
3
9
ambiguous
2
α = 2.0[1]
α = 3.0[1]
α = 4.0[1]
-19[1]
-24[1]
-31[1]
-6[1]
-6[1]
-6[1]
Yes
Hanning-Poisson[1]
Hann-Poisson
16
1
6
2
α = 0.5[1]
α = 1.0[1]
α = 1.5[1]
-35[1]
-39[1]
none[1]
-18[1]
-18[1]
-18[1]
Yes
Cauchy[1] 14 7 α = 3.0[1]
α = 4.0[1]
α = 5.0[1]
-31[1]
-35[1]
-30[1]
-6[1]
-6[1]
-6[1]
No
Gaussian[1]
Weierstrass
10,100
2
3,640
2
α = 2.5[1]
α = 3.0[1]
α = 3.5[1]
-42[1]
-55[1]
-69[1]
-6[1]
-6[1]
-6[1]
Yes
Kaiser-Bessel[1]
Kaiser
1,280
4,110
751
4,520
α = 2.0[1]
α = 2.5[1]
α = 3.0[1]
α = 3.5[1]
Lf0 = 2[2]
Lf0 = 3[2]
Lf0 = 4[2]
-46[1]
-57[1]
-69[1]
-82[1]
-39.79[2]
-65.45[2]
-91.22[2]
-6[1]
-6[1]
-6[1]
-6[1]
-6[2]
-6[2]
-6[2]
Yes
Barcilon-Temes[1]
Babic Temes
3
3
3
2
α = 3.0[1]
α = 3.5[1]
α = 4.0[1]
-53[1]
-58[1]
-68[1]
-6[1]
-6[1]
-6[1]
No
Exact Blackman[1][2] 34 10 none -68[2] -6[1][2] Yes
Blackman[1][2] 3,260 2,340 none -58[1][2] -18[1][2] Yes
Minimum 3-sample Blackman-Harris[1]
"Minimum" 3-term[2]
2
10
0
6
none -71[2] -6[1][2]
61 dB 3-sample Blackman-Harris[1]
3-term[2]
1
3
0
1
none -62[2] -6[1][2]
Minimum 4-sample Blackman-Harris[1]
"Minimum" 4-term[2]
19
34
7
10
none -92[1] -6[1][2]
74 dB 4-sample Blackman-Harris[1]
4-term[2]
4
6
0
1
none -74[1] -6[1][2]
4-sample Kaiser-Bessel[1]
4-term
2
2
2
0
α = 3.0[1] -69[1] -6[1] No
3-term with continuous third derivative[2] none -47[2] -30[2]
3-term with continuous first derivative[2] none -64[2] -18[2]
4-term with continuous fifth derivative[2] none -61[2] -42[2]
4-term with continuous third derivative[2] none -83[2] -30[2]
4-term with continuous first derivative[2]
Nuttall, continuous first derivative
none -93[2] -18[2] Yes
Minimum 3-term[2] none -71[2] -6[2]
Minimum 4-term[2]
Blackman-Nuttall
ambiguous
23
ambiguous
0
none -98[2] -6[2] Yes

Looking at the table so far, I think that windows to potentially include are:

• Parzen window: it appears popular and is neatly linked to the rectangular and triangular windows as a B-spline.
• Bohman window: it is of some note and has good suppression for a parameterless window.
• Welch window: it seems notable although I've yet to figure out why exactly (perhaps something to do with Welch's method?).

As an aside, the Hann-Poisson seems the least popular of those currently included, however I'm very fond of the fact that it can have no peak sidelobe, which seems an interesting (and potentially useful) peculiarity. — BobQQ (talk) 09:52, 28 February 2013 (UTC)

Hi. I am having trouble reproducing the seach results. For example, the link https://www.google.com/search?q=%22welch+window%22&btnG=Search+Books&tbm=bks&tbo=1 produces 429 links instead of the 127 shown in our table. Any suggestions? Thanks.--Bob K (talk) 15:59, 28 February 2013 (UTC)
Upon further investigation, 429 is the total number of occurrences, with multiple occurrences per book. To obtain a book count, I had to hop to the last page of links (10 per page) and read just below the toolbar at top. (If obscured, click on the button labeled "Search Tools".) That produced a count of 144. Is that what you do? --Bob K (talk) 16:35, 28 February 2013 (UTC)
Have a look at the search string in table caption again, it should include the quotation marks and the word signal. I just used the number from the first result page. Olli Niemitalo (talk) 22:33, 28 February 2013 (UTC)
Thanks, that helps. The link is https://www.google.com/search?q=%22welch+window%22+signal&btnG=Search+Books&tbm=bks&tbo=1
The number on the first result page is 121, but there are only 7 result pages @ 10 per page. If you hop to the 7th results page, at the top it says "Page 7 of 64 results", which is a confusing way of saying that the number of book hits is only 64. --Bob K (talk) 00:50, 1 March 2013 (UTC)
Now that's annoying! Well, it's lucky that we are not doing rocket science here. Olli Niemitalo (talk) 01:09, 1 March 2013 (UTC)
We should probably include Parzen and Welch, but use of Bohman seems pretty rare and random. I got a much smaller Scholar ghit number for it than was listed (I updated the value from 884 to 17). We could kind of include it as a brief mention in the power-of-cosine windows section, as it is a convolution of two cos^1 windows, resulting in doubling of all dB numbers in the Fourier transform, compared to cos^1. Welch window, being a polynomial window with only a single polynomial piece, is very easy to calculate. Maybe that is why it has gained some popularity. Olli Niemitalo (talk) 22:33, 28 February 2013 (UTC)
That all seems sensible. I think the high ghits was probably from a regular Google rather than Google Scholar... — BobQQ (talk) 17:45, 1 March 2013 (UTC)

Both papers refer to the Kaiser window as Kaiser-Bessel, so I think I may change that in the article. — BobQQ (talk) 14:40, 21 February 2013 (UTC)

(Nice table!) In general it's usually futile to try to keep multiple Wikipedia articles "in synch" with each other, but perhaps we should consider synching that change with Kaiser_window. --Bob K (talk) 16:24, 21 February 2013 (UTC)
I think it will be useful to get some hit counts from Google Scholar and from Google Books, to see which names that we know of are the most common ones for a window, for example Kaiser window appears about three times as popular as Kaiser-Bessel window, so a name change is probably not warranted at the moment. These searches will also tell if a particular window has found wider use, in which case it makes sense to include it. I think we should call it a "list of window functions" rather than the current "window examples", because we have so many and appear to be aiming for thorough coverage. I also think we should not categorize the window functions to different ranges of B, but perhaps in three categories with names to the effect of: "parameter-less windows", "parameterized windows" and "combination windows". In the first category, the windows could be sorted in approximately increasing order of B. Overall, the windows can be sorted logically, like Kaiser after DPSS (which it approximates). It's a good thing to use in examples parameter values from literature, such as those listed in BobQQ's table, as then we can sometimes also get the B value from literature, along with other figures of merit (like that peak sidelobe) which we could then also present. Olli Niemitalo (talk) 21:26, 21 February 2013 (UTC)
I agree that Kaiser appears the more commonly used term (short names are generally preferable). I'll just add Kaiser-Bessel as an alias. Google hits should be a useful metric for notability. I think if something has a high count it should be included, but not necessarily that something with a low count should be excluded as it may have a very niche use that is still interesting. Equally something could be widely used without being proportionately documented.
I agree about including also windows that are important in some particularly narrow field. I guess I was aiming for excluding early windows that "died out" along the years (unless they are pedagogically useful), or were only discussed by their authors (famous or not). Olli Niemitalo (talk) 11:41, 22 February 2013 (UTC)
On organisation: I think it would be more useful to organise by property, since I would suspect most people would be interested in looking up a window function for a particular use. For example, I want something that can handle a large dynamic range, so I need good sidelobe suppression. I assume that was the original rationale. However, since some of the parametrised windows can be adjusted to change their properties, that wouldn't really work. All that information could be put in a comparison table, which would allow people to look up the windows they want. I think a good grouping would be on functional form. We could have simple windows (rectangular, triangular); those based on sums of cosines (Hann, Hamming, Blackman-Harris, Nuttal, etc.); more complicated functions, and then combination (hybrid?) windows? — BobQQ (talk) 11:17, 22 February 2013 (UTC)
That sounds like a good organization, and it doesn't prevent from sorting by B within each category, if that is deemed useful. Olli Niemitalo (talk) 11:41, 22 February 2013 (UTC)
I expanded the table with exact citations and added columns for ghits, to be filled. Olli Niemitalo (talk) 10:18, 22 February 2013 (UTC)

### Notes

1. ^ This produces an asymmetric form known as "DFT-even" or "periodic".

### References

1. Harris, Fredric J. (1978). "On the Use of Windows for Harmonic Analysis with the Discrete Fourier Transform". Proceedings of the IEEE. 66 (1): 51-83. Unknown parameter |month= ignored (help)
2. Nuttall, Albert H. (1981). "Some Windows with Very Good Sidelobe Behavior". IEEE Transactions on Acoustics, Speech, and Signal Processing. 29 (1): 84-91. Unknown parameter |month= ignored (help)

## Missing argument for \frac

Nageh's version of MathJax is giving me that error message for several of the formulas (both under "Triangular window" and the one under "Welch window"). "Always render PNG" doesn't have this problem (I still need to try the MathJax bundled with the MediaWiki software).

Does the LaTeX code need to be fixed, or is the problem in MathJax? I don't know enough LaTeX to see anything wrong by myself. --SoledadKabocha (talk) 00:08, 6 March 2013 (UTC)

I think that should be fixed now(?) — BobQQ (talk) 14:32, 6 March 2013 (UTC)

## Absurd Gaussian window clipping

The Gaussian window and seemingly other infinite windows are shown and analysed as being clipped, like the Gaussian window being clipped really short. Why would anyone in their right mind ever choose to use such a crudely clipped window for anything mostly given the poor performance it would give? If you're going to clip the Gaussian function so short to make it a window you might as well just subtract by a constant so the first and last bins are 0.

One can say the same thing about the Hamming window (which has a similar FT), and yet it is a classic.--Bob K (talk) 23:16, 3 June 2013 (UTC)

My point is it just makes the analyses pretty worthless if it shows the FT of the window that uses a completely arbitrary, crude and absurd rectangular windowing of the window. Maybe it would make more sense to represent the FT of those windows in their infinity, then what you choose to do to that window to make it finite is your choice.92.135.65.207 (talk) 20:41, 3 June 2013 (UTC)

Maybe we shouldn't include Gaussian at all (doesn't matter to me). But I don't think it's helpful to include unrealizable functions. The article is large enough already without that.--Bob K (talk) 23:16, 3 June 2013 (UTC)
Perhaps a sub/section for unbounded prototype functions is in order, even though and exactly because an unbounded window is a misnomer. Gaussian and Poisson/Exponential would fit, others? The reader must not be confused about whether these are windows or not. I don't think they are, without the prefix truncated. Olli Niemitalo (talk) 23:40, 3 June 2013 (UTC)
"an unbounded window is a misnomer" No it's not. It's described right in the introduction. The Gabor transform uses unbounded Gaussian windows, for instance. 71.167.58.21 (talk) 02:33, 27 July 2016 (UTC)

The truncation scheme described corresponds to Matlab's gausswin function, according to this ref. Maybe if we make that clear it will seem less absurd or arbitrary. Dicklyon (talk) 23:31, 3 June 2013 (UTC)

## Missing factor in Dolph-Chebyshev window

Isn't there a ${\displaystyle (-1)^{k}}$ missing in front of the Dolph-Chebyshev window in frequency domain?

{\displaystyle {\begin{aligned}W_{0}(k)=(-1)^{k}{\frac {\cos\{N\cos ^{-1}[\beta \cos({\frac {\pi k}{N}})]\}}{\cosh[N\cosh ^{-1}(\beta )]}}\end{aligned}}}
— Preceding unsigned comment added by 141.24.211.22 (talk) 13:34, 16 August 2013 (UTC)

Good question. The W0(k) formula in our article is correct. The (-1)k factor converts it to W(k) when w(n) is defined as ${\displaystyle \scriptstyle w(n)=w_{0}\left(n-{\frac {N}{2}}\right),}$ which is an asymmetrical N-point window. Those are fine in applications that require only the DFT of the window, because that is equivalent to using the window's N-periodic summation, and the asymmetry is hidden. That, I believe, is the application frederic harris has in mind in eq 45 of his classic paper. The definition ${\displaystyle \scriptstyle w(n)=w_{0}\left(n-{\frac {N-1}{2}}\right)}$ produces symmetrical N-point windows, which are also fine for DFT applications as well as other things, such as FIR filter design.
Our formula for w0(n) is also correct, except for a possible normalization factor (for unity peak amplitude). But our formula for w(n) only works when N is odd.  A more general formulation that works for any integer is:
{\displaystyle {\begin{aligned}w(n)=w_{0}\left(n-{\frac {N-1}{2}}\right)&={\frac {1}{N}}\sum _{k=0}^{N-1}W_{0}(k)\cdot e^{i2\pi k(n-{\frac {N-1}{2}})/N}\\&={\frac {1}{N}}\sum _{k=0}^{N-1}(-e^{\frac {i\pi }{N}})^{k}\cdot W_{0}(k)\cdot e^{i2\pi kn/N},\end{aligned}}}
which is the inverse DFT of  ${\displaystyle (-e^{\frac {i\pi }{N}})^{k}\cdot W_{0}(k),}$  rather than  ${\displaystyle (-1)^{k}\cdot W_{0}(k).}$
None of the other w(n) functions in the article are computed from W0(k), so this is only needed for the Dolph-Chebyshev case.
--Bob K (talk) 14:28, 17 August 2013 (UTC)

## Dolph-Chebyshev window: no context for comment about discontinuities at the window edges

User 71.167.63.24 recently added:

Due to the equiripple condition, the time-domain window may have Dirac delta discontinuities at the edges. The Taylor window approximates this response without the discontinuities, allowing the equiripples to drop off at the edges.

But harris' paper, p 71, states:

The continuous solution to the problem exhibits impulses at the boundaries which restricts continuous realizations to approximations (the Taylor approximation). The discrete or sampled window is not so restricted, and the solution can be implemented exactly.

Our article only presents the discrete window solution.
--Bob K (talk) 01:33, 21 August 2013 (UTC)

The discontinuities are still there in the discrete version, though you can't see them in WP's plot. http://www.mathworks.com/help/signal/ref/taylorwin.html

## Conflicting definitions of triangular window

Our current definition of triangular window is:

${\displaystyle w(n)=1-\left|{\frac {n-{\frac {N-1}{2}}}{\frac {N+1}{2}}}\right|}$

which intersects the n-axis at n=-1 and n=N. The Matlab definition at http://www.mathworks.com/help/signal/ref/triang.html, for N even, intersects at n=½ and n=N+½, which is equivalent to n=-½ and n=N-½, in our axis system. The point is that the underlying w0(n) function is 1 sample narrower than our definition, according to Matlab.

A definition that would agree with Matlab is:

${\displaystyle w(n)=1-\left|{\frac {n-{\frac {N-1}{2}}}{\frac {N}{2}}}\right|}$

--Bob K (talk) 19:34, 22 August 2013 (UTC)

Also, Harris, p 59, defines our w0(n) as intersecting the axis at n = ±N/2, which defines its width as N, in agreement with Matlab.
--Bob K (talk) 20:05, 22 August 2013 (UTC)

## Dolph–Chebyshev window: I have a curiousity motivated question

The formula:

{\displaystyle {\begin{aligned}W_{0}(k)&={\frac {\cos\{N\cos ^{-1}[\beta \cos({\frac {\pi k}{N}})]\}}{\cosh[N\cosh ^{-1}(\beta )]}}\\\beta &=\cosh[{\frac {1}{N}}\cosh ^{-1}(10^{\alpha })]\end{aligned}}}

appears to be well-established in the literature.  But I can't help focussing on the core ${\displaystyle \cos({\tfrac {\pi k}{N}})}$ element, and seeing 2N periodicity, instead of the expected N periodicity.

So apparently the outer shell:   ${\displaystyle \cos\{N\cos ^{-1}[\beta \ xxx]\}}$   does the magic.  Is that about right?

--Bob K (talk) 01:11, 24 August 2013 (UTC)

The inner element creates a half-cycle, not a complete cycle, with the ends exceeding -1..+1 by some amount, which creates the mainlobe, as cos-1 changes from real to imaginary at that point.
Note that some references use cos(N cos-1( while others use cosh(N cosh-1 for either bottom or top, but both are equivalent. Maybe we should use the same functions for top and bottom?
— Preceding unsigned comment added by 71.167.59.208 (talk) 16:19, 24 August 2013 (UTC)
Thanks. I tracked down an example of that: http://www.ijera.com/papers/vol%201%20issue%202/012109116J.pdf It has a nice symmetry to it. I guess harris prefers having 3 cos() functions in the numerator, instead of 1 cos() and 2 cosh(). I'm inclined to leave it alone, but you've made a good point.
--Bob K (talk) 17:42, 26 August 2013 (UTC)

The paper "The Dolph–Chebyshev Window: A Simple Optimal Filter" by PETER LYNCH" is commonly cited as a reference for this window; should it be added to the (general) Further Reading section, or perhaps to the section on the window itself? Also, I notice, in the Further Reading section, references to papers on the Ultraspherical window (of which, Dolph-Chebyshev is a special case), but we don't seem to have a section on that window. If we want to add one, Kabal's "Time Windows for Linear Prediction of Speech" includes matlab/octave code. Aquegg (talk) 04:34, 4 September 2013 (UTC)

In fact, Bergen's code [1] seems better for octave. Aquegg (talk) 05:25, 4 September 2013 (UTC)
Section has been created. Aquegg (talk) 11:53, 3 February 2014 (UTC)

## Planck-taper

The formula for the Planck-taper window function is incorrect. This is easily seen by putting n=0 or n=N-1, when the function should be zero (The appropriate Z parameter should be infinity) The correct formulae for the function are given in [2] Gordone (talk) 15:21, 5 April 2014 (UTC)

Or maybe it's correct (didn't check), and the difference is because it excludes the zero-valued endpoints. Olli Niemitalo (talk) 08:20, 7 April 2014 (UTC)

The mathematics as shown are incorrect, as Niemitalo stated above, as n approaches N-1, the filter quantity approaches 1/2, not 0! — Preceding unsigned comment added by 68.104.252.75 (talk) 23:07, 12 March 2015 (UTC)

That formula is definitely wrong, as noted above. The one cited by Gordone does work, but you have to be sure not to divide by 0.FundmntlTheorem (talk) 02:36, 18 May 2015 (UTC)

## FFT of the Window functions

Hi there,

I just posted this at Help desk and a bevy of comments appeared immediately saying that it was not appropriate place for this stuff. Somebody recommended that I should post here instead.

As a part of a larger project I have to deal with Fast Fourier Transform (FFT) which is a variation of Discrete Fourier Transform (DFT). After some trials and errors I settled on Librow FFT. The source code there is in C but most of my software is in Gfortran and I had to convert Librow's source to Gfortran. I tested Librow's code before conversion using Wikipedia's Window functions. The test consisted of invoking Forward and Inverse FFT. Everything worked. The GFortran software derived from the C source code likewise worked perfectly well in a sense that by invoking the Inverse transform I could always get the original functions. Specifically I used Blackman-Harris window, Flat top window, Triangular window & Sine window. Everything worked except one thing: I could never get anything even remotely similar to the Fourier transform functions the website demonstrates. So, I began looking critically at the "Fourier Transforms" displayed on that page.

First we know that DFT gives us a set of complex numbers. The illustrations given on the web page did not mention how these seemingly real numbers had been obtained. Are they real or imaginary parts? How come the abscissas contain negative domain? In a way of reminding:

DFT of a signal ${\displaystyle x}$ is defined (Stanford) as:

${\displaystyle \mathrm {X} (\omega _{k})\triangleq \sum _{n=0}^{N-1}x(t_{n})e^{-j\omega _{k}t_{n}}~~~k=0,1,2...N-1}$

That is one definition. According to Discrete_Fourier_transform#Definition, it is an N-periodic sequence. So that includes negative values of k. The plots you see in the article are 20•log10(|Xk|). Code is available for inspection at Rectangular.svg
--Bob K (talk) 20:15, 19 June 2015 (UTC)

where

${\displaystyle \omega _{k}~\triangleq ~{\frac {k2\pi }{NT}}~~~}$; where N - number of samples; 1/T - sampling rate

I don't see how one can get negative numbers of anything for the abscissas.

This situation is very unsettling for me because I don't understand what is going on, how those functions were obtained, why my real and imaginary parts of FFT differ from the illustrations given in the Wikipedia article. Am I on the right track or what? Now I have to question a lot of things. I am wondering if there is anybody out there who can explain to me the discrepancy? Thanks --AboutFace 22 (talk) 15:36, 16 June 2015 (UTC)

it's odd anyone directed you here. An article's Talk page is only for discussing how to improve the article, not a general discussion of the topic nor for helping with people's problems in the domain. You would need to find a technical forum for FFTs. Good luck. Strebe (talk) 20:14, 16 June 2015 (UTC)
I suppose so, but if the article isn't clear enough that the OP can figure it out, then it seems that this could be a good place to discuss it. Gah4 (talk) 01:25, 17 February 2016 (UTC)
Seems to me that the OP might have missed that the graphs are logarithmic on the y-axis. Gah4 (talk) 01:25, 17 February 2016 (UTC)
Well, another blow :-) I think my post may be considered an attempt to improve the article, provided my comments make sense. But to determine it is the case the post should be read. I reviewed most of the previous posts and it seems many competent mathematicians dwell here. Thanks, - --AboutFace 22 (talk) 00:55, 17 June 2015 (UTC)
Maybe you could try posting your question on an external forum such as this one. Or perhaps try emailing the author of the Librow article you cite. I'm neither a mathematician nor a coder, but it seems likely that your problem will be resolved outside Wikipedia. Best of luck! >MinorProphet (talk) 07:58, 18 June 2015 (UTC)

## Color choice is not contrasting enough: Window functions in the frequency domain

This image does use colors that are not contrasting enough. Prefer a clear bright yellow that makes a clear destinction and isn't too close to orange or green. Similarily, using blue and only adding red/green to it to create other shades of blue makes it too hard to distinguish. Please consider how different people have different color perceptions. As such, prefer brightness contrast over color contrast (that different people perceive differently). — Preceding unsigned comment added by 88.219.148.170 (talk) 16:47, 10 February 2016 (UTC)

## Windows in actual use

I have always thought that in actual use, and especially in the case of long signals, one applied a window function at the ends, and left most of the signal as-is. This happens naturally with the rectangular window, but the triangle would turn into a trapezoid, and other windows would also look different. One might have signals thousands, or even millions of points long. All that is needed is to remove the effects from the discontinuity due to the periodicity of the DFT, or at least get the effect low enough that one can live with it. Yet the windows, and spectra shown, don't seem to work this way. Am I missing something? Gah4 (talk) 01:49, 17 February 2016 (UTC)

For starters, it's the same question, discrete-time or continuous-time. The DFT has nothing to do with it. Given an effectively infinitely long function s(t), and a finite window w(t) (rectangular, Hann, trapezoidal, etc),
${\displaystyle {\mathcal {F}}\{s\cdot w\}={\mathcal {F}}\{s\}*{\mathcal {F}}\{w\},}$
and your question is "When w(t) is relatively long, why would one choose a conventional window instead of a more trapezoidal-like window, for spectral analysis?". Throwing in the DFT adds unnecessary complexity. See Spectral_leakage#Discrete-time_functions.
--Bob K (talk) 16:11, 17 February 2016 (UTC)
And the answer is that just as a trapezoidal-like window is better than rectangular in terms of sidelobes (resolution of disparate amplitude sinusoids) and worse than rectangular in terms of main-lobe width (resolution of similar amplitudes), a conventional window (e.g. Hann or Nuttall) is better than trapezoidal-like (e.g. Tukey or Plank-taper) in terms of sidelobes and worse than trapezoidal in terms of main-lobe width.
--Bob K (talk) 16:53, 17 February 2016 (UTC)
Your example of "millions of points" implies that your trapezoidal choice would be similar to a Tukey or Plank-taper function with extremely narrow "skirts". In the limit, they become essentially rectangular. So you might as well just use the simpler rectangular window.
--Bob K (talk) 17:07, 17 February 2016 (UTC)
In Fourier terms, the sharpness of the transition determines the frequency components. Right now, I am working on smoothing the transitions at the beginning and end of audio files (CD tracks). The problem is a little different from the DFT problem, as the ear is more sensitive to high frequencies. (Most audio sources have lower amplitude at high frequencies.) A sharp edge makes a very noticeable click. I want to smooth the transition enough to avoid the click, but otherwise not change the main part of the audio track. Gah4 (talk) 09:34, 18 February 2016 (UTC)
OK, then the missing point you are looking for is that window functions can be used as lowpass filters, but it is implemented by convolution, not multiplication, in the time domain. When you apply them by multiplication, the purpose is spectral analysis.
--Bob K (talk) 10:48, 18 February 2016 (UTC)
The human aural system works in both time and frequency domain, so the signals have to be considered both ways. I want to avoid the click that comes at the beginning, so it is both time and frequency domain. Smoothing the transition at the beginning and end is a low-pass filter only for the beginning and end, with no filter in between. Gah4 (talk) 20:58, 18 February 2016 (UTC)
Looking at some Tektronix articles, it seems that spectrum analyzers tend (maybe tended) to do a series of 1024 point DFTs and display them sequentially. That is, again, both time and frequency domain. For an audio signal, such a series of transforms would have an audible effect at the transition. Gah4 (talk) 20:58, 18 February 2016 (UTC)
I don't care about any of that. You are way off the original target you wanted help with. I am not interested in your game.
--Bob K (talk) 22:16, 18 February 2016 (UTC)
It is the original target that I wanted, but I didn't explain it very well. OK, the reason for asking was that I was looking at the transform graphs and realized that they didn't apply the way I wanted to use them. Some years ago, 1024 points was a lot to compute in the time available, so things might have changed over the years. Thanks. Gah4 (talk) 09:15, 21 February 2016 (UTC)
The DFT is greatly misunderstood, by the way. It's best thought of as just a discrete-frequency sampling of the actual continuous-frequency DTFT (Discrete-time_Fourier_transform#Sampling_the_DTFT). Whatever undesirable things happened to the DTFT as a result of DSP manipulations are merely sampled, not created, by the DFT. What gets lost, when you sample the DTFT, is whether the DTFT was actually a continuous-frequency or discrete-frequency function. If it was actually a discrete-frequency function, then the original discrete-time function was periodic, and it can be unambiguously recovered by the inverse DFT. If the DTFT was actually a continuous-frequency function, the inverse DFT can only recover a periodic summation of the original discrete-time function. If the periodic summation does not cause overlap of the copies of the original discrete-time function, then one cycle of the inverse DFT is the original function. A necessary and sufficient condition for that to happen is that the original function has a finite number of non-zero samples, and the parameter N used to sample the DTFT (as follows):
Yes, but the DFT is often used on finite length regions of longer signals. Even more, sharp transitions may be added when they don't exist in the original signal. Gah4 (talk) 09:34, 18 February 2016 (UTC)
If you're still talking about lowpass filtering, we're talking about two different things.
--Bob K (talk) 10:48, 18 February 2016 (UTC)
${\displaystyle \underbrace {X_{1/T}\left({\frac {k}{NT}}\right)} _{X_{k}}=\sum _{n=-\infty }^{\infty }x[n]\cdot e^{-i2\pi {\frac {kn}{N}}}\quad \quad k=0,\dots ,N-1}$
must be large enough that the individual terms of this periodic summation do not overlap; i.e. the duration of the non-zero samples in each term is not greater than N:
${\displaystyle x_{N}[n]\ {\stackrel {\text{def}}{=}}\ \sum _{m=-\infty }^{\infty }x[n-mN].}$
--Bob K (talk) 18:16, 17 February 2016 (UTC)

## Section 1.4 issue

Reference #10 (http://www.bksv.com/doc/bv0031.pdf Technical Review 1987-3 Use of Weighting Functions in DFT/FFT Analysis (Part I); Signals and Units) asserts the following:

An application where Rectangular weighting is a "must", is in system analysis using a pseudo-random excitation signal. A pseudo-random signal is a periodic signal with its period length adjusted to the record length T of the analysis. All the components of the pseudo-random signal will therefore coincide with the centre frequencies of the filters (lines) and the analysis will be free of leakage assuming Rectangular weighting is used (optimal situation or "best case").

This assertion is false, and therefore we need to be careful about the claim "A window function is also not used when a periodic signal's period matches that of a Fourier transform".

To understand, let the filter/line center-frequencies be k/T, for integer values of k. A component ${\displaystyle \cos \left(2\pi {\tfrac {k}{T}}t\right),}$ rectangularly windowed to interval [0,T], will have a sinc-shaped spectral leakage pattern (Fourier transform) with zeros at every center-frequency except k/T. So computing only those lines gives the appearance of no leakage, whether the windowed function is repeated periodically or not. Periodic repetition causes the entire Fourier transform to be zero at every frequency except k/T, which is what the author interprets as no leakage.

However, a component ${\displaystyle \cos \left(2\pi {\tfrac {k+0.5}{T}}t\right),}$ rectangularly windowed to interval [0,T], will also have a sinc-shaped spectral leakage pattern (Fourier transform), but it will have non-zero values at every center-frequency. The peak amplitude at frequencies k/T and (k+1)/T will be distorted (reduced) by about 4 dB relative to the previous case (the ${\displaystyle \cos \left(2\pi {\tfrac {k}{T}}t\right)}$ component), due to scalloping loss. And the amplitude at frequency (k+10)/T (for example) will be only about 26 dB lower than that, which makes it impossible to resolve a lower-level component at that frequency using a rectangular window. In this case, periodic repetition of the windowed function does not hide the leakage. It does cause the underlying Fourier transform to be zero in-between the center-frequencies, but all the center-frequencies contain non-zero leakage, which can be redistributed (but not eliminated) by a non-rectangular window function.

--Bob K (talk) 16:06, 15 March 2016 (UTC)

The same problem appears to apply to the unreferenced shaft alignment claim. And the OFDM point is unnecessary at best, irrelevant at worst, because no OFDM algorithm description calls for windowing. The same is true when FFTs are used for fast convolution and probably many other non-spectral-analysis applications. No need to list them all here... this article is about windows, not FFTs.

--Bob K (talk) 11:59, 16 March 2016 (UTC)

Doesn't the +0.5 make the signal have a period of 2 T and therefore violate the premise of period T? Glrx (talk) 18:54, 20 March 2016 (UTC)

${\displaystyle {\tfrac {k+0.5}{T}}}$ is the frequency (cycles per second). Therefore, the period is ${\displaystyle {\tfrac {T}{k+0.5}}}$ (seconds per cycle). The number of cycles per T sec is ${\displaystyle \scriptstyle k+0.5}$.
--Bob K (talk) 21:45, 21 March 2016 (UTC)

If in T seconds you have a half cycle left over, then the period is 2 T not T. That is, everything repeats over 2 T. Glrx (talk) 18:51, 24 March 2016 (UTC)

Oh, now I see what you mean. However, pseudorandom usually means it is generated randomly (in some sense) for a known duration (T), and it is repeatable. Repeating it with period T makes it periodic, regardless of its frequency content. Then the Fourier transform of the periodic signal is a line spectrum (Fourier series). A sinusoidal component with frequency ${\displaystyle {\tfrac {k}{T}}}$ will have just one line (no leakage). If one knows apriori that all the components are harmonics of ${\displaystyle {\tfrac {1}{T}}}$, and the purpose of analysis is to determine which harmonics are present, then rectangular windowing is indeed necessary. Good point!
--Bob K (talk) 12:33, 25 March 2016 (UTC)

Belatedly pinging , who was the last to edit the offending section, just to make sure he is aware of the removal and subsequent discussion; I have no opinion other than that this edit seems to satisfactorily resolve the issue. --SoledadKabocha (talk) 00:11, 17 May 2016 (UTC)

## External links modified

Hello fellow Wikipedians,

I have just added archive links to 2 external links on Window function. Please take a moment to review my edit. If necessary, add {{cbignore}} after the link to keep me from modifying it. Alternatively, you can add {{nobots|deny=InternetArchiveBot}} to keep me off the page altogether. I made the following changes:

When you have finished reviewing my changes, please set the checked parameter below to true or failed to let others know (documentation at {{Sourcecheck}}).

Archived sources have been checked but failed to be useful/working

Cheers.—cyberbot IITalk to my owner:Online 22:50, 18 March 2016 (UTC)

Unfortunately, those archived sources are not useful. It's best to just remove the links completely, which I will do.--Bob K (talk) 02:55, 19 March 2016 (UTC)

## asymmetric windows (MATLAB "periodic", aka "DFT-even")

I'm rewriting this section based on some new insight. At issue is the justification/explanation for use of asymmetric windows for spectral analysis. We had said that "the DFT samples the DTFT of the window at the exact points that are not affected by spectral leakage from the discontinuity". And we had also pointed out that when we sample a continuous DTFT (by doing a DFT on N samples) and then we do an inverse DFT, the resultant sequence is a periodic repetition of the original N samples. So sample N is a copy of sample 0, and if an Nth coefficient had been truncated from a symmetrical sequence (as in a "periodic" window), it appears to be replaced in the periodic repetition. True statement, but its relevance is vague.

Returning to the first statement, I note that a majority of the Fourier transform pictures in the article appear to have nulls or deep notches at the integer values (DFT bin centers) on the x-axis that are not too near the main lobe. I think that's what is meant by "exact points that are not affected by spectral leakage from the discontinuity". But there are exceptions, including triangular, Parzen, and Hann–Poisson windows. And besides those exceptions, I would point out that there is a reason we don't just plot an N-point DFT of an N-point window. That would only reveal the leakage into the DFT bins from a sinusoid whose frequency is also an integer DFT bin. The sidelobes reveal the leakage to expect from sinusoids at other frequencies. That is why it's important to see them and choose a window that suppresses them to an acceptable level.

The article no longer appears to offer a blanket justification for choosing periodic vs symmetric (or even implying their equivalence), and I don't believe it should. If someone wants to make an informed choice between them for a specific application, they should compare the DTFTs. I did that, using the hann(•) function, which generates zero-valued end points. For 3 different 64-point windows, I generated hann(64), hann(64+1), and hann(64+2)... dropping one end-point of hann(64+1) and both end-points of hann(64+2). The main lobe width and sidelobe amplitudes are virtually identical in all three cases. The respective ENBWs are 1.5238, 1.5000, and 1.4769, from which I infer that the fewer zero-valued end-points, the better. The biggest difference in the 3 cases is the spacing of the spectral nulls (and sidelobes between the nulls). The respective spacings (in units of "bins") are 64/63, 64/64, and 64/65. When one displays only the DFT samples (instead of the DTFT), the 64/64 = 1.0 spacing creates the illusion of no leakage, which seems to be a popular argument for the "periodic" version of window functions.

--Bob K (talk) 16:42, 7 April 2016 (UTC)

For the record, a quick explanation of the null-spacing of the hann(N+1) DTFT is that function  ${\displaystyle \scriptstyle w(t)=0.5\;\left(1-\cos \left({\frac {2\pi t}{NT}}\right)\right)}$ is NT-periodic, and the Fourier transform of just one period is the transform of w(t) convolved with a sinc function whose zero-crossings occur at intervals of ${\displaystyle {\tfrac {1}{NT}}.}$ The transform of w(t) is the sum of Dirac delta functions at frequencies 0 and ${\displaystyle \pm {\tfrac {1}{NT}}.}$ So the transform of one cycle is the sum of three sinc functions. Near 0 Hz they combine to form the main lobe. But farther away, the largest one dominates the zero-crossings, and the interval asymptotically approaches ${\displaystyle {\tfrac {1}{NT}}.}$

Also, the period, NT, spans N+1 samples at intervals of T. The DFT of an N+1 sample window function has a bin-spacing of ${\displaystyle {\tfrac {1}{(N+1)T}},}$ which is slightly less than the zero-crossing interval. But when one sample is dropped to create a "periodic" window (and an inadvertent discontinuity), the DFT bin-spacing becomes ${\displaystyle {\tfrac {1}{NT}},}$ which matches the zero-crossing interval asymptote. So that is the rationale for the exaggerated statement that "the DFT samples the DTFT of the window at the exact points that are not affected by spectral leakage from the discontinuity". The exaggeration is that it's not true for points near the main lobe, and it's only asymptotically true father from the main lobe, and it isn't generally true for arbitrary types of window functions.

--Bob K (talk) 02:57, 8 April 2016 (UTC)