def welch(x, fs=1.0, window='hann', nperseg=None, noverlap=None, nfft=None, detrend='constant', return_onesided=True, scaling='density', axis=(-1)):
 (freqs, Pxx) = csd(x, x, fs, window, nperseg, noverlap, nfft, detrend, return_onesided, scaling, axis)
 return (freqs, Pxx.real)

def welch ( x , fs = 1.0 , window = 'hann' , nperseg = None , noverlap = None , nfft = None , detrend = 'constant' , return_onesided = True , scaling = 'density' , axis = ( - 1 ) ) : ( freqs , Pxx ) = csd ( x , x , fs , window , nperseg , noverlap , nfft , detrend , return_onesided , scaling , axis ) return ( freqs , Pxx . real )
estimate power spectral density using welchs method .