Modulated electron-beam-induced current and cathodoluminescence