Current source density (CSD) is the second spatial derivative of the local field potential (LFP). CSD analysis has been used extensively to localize the pattern of transmembrane current flow in neuronal ensembles. For brain responses to repeated external stimulation, the LFP data are epoched and averaged across an ensemble of trials, from which the CSD profile is then derived. For spontaneous brain activity, however, the lack of an external triggering event makes ensemble average difficult, hampering the investigation of such important cognitive functions as anticipatory attention and working memory. In this chapter, we describe a new method called phase realigned averaging technique (PRAT), which can overcome this difficulty and achieve CSD profiles on a frequency-by-frequency basis. The method is first validated on simulation examples and then applied to LFP recordings from a monkey performing an intermodal selective attention task.