def psd(x, NFFT=256, Fs=2, detrend=detrend_none, window=window_hanning, noverlap=0, pad_to=None, sides='default', scale_by_freq=None):
 (Pxx, freqs) = csd(x, x, NFFT, Fs, detrend, window, noverlap, pad_to, sides, scale_by_freq)
 return (Pxx.real, freqs)

def psd ( x , NFFT = 256 , Fs = 2 , detrend = detrend_none , window = window_hanning , noverlap = 0 , pad_to = None , sides = 'default' , scale_by_freq = None ) : ( Pxx , freqs ) = csd ( x , x , NFFT , Fs , detrend , window , noverlap , pad_to , sides , scale_by_freq ) return ( Pxx . real , freqs )
the power spectral density by welchs average periodogram method .