Imaging of brain activity during TMS or electrical stimulation is central to understanding and optimizing research and clinical stimulation paradigms. We successfully set up state-of-the-art systems at Columbia University that allow functional magnetic resonance imaging (fMRI) and electroencephalography (EEG) to be carried out simultaneously with TMS, and are currently implementing such systems at Duke. We are interested in the effect of baseline brain activity, sensed by fMRI and EEG, on the outcome of TMS. We are also interested in synchronizing TMS application to various aspects of endogenous brain activity sensed by EEG. Coupling TMS to cerebral dynamics in real time could offer further enhancement and control of the modulation of brain activity for research and therapeutic purposes.