def symbolrateAutocorr(sig, Fs, **kwargs):
    Rxx = np.abs(signal.correlate(sig, sig, mode='full', method='fft'))
    f0 = estimate.f0MleTime(Rxx=Rxx, f=Fs, peaks=5)
    return f0
#indow_t = signal.chebwin(np.intc(2048), 60)
window_t = signal.hamming(np.intc(2048))
#window_t = signal.gaussian(np.intc(2048), 360)
#window_t = signal.gaussian(np.intc(2048), 400)
NLFM.getCoefficients( window_t, targetBw=targetBw, centerFreq=centerFreq, T=T)
NLFMsig = NLFM.genFromPoly()

bitStream = np.random.randint(0, 2, 32)
modSig = NLFM.modulate(bitStream)
#modSig = util.wgnSnr( modSig, -40 )


# Plot autocorrelation of signal for report
Rxx = np.abs(signal.correlate(modSig, modSig, mode='full', method='fft'))
Rxx = Rxx[np.intc(len(Rxx)/2):]
f0 = estimate.f0MleTime(Rxx=Rxx, f=Fs, peaks=5)

dt = (1/Fs)
t = np.linspace(0, len(Rxx)*dt,len(Rxx))
fig, ax = plt.subplots()
ax.set_xmargin(0.01)
ax.plot(t, Rxx)
ax.set_xlabel('Time [s]')
ax.set_ylabel('Correlation')
ax.ticklabel_format(useMathText=True, scilimits=(0,3))
plt.tight_layout()

if debug == False:
    fileName = 'Rxx_32_bit_sig'
    plt.savefig(imagePath + fileName + '.png', bbox_inches='tight')
    plt.savefig(imagePath + fileName + '.pgf', bbox_inches='tight')