Extracting Inelastic Scattering Cross Sections for Finite and Aperiodic Materials from Electronic Dynamics Simulations.