Theory of valence-band XPS spectra of random alloys: application to AgxPd1-x | Synapse