Extracting the spectrum of a flow by spatial filtering