X-ray photoelectron studies of pure and oxidised ytterbium and lutetium