def _spectrogram(x, fs=1.0, window=('tukey', 0.25), nperseg=256, noverlap=None, nfft=None, detrend='constant', return_onesided=True, scaling='density', axis=(-1), mode='psd'):
 if (noverlap is None):
  noverlap = (nperseg // 8)
 (freqs, time, Pxy) = _spectral_helper(x, x, fs, window, nperseg, noverlap, nfft, detrend, return_onesided, scaling, axis, mode=mode)
 return (freqs, time, Pxy)

def _spectrogram ( x , fs = 1.0 , window = ( 'tukey' , 0.25 ) , nperseg = 256 , noverlap = None , nfft = None , detrend = 'constant' , return_onesided = True , scaling = 'density' , axis = ( - 1 ) , mode = 'psd' ) : if ( noverlap is None ) : noverlap = ( nperseg // 8 ) ( freqs , time , Pxy ) = _spectral_helper ( x , x , fs , window , nperseg , noverlap , nfft , detrend , return_onesided , scaling , axis , mode = mode ) return ( freqs , time , Pxy )
compute a spectrogram with consecutive fourier transforms .