(This is another of my highly-technical "note to self" signal processing posts. I'll put up something less arcane soon.)
The Fourier transform is great for finding periodic signals: you take an FFT and a periodic signal looks like a peak in the output. Well, in an ideal world, that is; you only really get such a neat and tidy peak if the periodic signal is exactly at a Fourier frequency, which happens when it makes exactly an integral number of turns over the course of the data set. If the signal is somewhere between two Fourier frequencies, the power is spread over several Fourier output values. While it's possible to interpolate a very accurate value based on the ~32 nearest values, this can be expensive, and there's a shortcut called "interbinning"; it doesn't reconstruct the phase, but you just take a scaled average of the two neighbouring bins and get a decent approximation to the value at the midpoint between two independent Fourier frequencies.
My problem, for this post, is that the theory is all nicely worked out when going from the time domain to the frequency domain, but I want to do something analogous while going from the frequency domain back to the time domain, if that's possible. (I haven't done a literature search, or even looked very carefully at the frequency-domain interbinning papers; I thought this would be a good exercise for me.)
Just to be specific about the process I'm trying to analyze: I have the Fourier series of some pulse, assumed a delta function, and I truncate it and do an inverse real FFT, obtaining n points. Now I want to efficiently estimate the amplitude of the original pulse, in the presence of noise (though not much noise, since I need a highly significant detection to be worth following up).
The signal, then, has the profile given by a shifted Dirichlet kernel, sin(pi (n+1) x)/sin(pi x) (note the different definition of n I use from what's in the link). So when the peak is midway between two sampling points, the amplitude of the two neighboring points is a fraction 1/(n tan(pi/2n)) of the height of the main peak (note that there's a little fiddle here because, if we're doing a real inverse FFT, only the real part of the top Fourier coefficient is used; this value takes that into account). This is a gradually increasing function converging to 2/pi, or about 0.637. So if we average two adjacent values and divide by this value, we'll get the height the peak would have had had it been exactly on a sampling point.
Of course, we have noise on every sampling point, and scaling up the average like this will amplify the noise. But the averaging reduced it by a factor root two, so the loss is not as bad as it seems at first. In fact, as the plot up above shows, for all but the smallest sizes the efficiency is always about 2sqrt(2)/pi or 90% (this lowered efficiency essentially comes from using only the power in two samples rather than all of them). A ten percent loss of efficiency is not good, certainly, but we can to some extent compensate for it: simply lower our threshold for interbinned candidates by ten percent, then at the end discard any that don't improve when "polished". Since this approach is necessary anyway for the frequency sampling and interpolation, and since not interbinning roughly doubles our runtime, this is probably reasonable as long as we don't get utterly deluged with candidates as a result.