Mapping something with atan
will give coordinates in the range -2 … 2, which is not good for an image.
Moreover warp
tries to automagically guess the correct dimensions of the output image and this appears to fail for polar transform. Try
warp(img0, tfm, (-1000:1000, -1000:1000))