Accurate reconstruction of terahertz spectral images with enhanced spatial resolution via complex mapping