I have an (1727,1853) size array (image), in which I have identified stars to model a point-spread function. Each index of the array corresponds to an image coordinate, however, the centroid of each star is given by a sub-pixel coordinate. I must do the following
Make a 2D slice of each star. I have done this using numpy's array slicing. However, it slices by index, and I have sub-pixel centroid coordinates, thus any kind of slice I make will place the star off-center.
After I make a 2D slice of each star, I must stack these arrays on top of each other to make a model of the point-spread function. This is simple as long as the sub-pixel centers of each star are aligned.
My question is what is the most efficient (and correct) way of aligning these sub-pixel coordinates and stacking each 2D slice together?
I hope this was clear. Any help would be much appreciated. Below is a 2D slice of one of the stars (not a very good one), however it is off center because numpy slices by index and the stars have sub-pixel coordinates for their centroids.