Bug fix: singularities and weird behavior of gravmag.prism around the prism

The problem was in the `atan2` and `log` functions:
* sometimes returns positive values for negative angles and vice-versa
* sometimes returns 2*pi for zero angle

The fix was to wrap atan2 and fix the result to fall where I want it to.