Spectrum emitted by a trapped electron