Unified description on principles of fourier transform infrared spectroscopy and terahertz time-domain spectroscopy