For analysis of dendritic spine populations (Fig. 5), the stimulus contrast was lowered to reduce action potential-related dendritic signals (average ΔF/F0 in dendritic shafts at the preferred orientations was 32%, 80%. 16%, 15%, 12% for cells 1 through 5, corresponding to stimulus contrast 10-40%, 5-20%, 10-40%, 20-40%, 20-40%). The orientation preference of dendritic shafts was identical to the soma, consistent with back-propagating action potentials (data not shown). Orientation tuning of GABAergic dendrites (Fig. 6) was mapped using the standard stimulus set at full contrast. The stimulus duration was 2 s; because of the slower decay of calcium transients41 we used a 6 s inter trial interval.