Dark current code