Fig 1.
Overview of experimental contexts where kCSD-python is applicable.
1D setups such as A) laminar probes and equivalent (R, h—radii of the basis source along the electrode and perpendicular to the shaft); 2D setups, such as B) multi-shaft silicon probes, Neuropixel or SiNAPS probes, or D) planar MEA (R—radius of the basis source in the plane of the MEA, 2h—assumed thickness of the tissue contributing to the measurement, d—slice thickness); 3D electrode setups, such as multiple multi-shaft silicon probes, Utah arrays, multiple electrodes placed independently in space with controlled positions (R—radius of the basis source), where the sources are assumed to come C) from tissue (kCSD) or E) from single cells with known morphology (skCSD).
Fig 2.
An example of the L-curve method for estimating kCSD parameters.
A) The red points represent the potential used for CSD reconstruction. The black points show the electrode positions. The ground truth is shown in panel C with the red dashed curve. The measurement was simulated by adding small random noise to all the electrodes (32 values taken from a uniform distribution). The blue line shows a kernel interpolation of the potential which is the first step of kCSD method. B) L-curve plot for a single R parameter. The apex of the L-curve is numerically computed from the oriented area of directed triangles connecting the point on the L-curve with its two ends. C) Comparison of the true CSD and kCSD reconstruction for parameters obtained with L-curve regularization. D) Estimation of L-curve curvature with triangle method (see the Methods).
Fig 3.
A) L-curve curvature and B) CV-error for the problem studied in Fig 2.
Observe that in both cases there are ranges of promising candidate parameter pairs, R, λ, which can give good reconstruction given the measured data. Red dots shows local extrema for each value of R fixed. See text for discussion of this effect.
Fig 4.
A) Error propagation maps for 3 × 3 regular grid of electrodes. Every panel represents the contribution of the potential measured at the corresponding electrode marked with a black circle (°) to the reconstructed CSD. Every other electrode is marked with a black cross (×). B) Map of CSD measurement uncertainty for 3 × 3 regular grid of electrodes. The CSD measurement uncertainty is represented by variance of the CSD reconstruction caused by the uncertainty in measurement of the potentials. It is assumed that measurement errors for electrodes are mutually independent and follow standard normal distribution (). Location of electrodes is marked with red crosses (×).
Fig 5.
Reliability map created according to formula (25) and (26) for 10x10 regular grid of electrodes with noise-free symmetrized data.
Black dots represent locations of contacts used in the study. Values on the map can be interpreted as follows: the closer to 0, the higher reconstruction accuracy might be achieved for a given measurement condition.
Fig 6.
Example use of reliability maps.
A) Example dipolar source (ground truth) which is used to compute the potential on a grid of electrodes shown in B). C) shows reconstructed sources superimposed on the reliability map. D) shows the difference between the ground truth and the reconstruction.
Fig 7.
Average error (Eq 25) of kCSD method across random small and large (A), only small (E) and only large (I) sources for regular 10x10 electrodes grid and the same grid with broken 5 (B, F, J), 10 (C, G, K) and 20 (D, H, L) contacts. Plots (B, C, D, F, G, H, J, K, L) show difference between average error for regular grid and grid with broken contacts. Estimation was made in noise free scenario, R parameter selected in cross-validation. Black dots represent locations of contacts used in the study.