Cathodoluminescence of GaAs/(Al, Ga)As and (In, Ga)N/GaN heterostructures grown by molecular beam epitaxy