0
$\begingroup$

I'm using gist.github.com/sixtenbe/1178136#file-peakdetect-py to find maximum peaks in my spectrogram.

I used

_max, _min = peakdetect.peakdetect(array, lookahead=300, delta=0.3)

I get the following peaks. x_axis = time, y_axis = frequency

enter image description here

As you can see in the image, the peaks are not evenly spread out. All the points are skewed towards frequency axis. My array is in this format: [1, 2, 3 , 0 , 1, 3, 4]. It's 2D time+frequency array flattened into 1D array.

What can I do to show the image like this where the peaks are spread out evenly.

enter image description here

$\endgroup$
1
$\begingroup$

Try flattening your 2D array along the Y or frequency axis instead of along the X or time axis before doing the peak detect.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.