Thermal Infrared Sensors: Theory, Optimisation and Practice