CentreOfGravity Bug?
matthewtownson opened this issue · 2 comments
matthewtownson commented
I think there is a bug in the centre of gravity code. From a few trial runs, I think the centroids the functions outputs is off by 0.5 in both x and y. This is easily fixed by removing two lines of source code which add 0.5 to the x and y centroids in centroiders.py
. Can this be confirmed before I go ahead and create a patch?
andrewpaulreeves commented
Hmmm - wierd! Yeah, go ahead and fix
matthewtownson commented
I think it must have come from a change of reference frame. If the centroids were relative to the centre of the correlation image, then there would need to be a compensation of 0.5 pixels from the centre of mass. However, using (0,0) as the image it's not required.