Intensity and phase retrieval of IR laser pulse by THz-based measurement and THz waveform modulation