n = np.arange(0,Nsamps) Fs = 245.76e6 ft = 30.72e6/16 cplxt = 1.0* np.exp(-2*1j*np.pi*ft/Fs*n) Nbits = 16 #Quantize to NBits mx = np.max(np.abs(cplxt)) cscaled = np.round(cplxt/mx * 2**(Nbits-1)-1) return cscaled