Gradient (MR) artifact removal
Recording EEG inside an MRI scanner adds the largest artifact in all of electrophysiology: switching magnetic-field gradients induce voltages thousands of times larger than the EEG. Because the artifact is precisely time-locked to the scanner's slice-acquisition clock, it is removed by average artifact subtraction — synchronize to the scanner trigger, build an average artifact template over many repetitions, and subtract it from each occurrence, followed by adaptive noise cancellation and low-pass filtering of residuals.
Success depends on tight EEG-to-scanner clock synchronization (sub-sample timing jitter re-introduces large residuals), a high sampling rate to represent the fast gradient transients without aliasing, and stable head position. After gradient removal the ballistocardiogram becomes the dominant remaining artifact. The whole problem is a stark illustration of coherent averaging used in reverse — to estimate and remove a nuisance signal rather than to recover an evoked one.