EN
INTRODUCTION: Extracellular recordings reflect transmembrane currents of neural and glial cells and thus have long been the foundation of measurements of neural activity. Recorded potential reflects activity of the underlying neural network and is directly related to the distribution of current sources along the active cells (current source density, CSD). The long‑range of the electric field leads to significant correlations between recordings at distant sites, which complicates the analysis. However, data interpretation can be facilitated by reconstruction of current sources. AIM(S): Facilitate reconstruction of sources of brain activity with open software. METHOD(S): The Kernel Current Source Density method (KCSD) is a general non-parametric framework for CSD estimation based on kernel techniques, which are widely used in machine‑learning. KCSD allows for current source estimation from potentials recorded by arbitrarily distributed electrodes. Overfitting is prevented by constraining complexity of the inferred CSD model. RESULTS: Here, we revisit KCSD to present a new, open-source implementation in the form of a package, which includes new functionality and several additional tools for kCSD analysis and for validation of the results of analysis accompanied by extensive tutorials implemented in Jupyter notebook. Specifically, we have added 1) analysis of spectral properties of the method; 2) error map generation for assessment of reconstruction accuracy; and 3) L‑curve, a method for estimation of optimum reconstruction parameters. The new implementation allows for CSD reconstruction from potentials measured by 1D, 2D, and 3D experimental setups for a) sources distributed in the entire tissue, b) in a slice, or c) in a single cell with known morphology, provided that the potential is generated by that cell. CONCLUSIONS: New Python implementation of kCSD facilitates CSD analysis and allows for estimation of errors. The toolbox and tutorials are available at https:// github.com/Neuroinflab/kCSD‑python.