I think I've now read through all of the questions on DFT scaling on this site, and I've still got one more. (I'm sure the knowledge is here somewhere, but I couldn't put together the pieces!) I'm trying to understand the standard DFT scaling through the lens of taking a true DTFT of an infinite length signal, then convolving that result with the DTFT of a window function.
Here's the amplitude-preserving scaling I want to derive: $$\frac{2|X|}{S_1} \quad \texttt{with} \quad S_1 = \sum_{i = 0}^{N - 1} w_i$$
Let's start with a sinusoid with amplitude $A$ in the time domain $A\cos(2\pi f) = \frac{A}{2}e^{i2\pi f} + \frac{A}{2}e^{-i2\pi f}$. The DTFT of this is (using this wonderful answer): $$ \mathcal{F} \{ A \cdot \cos(2\pi f n) \} = \frac{A}{2}(2\pi \delta(\omega - 2\pi f) + 2\pi \delta(\omega + 2\pi f)) $$
Where these are good, old fashioned, infinite height, area 1, sifting-property-having Dirac deltas. Except that I thought there would be an infinite number of copies here in an infinite impulse train. I know this is discussed in the answer I linked, but I couldn't figure it out. This is my first question.
Now let's multiply our signal with a window function, with sum of window coefficients $S_1$. This corresponds to convolving in the frequency domain our pair of deltas with the DTFT of the window. Some easy Python code tells me that $S_1$ is simply the maximum height of the main lobe of the window magnitudes in the frequency domain, but I'm not sure why - there's question 2!
This is good though, because convolving the window with those deltas is going to give me two (mirrored) copies of the window function's lobes centered around $\pm f$. The new maximum heights (in magnitude) of the main lobes will be the product of the coefficients in front of the deltas and the maximum height of the the original main lobe: $S_1 * \frac{A}{2} * 2\pi$. Let's throw away the negative frequencies, as we often do with real signals. Now we want to make sure the height of this is $A$, so we multiply by $2 / S_1$, as in the scaling we were trying to derive. But wait, what about the $2\pi$? That's my question 3.