Are there any (windowing) functions out there that are positive in the time domain as well as in the frequency domain? I know the Gaussian function is strictly positive in both, the Fourier transform of a Gaussian function being a Gaussian function. But are there any other functions that are stricly positive in both the time and frequency domain? The reason I'm asking this is that I'm looking for a windowing function to make spectrograms, spectrograms which could not possibly contain a single negative pixel. The Gaussian function fits the bill, but are there any alternatives?
Positive functions in both their time and frequency representations? (i.e. Gaussian function)
Started by ●November 13, 2008
Reply by ●November 13, 20082008-11-13
On Nov 13, 7:01�pm, Michel Rouzic <Michel0...@yahoo.fr> wrote:> Are there any (windowing) functions out there that are positive in the > time domain as well as in the frequency domain? I know the Gaussian > function is strictly positive in both, the Fourier transform of a > Gaussian function being a Gaussian function. But are there any other > functions that are stricly positive in both the time and frequency > domain? > > The reason I'm asking this is that I'm looking for a windowing > function to make spectrograms, spectrograms which could not possibly > contain a single negative pixel. The Gaussian function fits the bill, > but are there any alternatives?Many alternatives. Since a spectrogram is a plot of magnitudes (>=0), what exactly is your concern about being negative in the frequency domain ? Dirk
Reply by ●November 14, 20082008-11-14
dbell wrote:> On Nov 13, 7:01�pm, Michel Rouzic <Michel0...@yahoo.fr> wrote: > > Are there any (windowing) functions out there that are positive in the > > time domain as well as in the frequency domain? I know the Gaussian > > function is strictly positive in both, the Fourier transform of a > > Gaussian function being a Gaussian function. But are there any other > > functions that are stricly positive in both the time and frequency > > domain? > > > > The reason I'm asking this is that I'm looking for a windowing > > function to make spectrograms, spectrograms which could not possibly > > contain a single negative pixel. The Gaussian function fits the bill, > > but are there any alternatives? > > Many alternatives. Since a spectrogram is a plot of magnitudes (>=0), > what exactly is your concern about being negative in the frequency > domain ?Oh yeah that's perfectly right but I'd like to avoid zero crossings and "absoluted negatives", I mean, it kind of makes holes in my spectrograms hehe. No big deal, but regardless of the necessity of worrying about this I'm curious to know if there's any other such function that shares this property with the Gaussian function.
Reply by ●November 14, 20082008-11-14
>I'm curious to know if there's any other such >function that shares this property with the Gaussian function. >Here's one, although you probably don't want to use it as a window: [abs(t)]^(-1/2) <--> [abs(w)]^(-1/2) Regards, Steve
Reply by ●November 14, 20082008-11-14
On 14 Nov, 01:01, Michel Rouzic <Michel0...@yahoo.fr> wrote:> Are there any (windowing) functions out there that are positive in the > time domain as well as in the frequency domain? I know the Gaussian > function is strictly positive in both, the Fourier transform of a > Gaussian function being a Gaussian function. But are there any other > functions that are stricly positive in both the time and frequency > domain? > > The reason I'm asking this is that I'm looking for a windowing > function to make spectrograms, spectrograms which could not possibly > contain a single negative pixel. The Gaussian function fits the bill, > but are there any alternatives?What about the power spectrum? If you use the naive method of squaring the magnitude of the DFT it will be non-negative but might contain vanishing coeffcients. If you use the not-so-naive implementation and compute it as the DFT of the window-weighted autocorrelation function it will be far less likely to contain vanishing coefficients. And yes. Any windowing function will do with the latter approach. Rune
Reply by ●November 14, 20082008-11-14
On Nov 14, 7:39�am, Rune Allnor <all...@tele.ntnu.no> wrote:> On 14 Nov, 01:01, Michel Rouzic <Michel0...@yahoo.fr> wrote: > > > Are there any (windowing) functions out there that are positive in the > > time domain as well as in the frequency domain? I know the Gaussian > > function is strictly positive in both, the Fourier transform of a > > Gaussian function being a Gaussian function. But are there any other > > functions that are stricly positive in both the time and frequency > > domain? > > > The reason I'm asking this is that I'm looking for a windowing > > function to make spectrograms, spectrograms which could not possibly > > contain a single negative pixel. The Gaussian function fits the bill, > > but are there any alternatives? > > What about the power spectrum? If you use the naive method > of squaring the magnitude of the DFT it will be non-negative > but might contain vanishing coeffcients. > > If you use the not-so-naive implementation and compute it > as the DFT of the window-weighted autocorrelation function > it will be far less likely to contain vanishing coefficients. > > And yes. Any windowing function will do with the latter > approach. > > RuneActually I don't use a STFT, I use what I like to think as the frequency equivalent of the STFT, that is I do the windowing in the frequency domain, which has the advantage of easily letting you have non-linear frequency scales, whereas time should always be linear. So it's more like filter bank + envelope detection. Not sure how that relates to the two approaches you opposed...
Reply by ●November 14, 20082008-11-14
On 14 Nov, 16:23, Michel Rouzic <Michel0...@yahoo.fr> wrote:> On Nov 14, 7:39�am, Rune Allnor <all...@tele.ntnu.no> wrote: > > > > > > > On 14 Nov, 01:01, Michel Rouzic <Michel0...@yahoo.fr> wrote: > > > > Are there any (windowing) functions out there that are positive in the > > > time domain as well as in the frequency domain? I know the Gaussian > > > function is strictly positive in both, the Fourier transform of a > > > Gaussian function being a Gaussian function. But are there any other > > > functions that are stricly positive in both the time and frequency > > > domain? > > > > The reason I'm asking this is that I'm looking for a windowing > > > function to make spectrograms, spectrograms which could not possibly > > > contain a single negative pixel. The Gaussian function fits the bill, > > > but are there any alternatives? > > > What about the power spectrum? If you use the naive method > > of squaring the magnitude of the DFT it will be non-negative > > but might contain vanishing coeffcients. > > > If you use the not-so-naive implementation and compute it > > as the DFT of the window-weighted autocorrelation function > > it will be far less likely to contain vanishing coefficients. > > > And yes. Any windowing function will do with the latter > > approach. > > > Rune > > Actually I don't use a STFT, I use what I like to think as the > frequency equivalent of the STFT, that is I do the windowing in the > frequency domain, which has the advantage of easily letting you have > non-linear frequency scales, whereas time should always be linear.No windowing in time? How do you get a spectrogram from that? Rune
Reply by ●November 14, 20082008-11-14
On Nov 14, 3:34�pm, Rune Allnor <all...@tele.ntnu.no> wrote:> No windowing in time? How do you get a spectrogram from that? > > RuneThe frequency domain windowing is equivalent to band-pass filtering. I then IFFT it and detect the envelope using the analytic signal, in the time domain of course. The envelope is an horizontal band of the final spectrogram. It's quite the equivalent of FFTing a time slice on a FFT and using the magnitude as one of your spectrogram's vertical bands. It has the advantage of allowing you to do anything you want regarding frequency scales and bandpass bandwidth, thus giving you varying time and frequency resolutions on the same spectrogram. That's really a great way to make spectrograms, beats STFT, except when you need a low delay real-time spectrogram.
Reply by ●November 14, 20082008-11-14
On 14 Nov, 17:10, Michel Rouzic <Michel0...@yahoo.fr> wrote:> On Nov 14, 3:34�pm, Rune Allnor <all...@tele.ntnu.no> wrote: > > > No windowing in time? How do you get a spectrogram from that? > > > Rune > > The frequency domain windowing is equivalent to band-pass filtering. I > then IFFT it and detect the envelope using the analytic signal, in the > time domain of course. The envelope is an horizontal band of the final > spectrogram. It's quite the equivalent of FFTing a time slice on a FFT > and using the magnitude as one of your spectrogram's vertical bands. > > It has the advantage of allowing you to do anything you want regarding > frequency scales and bandpass bandwidth, thus giving you varying time > and frequency resolutions on the same spectrogram. That's really a > great way to make spectrograms, beats STFT, except when you need a low > delay real-time spectrogram.It seems you are re-inventing the Gabor filters. Or wavelets. Rune
Reply by ●November 14, 20082008-11-14
On Nov 13, 11:39 pm, Rune Allnor <all...@tele.ntnu.no> wrote:> ... > What about the power spectrum? If you use the naive method > of squaring the magnitude of the DFT it will be non-negative > but might contain vanishing coeffcients. > > If you use the not-so-naive implementation and compute it > as the DFT of the window-weighted autocorrelation function > it will be far less likely to contain vanishing coefficients. > ...> RuneRune The two methods differ in that the first calculates only every other sample of the second. Therefore the second contains all of the vanishing coefficients of the first, and possibly more. The two methods can be made equivalent by zero extending the time domain sample set to double the length. The zero extended version of the first method is identical to the non-zero-extended version of the second method except for the number of samples required for the window. On Nov 14, 7:23 am, Michel Rouzic <Michel0...@yahoo.fr> wrote:> ... > Actually I don't use a STFT, I use what I like to think as the > frequency equivalent of the STFT, that is I do the windowing in the > frequency domain, which has the advantage of easily letting you have > non-linear frequency scales, whereas time should always be linear. So > it's more like filter bank + envelope detection. Not sure how that > relates to the two approaches you opposed...Michel In your process you apply a rectangular window in the time domain simply by selecting a finite data set of samples to transform. "No window" -is- a rectangular window. Perhaps the biggest difference for your application between the two approaches Rune gives is that the first provides access to the complex DFT coefficients and so allows the application of your further choices of coherent weightings in the frequency domain. Dale B. Dalrymple