Rats were deeply anesthetized with isoflurane and transcardially perfused with ice-cold phosphate-buffered saline (PBS) and paraformaldehyde (PFA). After extraction, brains were fixed in 4% PFA overnight and then transferred to 30% sucrose in PBS to be cryoprotected for 3 days66 (link). Next, 20 μm coronal sections were collected using Leica CM3050S cryostat (Leica Biosystems), washed in PBS, and coverslipped with Vectashield mounting medium. Sections from brains containing electrodes were stained with cresyl violet and imaged at 10x magnification with an Axio Zoom widefield microscope (Carl Zeiss). Sections also were made after viral transfer for opsin verification, and these sections were stained with anti-rabbit GFP (1:500, #AB290, Abcam), CaMKII-a (6G9) mouse monoclonal antibody (mAb) (1:200, #50049, Cell Signaling Technology) antibodies, and coverslipped with DAPI (1:200, Vector Laboratories). Secondary antibodies were anti-rabbit immunoglobulin G (IgG) conjugated to Alexa Fluor 488, and anti-mouse IgG conjugated to Alexa Fluor 647 (1:200, Life Technologies). Images were acquired with a Zeiss LSM 700 confocal microscope (Carl Zeiss).