In general the center of mass technique is a fast and robust way to approximate the location of a focal spot. This paper discusses in detail the relationship between the focal spot location and the center of mass. We start with a mathematical analysis and conclude with a few practical ideas to improve the accuracy of the center of mass technique.
Daniel M. Topa, Daniel M. Topa,
"Optimized methods for focal spot location using center-of-mass algorithms", Proc. SPIE 4769, Optical Design and Analysis Software II, (4 September 2002); doi: 10.1117/12.481180; https://doi.org/10.1117/12.481180