Recent advances in fluorescence imaging permit studies of Ca(2+) dynamics in large numbers of cells, in anesthetized and awake behaving animals. However, unlike for electrophysiological signals, standardized algorithms for assigning optically recorded signals to individual cells have not yet emerged. Here, we describe an automated sorting procedure that combines independent component analysis and image segmentation for extracting cells' locations and their dynamics with minimal human supervision. In validation studies using simulated data, automated sorting significantly improved estimation of cellular signals compared to conventional analysis based on image regions of interest. We used automated procedures to analyze data recorded by two-photon Ca(2+) imaging in the cerebellar vermis of awake behaving mice. Our analysis yielded simultaneous Ca(2+) activity traces for up to >100 Purkinje cells and Bergmann glia from single recordings. Using this approach, we found microzones of Purkinje cells that were stable across behavioral states and in which synchronous Ca(2+) spiking rose significantly during locomotion.