Experiments were performed in accordance to the regulations of the IACUC at UCSD. Mice (except for Fig. 3a,b) were heterozygous for SOM-IRES-CRE (Jackson lab stock #013044) or PV-CRE (#008069) and the reporter allele Rosa-LSL-tdTOMATO (Allen Institute line Ai9, Jackson Labs #007905). For Fig. 3a,b mice were positive for Scnn1a-tg3-CRE (Jackson labs #009613) and crossed with to the Gin (#003718) or B13 line. For in vivo experiments mice were implanted with a custom head plate and habituated to head-fixation while running on a free spinning circular treadmill. For targeted recording in vivo tdTomato-expressing neurons were visualized by two photon microscopy and contacted by a glass electrode containing Alexfluor 488. Extracellular unit recording was performed via 16 channel silicon probes (Neuronexus). Single units were isolated using custom spike sorting software (Kleinfeld lab). We conditionally expressed ChR2 by in utero electroporation (for layer 2/3) or via a CRE-depednent AAV in Scnn1a-tg3-CRE (for layer 4). Arch or eNpHR were expressed via CRE-dependent AAVs in SOM- and PV-IRES-CRE mice. Visual stimuli were generated by custom software (Psych Toolbox) and presented on a gamma-corrected LCD monitor 15 cm from the mouse. Photostimulation in vivo was performed via fiber-coupled LEDs (Doric lenses). Photostimulation in vitro was via a combination of fiber-coupled LEDs, or LEDs mounted and coupled to an epifluorescence microscope (Olympus BX51). eNpHR was activated by a shuttered arc-lamp. Slice preparation and intracellular recording followed previous protocols. Data acquisition, visual stimulation, and statistical analysis was performed in the Igor Pro and Matlab environments.