I'm writing a code in Python about phase unwrapping with noise regard a paper published. I have a raw data phase for interferometry [-pi,pi] and I want to unwrap this, but I look data and it has noise in some points.
My trouble with this FFT is I'm very confuse with the difference between (x,y) coordinates from original image and (p,q) coordinates from Fourier Transform (Look the image that I include). When I make a Fourier transform to a image, the pixel coordinates change?
Besides, for the position (0,0) in Fourier coordinates, I will have a 0 as result. How I can handle the zero division?
This is the algorithm:

PS: The paper that I get the algorithm is this: https://sci-hub.se/https://doi.org/10.1364/OL.28.001194