Analysis of spontaneous and laser emission from XeF