Spectroscopy by pulsed terahertz radiation