Renormalized atoms and the calculation of core electron excitation energies in the rare earths