Core level photoelectron spectroscopy for surface crystallography