Optogenetic techniques have been developed to allow control over the activity of selected cells within a highly heterogeneous tissue, using a combination of genetic engineering and light. Optogenetics employs natural and engineered photoreceptors, mostly of microbial origin, to be genetically introduced into the cells of interest. As a result, cells that are naturally light-insensitive can be made photosensitive and addressable by illumination and precisely controllable in time and space. The selectivity of expression and subcellular targeting in the host is enabled by applying control elements such as promoters, enhancers, and specific targeting sequences to the employed photoreceptorencoding DNA. This powerful approach allows precise characterization and manipulation of cellular