The formula f=arctan(ImZ/ReZ) and to implement this, there are two options:
Option 1 (atan):
ImZ=-4.593172163003
ImR=-4.297336384845
>>> z=y/x
>>> f1=math.atan(z)
>>> f1
0.8186613519278327
Option 2 (atan2)
>>> f=math.atan2(y,x)
>>> f
-2.3229313016619604
Why the results different?