kCSD - a Python package for reconstruction of brain activity
09-03, 16:00–17:30 (UTC), Track 3 (Oteiza)

kCSD is a Python package for localization of sources of brain electric activity based on recorded electric potentials.

Electric potential measured in the brain is generated by transmembrane ionic currents of neural cells. Due to the long range of electric field simultaneously recorded extracellular potential - EEG, local field potential (LFP) - at different places are typically strongly correlated which complicates their analysis. It is thus useful to reconstruct their current sources which in practice means solving Poisson equation. The first method for estimation of Current Source Density (CSD) from measured potentials was proposed in the early 1950s (1). Despite some developments, a number of limitations were present until recently, in particular, most previous methods required recordings with regular grids of electrodes and overfitted to noise.

The kernel Current Source Density method (kCSD) developed in 2012 (2) uses kernel methods to estimate the potential and CSD in the whole space, from arbitrary distribution of electrodes using regularization to minimize the influence of noise on reconstruction. In this tutorial we will demonstrate kCSD-python package (3) which allows reconstruction of CSD in different dimensions.

After this tutorial you will be able to:
* estimate the distribution of current sources based on the exact values of the electric field potentials,
* deal with measurement noise,
* diagnose the quality of the obtained reconstruction.


  • Python 2.7/3.4+ environment (Anaconda with Jupyter Notebook recommended),
  • numpy, scipy, matplotlib packages installed,
  • kcsd package installed or possibility to download it from GitHub (4) (network connection etc.).


  • Chaitanya Chintaluri,
  • Marta Kowalska,
  • Michał Czerwiński,
  • Władysław Średniawa,
  • Joanna Jędrzejewska-Szmek,
  • Daniel K. Wójcik


  1. Pitts, W. H. (1952), Investigations on synaptic transmission, in 'Cybernetics, Trans. 9th Conf. Josiah Macy Foundation H. von Foerster', pp. 159-166.
  2. Potworowski, J., Jakuczun, W., Łęski, S. & Wójcik, D. (2012) Kernel current source density method. Neural Comput 24(2), 541-575.
  3. Kernel Current Source Density https://github.com/Neuroinflab/kCSD-python


Project funded from the Polish National Science Centre's SYMFONIA (2013/08/W/NZ4/00691) and OPUS (2015/17/B/ST7/04123) grants.

Project Homepage / Git


Abstract as a tweet

Localize sources of brain activity using kcsd Python package.

Python Skill Level


Domain Expertise



Data Visualisation, Medicine/Health, Open Source

I am a PhD student at the Laboratory of Neuroinformatics at Nencki Institute of Experimental Biology. I work with methods for current source density reconstruction in a brain tissue.

This speaker also appears in:

Since 2011 I am a Scientific Programmer in Laboratory of Neuroinformatics (Nencki Institute).


  • MSc in Computer Science (2011; University of Wroclaw)
  • PhD in Neuroinformatics (2019; Nancki Institute)
This speaker also appears in: