def plotPowerSpectrum(FFT, binFrequencies, maxFreq):

    T = int(maxFreq)
    pylab.figure('Power spectrum')
    pylab.plot(binFrequencies[:T], scipy.absolute(FFT[:T]) * scipy.absolute(FFT[:T]),)
    pylab.xlabel('Frequency (Hz)')
    pylab.ylabel('Power spectrum (|X[k]|^2)')
    pylab.show()
Calculates and plots the power spectrum of a given sound wave.
dataset/ETHPy150Open Agerrr/Automated_Music_Transcription/first_peaks_method.py/plotPowerSpectrum