Terahertz Pulsed Spectroscopy and Imaging for Pharmaceutical Applications