Infrared sensing in snakes
The ability to sense infrared thermal radiation evolved independently in several different families of snakes. Essentially, it allows these animals to "see" radiant heat at wavelengths between 5 and 30 μm to a degree of accuracy such that a blind rattlesnake can target vulnerable body parts of the prey at which it strikes. It was previously thought that the organs evolved primarily as prey detectors, but recent evidence suggests that it may also be used in thermoregulation and predator detection, making it a more general-purpose sensory organ than was supposed.
Phylogeny and evolution 
The facial pit underwent parallel evolution in pitvipers and some boas and pythons. It evolved once in pitvipers and multiple times in boas and pythons. The electrophysiology of the structure is similar between the two lineages, but they differ in gross structural anatomy. Most superficially, pitvipers possess one large pit organ on either side of the head, between the eye and the nostril (loreal pits), while boas and pythons have three or more comparatively smaller pits lining the upper and sometimes the lower lip, in or between the scales (labial pits). Those of the pitvipers are the more advanced, having a suspended sensory membrane as opposed to a simple pit structure.
In vipers, the pit organ is seen only in the subfamily Crotalinae: the pitvipers. The organ is used extensively by them to detect and target warm-blooded prey such as rodents and birds, and it was previously assumed that the organ evolved specifically for that purpose. However, recent evidence shows that the pit organ may also be used for thermoregulation. In an experiment that tested snakes' abilities to locate a cool thermal refuge in an uncomfortably hot maze, all pitvipers were able to locate the refuge quickly and easily, while true vipers were unable to do so. This suggests that the pitvipers were using their pit organs to aid in thermoregulatory decisions. It is also possible that the organ may even have evolved as a defensive adaptation rather than a predatory one, or that multiple pressures may have potentially contributed to the organ's development. The use of the heat pit to direct thermoregulation in pythons and boas has not yet been determined. Viperine snakes (which lack pit organs) also use thermal cues to guide strike behavior, but not to guide thermoregulation.
In pitvipers, the heat pit consists of a deep pocket in the rostrum with a membrane stretched across it. Behind the membrane, an air-filled chamber provides air contact on either side of the membrane. The pit membrane is highly vascular and heavily innervated with numerous heat-sensitive receptors formed from terminal masses of the trigeminal nerve (terminal nerve masses, or TNMs). The receptors are therefore not discrete cells, but a part of the trigeminal nerve itself. The labial pit found in boas and pythons lacks the suspended membrane and consists more simply of a pit lined with a membrane that is similarly innervated and vascular, though the morphology of the vasculature differs between these snakes and crotalines. The purpose of the vasculature, in addition to providing oxygen to the receptor terminals, is to rapidly cool the receptors to their thermo-neutral state after being heated by thermal radiation from a stimulus. Were it not for this vasculature, the receptor would remain in a warm state after being exposed to a warm stimulus, and would present the animal with afterimages even after the stimulus was removed.
In all cases, the facial pit is innervated by the trigeminal nerve. In crotalines, information from the pit organ is relayed to the nucleus reticularus caloris in the medulla via the lateral descending trigeminal tract. From there, it is relayed to the contralateral optic tectum. In boas and pythons, information from the labial pit is sent directly to the contralateral optic tectum via the lateral descending trigeminal tract, bypassing the nucleus reticularus caloris.
It is the optic tectum of the brain which eventually processes these infrared cues. This portion of the brain receives other sensory information as well, most notably optic stimulation, but also motor, proprioceptive and auditory. Some neurons in the tectum respond to visual or infrared stimulation alone; others respond more strongly to combined visual and infrared stimulation, and still others respond only to a combination of visual and infrared. Some neurons appear to be tuned to detect movement in one direction. It has been found that the snake’s visual and infrared maps of the world are overlaid in the optic tectum. This combined information is relayed via the tectum to the forebrain.
The nerve fibers in the pit organ are constantly firing at a very low rate. Objects that are within a neutral temperature range do not change the rate of firing; the neutral range is determined by the average thermal radiation of all objects in the receptive field of the organ. The thermal radiation above a given threshold causes an increase in the temperature of the nerve fiber, resulting in stimulation of the nerve and subsequent firing, with increased temperature resulting in increased firing rate. The sensitivity of the nerve fibers is estimated to be >0.001 °C.
The pit organ will adapt to a repeated stimulus; if an adapted stimulus is removed, there will be a fluctuation in the opposite direction. For example, if a warm object is placed in front of the snake, the organ will increase in firing rate at first, but after a while will adapt to the warm object and the firing rate of the nerves in the pit organ will return to normal. If that warm object is then removed, the pit organ will now register the space that it used to occupy as being colder, and as such the firing rate will be depressed until it adapts to the removal of the object. The latency period of adaptation is approximately 50-150 ms.
The facial pit actually visualizes thermal radiation using the same optical principles as a pinhole camera, wherein the location of a source of thermal radiation is determined by the location of the radiation on the membrane of the heat pit. However, studies that have visualized the thermal images seen by the facial pit using computer analysis have suggested that the resolution is actually extremely poor. The size of the opening of the pit results in poor resolution of small, warm objects, and coupled with the pit's small size and subsequent poor heat conduction, the image produced is of extremely low resolution and contrast. It is known that some focusing and sharpening of the image occurs in the lateral descending trigeminal tract, and it is possible that the visual and infrared integration that occurs in the tectum may also be used to help sharpen in the image. In addition, snakes may deliberately choose ambush sites with low thermal background radiation (colder areas) to maximize the contrast of their warm prey in order to achieve such a high degree of accuracy from their thermal “vision”.
Molecular mechanism 
In spite of its detection of IR light, the IR detection mechanism is not similar to photoreceptors - while photoreceptors detect light via photochemical reactions, the protein in the pits of snakes is a "heat-sensitive ion channel" (actually a temperature sensitive ion channel). It senses infrared signals through a mechanism involving warming of the pit organ, rather than chemical reaction to light. This is consistent with the thin pit membrane, which would allow incoming IR radiation to quickly and precisely warm a given ion channel and trigger a nerve impulse, as well as the vascularization of the pit membrane in order to rapidly cool the ion channel back to its original temperature state. While the molecular precursors of this mechanism are found in other snakes, the protein is both expressed to a much lower degree and is much less sensitive to heat.
See also 
- Kardong KV, Mackessy SP. 1991. The strike behavior of a congenitally blind rattlesnake. Journal of Herpetology 25: 208–211.
- Krochmal, Aaron R.; George S. Bakken1, and Travis J. LaDuc (15). "Heat in evolution's kitchen: evolutionary perspectives on the functions and origin of the facial pit of pitvipers (Viperidae: Crotalinae)". J Exp Biol 207 (Pt 24): 4231–4238. doi:10.1242/jeb.01278. PMID 15531644.
- Greene HW. 1992. The ecological and behavioral context for pitviper evolution. In Campbell JA, Brodie ED Jr. 1992. Biology of the Pitvipers. Texas: Selva. 467 pp. 17 plates. ISBN 0-9630537-0-1.
- Pough et al. 1992. Herpetology: Third Edition. Pearson Prentice Hall:Pearson Education, Inc., 2002.
- Breidenbach CV. 1990. Thermal cues influence strikes in pitless vipers. Journal of herpetology 24:448-450
- Goris CR et al. 2003. The microvasculature of python pit organs: morphology and blood flow kinetics. Microvascular Research 65: 179-185.
- Newman EA, Gruberd ER, Hartline PH. 1980. The infrared trigemino-tectal pathway in the rattlesnake and in the python. The Journal of Comparative Neurology 191: 465-477.
- Hartline, PH; L Kass, MS Loop (1978-03-17). "Merging of modalities in the optic tectum: infrared and visual integration in rattlesnakes". Science 199 (4334): 1225–1229. doi:10.1126/science.628839. PMID 628839.
- Bullock TH, Cowles RB. 1952. Physiology of an infrared receptor: the facial pit of pit vipers. Science 115: 541-543.
- Bakken, George S.; Krochmal, Aaron R. (2007), "The imaging properties and sensitivity of the facial pits of pitvipers as determined by optical and heat-transfer analysis", Jeb 210 (16): 2801–2810, doi:10.1242/jeb.006965, retrieved 2011-07-05
- Gracheva, Elena O.; Nicholas T. Ingolia, Yvonne M. Kelly, Julio F. Cordero-Morales, Gunther Hollopeter, Alexander T. Chesler, Elda E. Sánchez, John C. Perez, Jonathan S. Weissman & David Julius (15). "Molecular basis of infrared detection by snakes". Nature 464 (7291): 1006–1011. doi:10.1038/nature08943. PMC 2855400. PMID 20228791.