Before you start, you need to work out a few things.
Firstly, do your "analytical laws" define the phase of each spectral line or just the amplitude?
Secondly, How does your DFT/IDFT program scale the spectral lines?
Thirdly, In what order does your DFT/IDFT require the spectral lines (particularly the negative frequencies, the DC value and the value at the Nyquist frequency)?
In what way is your answer absurd? If it is because the time signal values are very large then it is probably due to the second point. If your time values are complex then it is probably due to the third point.
Step 1: Calculate the amplitude, A, of each required spectral line based on your "analytical laws". You want 1000 frequency lines between 0 and 100 Hz, but your spectrum is only defined at 0.25 Hz intervals. That would only give you 401 spectral lines so you will have to interpolate to get spectral amplitudes at frequencies in between. The frequency interval, df, will be 100/1000 Hz. Let's call that "Case A". The alternative "Case B" is to zero-pad the spectrum. This will maintain your df at 0.25 Hz. Find your spectral amplitudes between 0 and 100 Hz in 0.25Hz intervals, this gives you 401 of the 1000 spectral lines you need. Define the remaining 599 spectral lines to be zero.
[Step 1a - If your "analytical laws" do not define the phase of each spectral line: If you wand a pseudo-random time signal then you need to define a random phase, theta, between +pi and -pi radians for each spectral line. The real and imaginary parts of the spectrum will then be A*cos(theta) and B*sin(theta) respectively]
Step 2: Arrange your spectral lines in the order required by your IDFT program. For example, Matlab would require your spectral lines to be arranged in the form
[0 df 2df 3df ... 998df 999df 1000df -999df -998df ... -3df -2df -df]
where the value at frequency -y*df is the conjugate of the value at y*df. The order of the spectral lines depends on the software you are using (remember df = 0.1 Hz for case A and df = 0.25 Hz for case B).
Step 3: Scale the spectral lines. You now have 2000 complex numbers in your list. Matlab would require you to scale the numbers by dividing each one by 2000/2=1000. Other software may require you to divide by 2000 or not do any scaling at all.
Step 4: Perform the inverse DFT.
Step 5: Check you have done everything right by making sure that your time data values are all real. You may find some very small (~1E-15 for double precision) imaginary part due to numerical noise which you can remove.
Step 6: You now have your 2000 point time signal which, for case A, has a sample freqency of 200 Hz and a sampling interval of 0.005 s giving you 10 s of data or, for case B, a sample frequency of 500 Hz and a sampling interval of 0.002 s giving you 4 s of time data.
M
--
Dr Michael F Platten