Microwave and x-ray generating devices