Ab initio many-body study of the electronic and optical properties of MgAl2O4 spinel