Generation of radiation with electron beams