Near field imaging of terahertz focusing onto rectangular apertures