Versatile pulsed rf heterodyne spectrometer