Photon emission in STM configurations