Light sources and detectors