Separation of complex spectra into individual components