  Widefield calcium imaging has recently emerged as a powerful experimental
technique to record coordinated large-scale brain activity. These measurements
present a unique opportunity to characterize spatiotemporal coherent structures
that underlie neural activity across many regions of the brain. In this work,
we leverage analytic techniques from fluid dynamics to develop a visualization
framework that highlights features of flow across the cortex, mapping wave
fronts that may be correlated with behavioral events. First, we transform the
time series of widefield calcium images into time-varying vector fields using
optic flow. Next, we extract concise diagrams summarizing the dynamics, which
we refer to as FLOW (flow lines in optical widefield imaging) portraits. These
FLOW portraits provide an intuitive map of dynamic calcium activity, including
regions of initiation and termination, as well as the direction and extent of
activity spread. To extract these structures, we use the finite-time Lyapunov
exponent (FTLE) technique developed to analyze time-varying manifolds in
unsteady fluids. Importantly, our approach captures coherent structures that
are poorly represented by traditional modal decomposition techniques. We
demonstrate the application of FLOW portraits on three simple synthetic
datasets and two widefield calcium imaging datasets, including cortical waves
in the developing mouse and spontaneous cortical activity in an adult mouse.
