Photoelectron spectroscopy and microscopy of carbon nanotubes