Electroencephalography is a painless diagnostic test in which small metal disks called electrodes are attached to the scalp to record the brain’s electrical activity. It is often used for evaluating epileptic patients and those with other brain disorders stemming from head trauma, a tumor, encephalitis, stroke or seizures. The test takes anywhere from 30 to 60 minutes to perform, with the patient either lying down or in a sitting position. You must remain still with your eyes closed during the procedure in order to avoid altering the results. Alternatively, some patients are asked to wear an ambulatory EEG device that can record their brain’s electrical activity over a period of several days at a time.