This inlines the centroiding code into the HRIXS class, and also improves the readability.
merged
mentioned in commit 8dc714e1