I'm trying to generate some synthetic data from en experiment. I got the theoretical PSD in the positive frequency domain and calculate some timeseries out of. Than C do some manipulation on my data, do an FFT and make a fit in the frequency domain. I will first show you some code, than explain the main problem:
The bins at which I evaluate the theoretical PSD are my bins given by:
bins = np.linspace(1,1e3,2**13)
From that I calculate my timerseries by:
for i in range(bins.shape[0]):
signal += dataCOS[i] * np.cos(2*np.pi* t * bins[i] + random.uniform(0,2*np.pi))
where dataCOS is the value of the PSD and the corresponding bins and t is given by
t_full = np.linspace(0,1,2**13, endpoint = False)
My Problem is, I need an FFT of my timeseries that does not smear out. Okay, usually not possible, BUT, if I'm correct and add exactly one frequency bins per time bin in a way that they match in frame (highest and lowest frequency are still visible), it should work. So, my question is, how have bins and t_full to be shaped??
Here are my thoughts: Both need to have the same amount of points, and the highest and lowest frequency must be visible from the time domain. But I'm not sure, hope you can help me out.
EDIT ****************************************** First, to illustrate my problem a bit more see the pictures attached:
In the first you have the classic result of a backtransformation with too many points in the time domain, but with all the bins being periodic.
In the second its the same, but now they are not periodic anymore and one gets the expected smearing. Of course, one could improve here with a filter, but if you want to fit the inital red function, you run into major problem. Last picture is the result i wanted: All functions are periodic within the timeframe, so there is no smearing out. Second, every pair of t_bins holds exactly one frequency i added before, so the cloud at the computational limit vanishes. 
To get that, here is the needed spacing of bins and t
bins = np.linspace(0,2**14,2**14, endpoint = False)
t_full = np.linspace(0,1,2*bins.shape[0], endpoint = False)