Subtracting angles of complex valued matrix
Bah.. stupid question. Sorry for anyone that read it. If you do module 2pi, then everything is the same
Let's say I have two complex images Z_1 and Z_2. I want to make a relative-phase map of the second image with respect to the first. This means:
Z_2_relative = Z_2 * np.exp(-1j * np.angle(Z_1))
This creates a new complex valued matrix where the complex-phase should now be given by
np.angle(Z_2_relative) == np.angle(Z_2) - np.angle(Z_1)
But according to python these two are not equal. I bet it has something to do with the np.angle function.. but I cant pinpoint it, or know how to fix it...
PS: Sorry, cant make a reproducible piece of code atm. Can do it later today