# Methods

**Animals.** Animal care and use was performed in compliance with the Yale IACUC, U. S. Department of Health and Human Services and Institution guidelines. Neonatal Rx-Cre:GCaMP3 f/f (Ai38, JAX no. 014538) or SNAP-25-GCaMP6 (Ai103) mice aged 2-13 days after birth (P2-P13) were used. 

**Surgical procedure for in vivo imaging.** Mice aged P2-P13 were deeply anesthetized with isoflurane (2.5%) in oxygen and then placed on a heating pad set to 35ºC via a isothermic temperature monitor (NPI TC-20, ALA Scientific). Local anesthesia was produced by subcutaneous injection (0.05 ml) of 1% Xylocaine (10 mg/ml lidocaine/0.01 mg/ml epinephrine, AstraZeneca) under the scalp. After removal of the scalp, steel head posts were fixed to the exposed skull using cyanoacrylate glue. A 1 hr recovery period in the dark under continuously delivered medical oxygen with isoflurane at 0% was allowed after surgical preparation. This recovery period was the typical minimum time required for spontaneous waves of activity to develop in the visual system after the cessation of deep anesthesia [#Ackman:2012]. A photodiode and red LED were positioned to monitor respiratory rate and limb/body movements and the body was surrounded in a cotton nest.

**Wide field calcium imaging.** A 16 bit CMOS camera (pco.edge, PCO) coupled to a Zeiss AxioZoom V16 Microscope with 1X Macro objective was used to image transcranial calcium dynamics. Epifluorescent illumination was provided by a DC stabilized Hg2+ light source (X-Cite, EXFO) through a filter cube set (Zeiss) with the minimum illumination intensity that gave detectable calcium signals using a exposure of 200 msec. Image frames corresponding to a field of view of 6 x 8 mm or 11 x 13 mm were acquired at a rate of 5 or 10Hz. Each recording consisted of a single, continuously acquired movie during a period of 10min.

**Calcium signal detection.** Image processing and calcium signal detection was performed using custom software routines written in MATLAB (Mathworks, Natick, MA). The mean pixel intensity at each pixel location, F0 was subtracted and normalized to each frame, Ft of the movie to form a dF/F = (Ft - F0)/F0 array. A background estimate was calculated and subtracted from every frame with a top hat filter using a disk shaped structuring element with radius of 620 µm. Each frame was smoothed with a Gaussian having a standard deviation of 56 µm and a signal intensity threshold was computed using Otsu's method on the histogram of pixel intensities at the 99th percentile from the Sobel gradient transformation of the image array. Calcium signals were automatically segmented as contiguously connected components in space and time using the binary mask for the array from the computed Otsu intensity threshold. Components having an area <50 pixels or a duration of 1 frame were ignored.

**Statistical analysis.** Data sets were analyzed using custom routines written in MATLAB (The Mathworks, Natick, MA) and in R (The R Project for Statistical Computing, http://www.r-project.org). Distribution means were compared using two-sample Student's t-Tests or using ANOVA followed by Tukey's HSD post-hoc test when analyzing the effects of multiple grouping factors (p < 0.01 set as significance). Values are reported as means with the 95% confidence interval or standard error of the mean or medians with the median absolute deviation. 

**Calcium domain analysis.** The mean width in the medial-lateral and height in the rostral-caudal dimensions of the bounding box fitted to each segmented calcium domain signal was taken to be the domain diameter. The number of contiguous frames (bounding box depth) for each segmented calcium domain was taken to be the domain duration. The mean and maximum pixel intensities within each domain were taken as the mean and maximum domain amplitudes. Domains were assigned areal membership by intersection of the domain centroid with a cortical ares's pixel mask. The number of individual domains per recording within a hemisphere or cortical area was taken to be domain frequency.

**Functional correlation analysis.** A binary movie array from all the segmented calcium domain masks for a recording was intersected mask representing different cortical areas. The total number of active pixels per frame expressed as a fraction of possibly active pixels per frame for each cortical area gave active pixel fraction timecourses for each cortical area in each recording. Correlation matrices were calculated for each recording by computing pairwise Pearson's product moment correlation coefficents from the matrix containing the cortical active pixel fraction timecourses. The binarized correlation matrix at *r* > 0.1 was used to form an adjacency matrix with each node representing a cortical area and each edge representing an association between a pair of nodes at weight, *r*. Community structure was detected within each functional association matrix using a fast greedy modularity optimization algorithm [#Clauset:2004] to perform hierarchial clustering using the igraph network analysis software library [#Csardi:2013]. 

[#Ackman:2012]: Ackman, J. B., Burbridge, T. J., and Crair, M. C. (2012).  Retinal waves coordinate patterned activity throughout the developing visual system, Nature, 490(7419), 219-25

[#Clauset:2004]: Clauset, MEJ Newman, C Moore: Finding community structure in very large networks, http://arxiv.org/pdf/cond-mat/0408187v2.pdf

[#Csardi:2013]: Csardi G. igraph, The network analysis package. http://igraph.org
