Terahertz sensing and measuring systems