Optoelectronics is the study and application of electronic devices that source, detect and control light, usually considered a sub-field of photonics. In this context, light often includes invisible forms of radiation such as gamma rays, X-rays, ultraviolet and infrared, in addition to visible light. Optoelectronic devices are electrical-to-optical or optical-to-electrical transducers, or instruments that use such devices in their operation. Electro-optics is often erroneously used as a synonym, but is in fact a wider branch of physics that deals with all interactions between light and electric fields, whether or not they form part of an electronic device. Optoelectronics is based on the quantum mechanical effects of light on electronic materials, especially semiconductors, sometimes in the presence of electric fields.