Temperature measurement from scattering spectra of clusters: theoretical treatment