# Obtain the real part of a complex signal from imaginary part and magnitude squared

I am trying to solve a problem based on a real world measurement.

Suppose I am trying to obtain a complex signal $$S(x)$$, but only know its magnitude squared, $$|S|^2$$ and its imaginary part $$\text{Im}(S)$$, to fully reconstruct the signal, I need to determine its real part or its phase. I'm wondering if this problem has a solution?

Simple algebra requires

$$\text{Re}(S) = \sqrt{|S|^2 - [\text{Im}(S)]^2}$$

Therefore the magnitude of the real part is obtained. Is there any way to obtain the sign?

Another method is to apply the Hilbert transform on the imaginary part, which would give the real part, if the signal was analytic, however that restriction is not necessarily met.

I'm wondering if this problem has a solution?

Well, no. Because you can't tell the sign of your imaginary part.

You can try to reconstruct the full signal if you have additional information – like the signal being bandlimited, or some phase developments being more likely than others, but for signals that fill the whole observed bandwidth in general, there's no unique solution.

Another method is to apply the Hilbert transform on the imaginary part, which would give the real part, is the signal was causal, however that restriction is not necessarily met.

You might be describing Kramers-Kronig relations

Often, you can make the signal meet these conditions with reasonably little error (truncate and shift).

Can't be done without some additional assumptions. Your initial approach is correct but you run afoul the sign ambiguity. Let's assume $$z = a + jb$$. It's indeed true that

$$a^2 = |z|^2-b^2$$

However, this equation has two solutions for $$a$$ and there is no way to determine which one it is.

Hilbert Transform would work, if you know that the signal is analytic (not causal). There are probably heuristic things you could do if you assume that the bandwidth is limited or that real and imaginary part have the same power spectra, etc.

• Which heuristics could be used with the said assumptions: limited bandwidth and same power spectra for real/imaginary parts?
– QMC
Oct 27, 2022 at 4:05
• That depends a lot on the exact assumptions. I don't think there is a one size fits all Oct 27, 2022 at 18:26