X-ray spectroscopic study of 4f heavy rare earth metals