On determining excitation energies from the poles of green functions