Infrared detectors and applications