A system for deep brain stimulation, the system comprising: a probe with an array of sensing electrodes for acquiring signals representing neuronal activity at corresponding positions in a brain and an array of stimulation electrodes for applying stimulation amplitudes to corresponding brain regions, wherein the electrodes are regularly arranged on a portion on the probe surface, a processor, operably coupled to the sensing electrodes and the stimulation electrodes, for: receiving the acquired signals from the sensing electrodes, processing the acquired signals to find at least one brain region with atypical neuronal activity, wherein the processing comprises computing a second spatial derivative of the acquired signals, wherein the second spatial derivative of the acquired signal provides an indication of the activity sources and thus provides information for determining a suitable spatial distribution of the stimulation amplitudes to apply, based on the processed signals determining a spatial distribution of stimulation amplitudes over the array of stimulation electrodes, and applying the spatial distribution of stimulation amplitudes to the array of stimulation electrodes in order to stimulate the at least one region with atypical neuronal activity. a probe with an array of sensing electrodes for acquiring signals representing neuronal activity at corresponding positions in a brain and an array of stimulation electrodes for applying stimulation amplitudes to corresponding brain regions, wherein the electrodes are regularly arranged on a portion on the probe surface, a processor, operably coupled to the sensing electrodes and the stimulation electrodes, for: receiving the acquired signals from the sensing electrodes, processing the acquired signals to find at least one brain region with atypical neuronal activity, wherein the processing comprises computing a second spatial derivative of the acquired signals, wherein the second spatial derivative of the acquired signal provides an indication of the activity sources and thus provides information for determining a suitable spatial distribution of the stimulation amplitudes to apply, based on the processed signals determining a spatial distribution of stimulation amplitudes over the array of stimulation electrodes, and applying the spatial distribution of stimulation amplitudes to the array of stimulation electrodes in order to stimulate the at least one region with atypical neuronal activity. receiving the acquired signals from the sensing electrodes, processing the acquired signals to find at least one brain region with atypical neuronal activity, wherein the processing comprises computing a second spatial derivative of the acquired signals, wherein the second spatial derivative of the acquired signal provides an indication of the activity sources and thus provides information for determining a suitable spatial distribution of the stimulation amplitudes to apply, based on the processed signals determining a spatial distribution of stimulation amplitudes over the array of stimulation electrodes, and applying the spatial distribution of stimulation amplitudes to the array of stimulation electrodes in order to stimulate the at least one region with atypical neuronal activity.