Crystal fields, linewidths and temperature dependence in the photoelectron spectra of heavy fermion Ce and Yb compounds