We have developed an inventive magnetoencephalography (MEG) system that is lightweight and portable, operates at room temperature, provides 3-D localization and tracking, is safer, and can be applied to subjects in a variety of positions and circumstances. The system can provide data for other imaging algorithms. The new portable MEG comprises a shell or helmet that has a high magnetic permeability and contains magnetic sensors; the shell or helmet fits over and around the head to sense the magnetic fields generated by electrical activity in the brain. The magnetic sensor signals are transmitted to a computer that calculates the location and time evolution track of the electrical currents of brain activity. The brain activity may be part of normal brain activity without external stimuli; a response to external stimuli such as a visual evoked magnetic fields (VEF), an auditory evoked response (AEF), or a somatosensory evoked response (SEF); or a result of an electrical discharge from pathological foci due to brain dysfunction. Several sets of magnetic sensors that are arranged in the three-axis magnetic gradiometer (3XG) configuration in order to map brain activity in several planes so that information can be collected in 3-D. New room-temperature magnetometers and gradiometers with sensitivities better than 10 fT/sqrt(Hz). Auxiliary reference sensors (R) to monitor background magnetic noise and magnetic signals from the human subject’s heart, breathing, somatoreactions, etc., and to provide adaptive feedback to reduce these extraneous signals, which blur the MEG-targeted signals Calibrated magnetic dipoles (S), which are placed around the head for stereotactic reference frame positioning of magnetic signals. Additional coils have been designed to provide signals to cancel the ambient magnetic fields (i.e., Earth’s, geomagnetic) by impressing coil currents as feedback from ambient field reference sensors (R). A set of computer algorithms for the calibration, localization and tracking, adaptive feedback noise reduction, and stereotactic functions.