High Level Process, Calculating Cepstrum When You Only Have Spectrum I am not a DSP expert, so I would like someone to check my thought process:

I have a text file representing the spectrum (calculated by some FFT hardware), and I'd like to calculate a cepstrum.  I'm using Octave in the examples below, but it's not required.


My source data is two columns: frequency, amplitude, i.e.:



+----------+----------+
| 0.00E+00 | 6.93E+01 |
| 1.00E+01 | 6.95E+01 |
| 2.00E+01 | 7.38E+01 |
| ...      | ...      |
| 2.00E+03 | 6.51E+01 |
+----------+----------




Load the data in to Octave, and use ifft to put the spectrum into
the time domain.  Then use rceps to calculate the cepstrum:

rceps(ifft(my_data(:,2))); % my_data is the 2000x2 matrix from above 
Plot the result of rceps.  The resulting curve should equal cepstrum that would have been produced if I had started with a time domain signal.




Is this a correct way to find the cepstrum when only spectrum (FFT) is available, or, is there a flaw in my thought process?
The cepstrum is defined as:

$C = | \mathcal{F} \log( P(f) ) |^2$

$\mathcal{F}$ is a Fourier transform and $P(f)$ is the power spectrum.  If you've got the power spectrum for the signal there is no need to go back to the time domain.  Just take the logarithm, compute an FFT, take the magnitude squared of the result.

Also, the data you list is strictly positive and real so I'm assuming it's the spectrum.  At the end of your question you put spectrum (FFT).  If what you had was an FFT of a real-valued time domain signal, and not a spectrum, I would expect it to have an imaginary part.