Study of terahertz pulses at an edge