As I have already explained here (https://stackoverflow.com/questions/49358449/python-how-to-get-coordinates-of-complex-rtl-sdr-signal-peaks?noredirect=1#comment85722604_49358449), I need to find the coordinates of the peaks in my signal. While my original question is related more to the programming part, this one is about understanding what my signal has to look like for the peak finding to work at all.
It is my understanding that I'm getting a bunch of complex data from my RTL-SDR. For visualisation purposes I plot this data as a PSD, showing the frequencies on the x-axis and the power level in dB on the y-axis. Now, I would like to use the Python peakutils.peak.indexes() method to get the y-coordinates of all peaks above a certain power level, e.g., -20.
This power level is specified as threshold in the method, which apparently means that the input data, i.e., the signal, somehow needs to represent all the power levels of the signal (so the method can search for those standing out)?! Is this assumption correct?
And if so, how do I get a representation of the signal that I could use to detect peaks by power level? Right now, the method seems to scan through frequencies (represented by my complex signal?!), looking for a power level (!) of -20, which probably is why it returns lots of useless results.
I already tried converting the complex signal array to a real array, which didn't work. I also tried converting the signal via fft and fftfreq, which didn't get me any further either.
As I said at the beginning: I can figure out the programming stuff myself. But I need someone to explain to me first, what I have to do, please. How do I need to convert the complex signal?