records magnetic activity generated by the brain’s electrical activity; helps identify brain areas where seizures begin.