High-resolution terahertz ptychography using divergent illumination and extrapolation algorithm