I'm trying to calculate the centroid of a star image:
I'm fitting a 2D gaussian with least squares in order to get the centroid of the star with sub-pixel accuracy. And, in fact, I get a float number for the coordinates X and Y of the centroid using http://photutils.readthedocs.io/en/stable/api/photutils.centroid_2dg.html?highlight=centroid_2dg
Now I want to test this algorithm with different position of the real centroid and compare them with the calculated centroid, but I don't know how to "move" the centroid within sub-pixel accuracy. I only know hot to move it in a pixel order.
Can anyone help me?