In optical imaging experiments of primary visual cortex, visual stimuli evoke a complicated dynamics. Typically, any stimulus with sufficient contrast evokes a response. Much of the response is the same regardless of which stimulus is presented. For instance, when oriented drifting gratings are presented to the visual system, over 90% of the response is the same from orientation to orientation. Small differences may be seen, however, between the responses to different orientations. A problem in the analysis of optical measurements of the response to stimulus in cortical tissue is the distinction of the 'global' or 'non-specific' response from the 'differential' or 'stimulus-specific' response. This problem arises whenever the signal of interest is the difference in response to various stimuli and is evident in many kinds of uni- and multivariate data. To this end, we present enhancements to a frequency-based method that we previously introduced called the periodic stacking method. These enhancements allow us to separately estimate the dynamics of both the average signal across all stimuli (the 'global' response) and deviations from the average amongst the various stimuli (the 'stimulus-specific' response) evoked in response to a set of stimuli. We also discuss improvements in the signal-to-noise ratio, relative to standard trial averaging methods, that result from the data-adaptive smoothing in our method.