After 2-4 weeks of expression, mice were anesthetized using isoflurane (3% for induction, 1.5-2% during surgery) and a circular craniotomy (2-3 mm diameter) was made above V1 (centered 2.7 mm lateral from the lambda suture). For acute experiments, the craniotomy was covered with agarose (1-1.3 %), and a round glass coverslip (Warner Instruments; 5mm diameter; #1 thickness) was cemented to the skull to reduce motion of the exposed brain. A custom titanium head post was fixed to the skull using black dental cement (Contemporary Ortho-Jet). For simultaneous imaging and cell-attached recording, the exposed brain was covered with ∼1 mm thick agarose (1.3%) without a coverslip. For chronic imaging experiments, the imaging window was constructed from two layers of microscope coverglass6 (link). A larger piece (Fisher, #1 thickness) was attached to the bone and a smaller insert (#2 thickness) was fitted snugly into the craniotomy. Imaging experiments were started ∼1-2 weeks after chronic window implantation.