# Do DCT results contain phase spectrum?

I've been working much with numpy.fft lately where just like the documentation says:

When the input a is a time-domain signal and A = fft(a), np.abs(A) is its amplitude spectrum and np.abs(A)**2 is its power spectrum. The phase spectrum is obtained by np.angle(A).

Then I took a look at DCT, but I could not figure out how to derive the phase from the results, because only real values are contained, so the np.angle() will be $0$. From the FFT results I can take out interesting elements, calculate amplitude, phase and plot them as cosines:

[A*np.cos(2*np.pi*f*t + ph) for t in range(N)]


where A is the amplitude, f is the frequency, ph is the phase-shift and t is the variable, i.e. time. So my question is: can the same be derived from DCT results and how?

• Delta = p1 ~p2 - (p<--i -1) In same place – hassani May 7 '17 at 18:32
• @hassani What exactly are trying to suggest here? Please explain what you wrote. – mac13k May 8 '17 at 20:47
• @hassani Sounds cryptic – Laurent Duval May 8 '17 at 21:23

Not really, as the transform is real. However, one could interpret the sign as a poor man's phase, being "quantized" or restricted to values $0$ or $\pi$. In other words, $1 = 1.e^{0.\imath}$ and $-1 = 1.e^{\pi.\imath}$.