Ionization energy measurements and electronic spectra for ThO.