A general centroid determination methodology, with application to multilayer dielectric structures and thermally stimulated current measurements