Light production in fireflies is due to a type of chemical reaction called bioluminescence. This process occurs in specialized light-emitting organs, usually on a firefly's lower abdomen. The enzyme luciferase acts on the luciferin, in the presence of magnesium ions, ATP, and oxygen to produce light. Genes coding for these substances have been inserted into many different organisms (see Luciferase – Applications). Firefly luciferase is used in forensics, and the enzyme has medical uses — in particular, for detecting the presence of ATP or magnesium. It has been speculated that Baroque painter Caravaggio may have prepared his canvases with a powder of dried fireflies to create a photosensitive surface on which he projected the image to be painted.