Skip to main content
9 votes
Accepted

Spectrogram of a single tone complex signal has two dark lines?

Since this is a constant spectrogram, you could just as well have just averaged the |FFT|² and plotted that! (The most colorful way of visualizing things isn't always the optimal one; your signal ...
Marcus Müller's user avatar
7 votes
Accepted

Self studying, getting a quality spectrogram

Why are my peaks capped? Your amplification gain is set to too high, or you are too close to the microphone. The amplifier is driven to its limits and it clips the output. Keep this recording and ...
A_A's user avatar
  • 10.7k
7 votes

Python audio analysis: which spectrogram should I use and why?

I recommend a Synchrosqueezed Continuous Wavelet Transform representation, available in ssqueezepy. Synchrosqueezing arose in context of audio processing (namely speaker identification), and there's ...
OverLordGoldDragon's user avatar
5 votes

Understanding overlapping in STFT

I understand the concept of the STFT. In order to avoid spectral leakage, you use a hann window that overlaps by 50%. I'm sorry but you have a misunderstanding of spectral leakage in addition to how ...
Fat32's user avatar
  • 28.3k
5 votes

Converting mel spectrogram to spectrogram

Nowadays the easiest thing would be to use librosa for this task. It has the mel_to_stft function which does exactly what you want. As others have mentioned, this ...
jojeck's user avatar
  • 11.1k
5 votes
Accepted

Spectrograms for neural nets

The "dimensions" of the spectrogram are not chosen based on where will the spectrogram be fed to but rather depend on your application. Therefore, it is key to understand the spectrogram itself first, ...
A_A's user avatar
  • 10.7k
4 votes

unexplainable aliases in spectrogram

Looking at the spectrogram, the prominent artifacts go up or down in frequency synchronously to the 138 MHz signal but have larger bandwidths. That is an indication that they are its harmonics, due to ...
Olli Niemitalo's user avatar
4 votes
Accepted

What is the instantaneous frequency of this signal

Concerning the comment from Juancho, we can assume that the time is normalized to e.g. 1s, meaning that $t=1$ corresponds to $1s$. Then, we dont have a problem with the units (this a very common ...
Maximilian Matthé's user avatar
4 votes
Accepted

Is it possible to recover a waveform from spectrograms of magnitude *and* phase?

Real/imaginary or modulus/phase are two representations of a complex number that carry the same level of information. Then, a STFT is a redundant mapping from a space of functions over a 1D variable (...
Laurent Duval's user avatar
4 votes
Accepted

How to calculate the PSD from the complex calculated STFT?

In general, if you have complex spectrum and need PSD in dB the mathematical equation is $$P_{xx} = 20\cdot\log_{10}|X_{x}|,$$ where $P_{xx}$ is your PSD in dB and $X_{x}$ is your complex STFT ...
Lukas Krauz's user avatar
4 votes
Accepted

Units of 6.02*N + 1.76 as an FFT noise floor

Ok I figured it out so I'm posting for others. The SNR is that ratio of the average power in a fulls-scale sine wave to the average power in the quantization noise. The average power for both is the ...
FooAnon's user avatar
  • 296
4 votes

Scipy and Matlab Spectrogram not matching

It’s a scaling problem, for which there are two options: Option 1: Use PSD scaling for both Python and Matlab Use mode='psd' in the ...
Jdip's user avatar
  • 6,394
4 votes
Accepted

Overall spectrum computation from Short-Time-Fourier-Transform

You're almost there. Your data should be scaled with dBFS reference (see the "reference" box in cool edit pro). Cool Edit Pro probably computes the average power spectrum: Modify ...
Jdip's user avatar
  • 6,394
3 votes
Accepted

Time-Frequency Analysis of Big Data - Data Size Reduction: averaging the most appropriate method?

So, first of all, CSV seems to me the least suitable format imaginable for this amount of data. It needs to be parsed, is memory hungry, and wastes precision, and isn't linearly addressable (ie. to ...
Marcus Müller's user avatar
3 votes

Understanding overlapping in STFT

From my answer Short-time Fourier transform Tradeoffs Since the frequency content of overlapping windows are displayed sequentially rather than averaged, I find talking about overlapping windows ...
Tom Huntington's user avatar
3 votes

What is the spectrogram of an impulse response used for?

I think you are thinking of waterfall plots and/or cumulative spectral decay plots. They are spectograms in the widest sense of the word since their windowing function tends to be exponential. They ...
user29961's user avatar
3 votes
Accepted

Spectrogram with square or non-square magnitude of STFT: power vs. magnitude

In the image you gave, the right-hand scale is in decibels (dB). So, essentially, the square turns into an affine scaling in the logarithm domain, which essentially yields the same image, at least the ...
Laurent Duval's user avatar
3 votes

How to calculate the PSD from the complex calculated STFT?

I normally use the Welch method to calculate and plot the PSD of a signal. ...
gklearning's user avatar
3 votes
Accepted

How to convert a spectrogram back to a signal

I am not a good Python coder, but did similar processing in Matlab in the past. The subject has been discussed in SE.DSP in several instances, for instance Librosa stft + istft - Understanding my ...
Laurent Duval's user avatar
3 votes
Accepted

Why does a strange frequency appear in this image?

If the sample rate of data fed to a DFT or FFT for spectrum analysis was around 24 KHz, then what you are seeing is just the complex conjugate negative frequency image of the low (2.5 kHz) frequency ...
hotpaw2's user avatar
  • 35.5k
3 votes

Time Frequency Analysis by Frequency Contour Detection in Spectrogram

The OP is interested in detecting the presence of frequencies in the 155 to 165 Hz frequency band within a block of data (or any other defined frequency band). The spectrogram is useful to observe ...
Dan Boschen's user avatar
  • 52.8k
3 votes
Accepted

Does downsampling increase the resolution of frequencies?

Downsampling by a factor of $N$ in time-domain means that you throw away $N-1$ samples from $x[n]$ for every $N$ samples. In frequency domain this creates $N$ shifted copies of the original spectrum ...
DSP Rookie's user avatar
  • 2,611
3 votes

Python audio analysis: which spectrogram should I use and why?

From the information you've given, I'd use spectrogram A as the frequency data is spaced logarithmically. This is advantageous for pitch detection applications as it gives you a greater amount of ...
tobassist's user avatar
  • 817
3 votes

Spectrum of FM signal?

Because frequency modulation is a nonlinear phenomenon, there's no good general-purpose answer to your question. You can take any specific baseband signal and figure out its modulated spectrum, but ...
TimWescott's user avatar
  • 12.9k
3 votes

What is really the Mel-filterbank?

As I am a newbie in DSP and I thought this article has a clear explanation, I did not try to answer your questions myself. But you said you have read it and thought these questions are still ambiguous,...
snownstone's user avatar
3 votes
Accepted

How to do high-resolution FFT on just the lower frequencies in a signal?

There is a fundamental limit to how much linear frequency resolution you are going to get for a given window size, at least using traditional linear techniques and making no assumptions about the ...
Knut Inge's user avatar
  • 3,462
3 votes
Accepted

Performing STFT after Butterworth Filter Seems Lower in Resolution

Color norm is the problem. By default, colors are mapped from im.min() to im.max(), so a single high-valued pixel will make the ...
OverLordGoldDragon's user avatar
3 votes

averaging power spectrum from multiple signal of different length

Provided that the signals are reasonable stationary (i.e. they are either have the "activity" or not and don't change state in the middle of the file), the standard Algorithm to estimate the ...
Hilmar's user avatar
  • 46.3k

Only top scored, non community-wiki answers of a minimum length are eligible