Revealing the Distribution of Transmembrane Currents along the Dendritic Tree of a Neuron with Known Morphology from Extracellular Recordings

Revealing the membrane current source distribution of neurons is a key step on the way to understanding neural computations, however, the experimental and theoretical tools to achieve sufficient spatiotemporal resolution for the estimation remain to be established. Here we address this problem using extracellularly recorded potentials with arbitrarily distributed electrodes in a neuron of known morphology. We use simulations of models with varying complexity to validate the proposed method and to give recommendations for experimental applications. The method is applied to in vitro data from rat hippocampus.


Introduction
1 Several approaches to study neurons are used in electrophysiology. Today, to monitor 2 membrane potential, we most commonly use patch-clamp techniques [1]. Despite their 3 unquestionable utility it is very challenging to monitor activity of a cell in more than one 4 or two points. Extracellular recordings, on the other hand, deliver a more global picture 5 of neural activity [2, 3]. With modern multielectrodes and microelectrode arrays one has 6 thousands of channels at one's disposal to monitor the brain [4-6]. However, we can no 7 longer follow membrane potential directly but rather see spiking activity of individual cells 8 (single-unit activity, SUA), multiple cells (multiunit activity or MUA, which is the mean 9 firing rate of cell populations), or the mainly postsynaptic activity visible through low 10 frequencies (so-called local field potential, LFP); see [2, 3] for discussion. 11 So far, the main advantages of growing throughput have been a better resolution in spike 12 detection [7], as more cells can be identified in a single recording, improved stimulation 13 precision [8, 9], of particular importance for retinal neuroprosthetics, and new features 14 observed in slow fields' profiles [10]. Recently, high density probes have been used in axon 15 tracking [11,12] and in studies of multisynaptic integration [13].
In the present work we ask a question, which we believe has not been posed before, 17 although the necessary data are accessible experimentally today [13], and we propose a 18 method to address it. Consider an acute slice where we patch a cell with a glass pipette 19 and we drive it with intracellular current of specified time course. For simplicity, let us 20 assume oscillatory drive, which can be subthreshold or superthreshold. Simultaneously 21 extracellular potential is monitored with a multielectrode which will reflect the activity of 22 the whole network, however, the contributions from the patched cell will be tied to the 23 drive (we neglect for now possible synchronous activity of postsynaptic and other cells). 24 Once the recordings are done, we inject a dye into the cell and reconstruct its morphology. 25 Thus we have a set of synchronous multichannel extracellular recordings reflecting activity 26 of a single cell whose morphology is also known, as well as its relative position to the 27 electrode contacts. Can we use it to infer information on cell dynamics on the level of the 28 membrane? 29 The traditional use of such multielectrode recordings has been to identify more and 30 discriminate better spiking neurons [4][5][6]14] or reconstruct the density of current sources 31 (CSD) behind the recorded LFP [15][16][17], although more specific methods were also 32 devised [18][19][20]. There were several attempts to localize cells using multielectrode recordings 33 in different ways, taking into account the properties of electric field propagation in 34 the tissue [14], that form the basis of CSD methods [21,22], or other triangulation 35 approaches [23,24]. We are not aware of any prior attempts, however, to reconstruct 36 current source density of individual cells using their available morphologies (although 37 see [25]), which we propose here. 38 The single cell kernel Current Source Density method (skCSD) we introduce here is an 39 application of the framework of the kernel Current Source Density method [26] to the data 40 coming from a single cell. This is done by considering current sources located only along 41 the cell morphology. This can be done efficiently for arbitrarily complex morphologies 42 and arbitrary electrode configurations. In the Methods section we introduce the skCSD 43 and explain its relations to other methods of multielectrode recordings analysis. Then, 44 we validate this method on several ground truth datasets obtained in simulations and 45 apply it to a proof-of-concept experimental data. Finally, we discuss practical aspects and 46 feasibility of experimental acquisition of the required data. For reader's convenience here we briefly present the basic ideas behind the traditional 51 and recent approaches to reconstruction of current source density (CSD analysis). For a 52 more complete review of CSD analysis see [17], for recent reviews of the relations between 53 neural activity, current sources and the recordings see [2,3]. 54 The relation between current sources in the tissue and the recording potentials is given 55 by the Poisson equation where C stands for CSD and V for the potential. While this can be studied numerically 57 for nontrivial conductivity profiles [27], here we shall mostly assume a constant and 58 homogeneous conductivity tensor, σ. In that case, the above equation simplifies to 59 C = −σ∆V and can be solved for C given potential in the whole space. On the other 60 2 hand, given the potential in the whole space, the potential is given by (2) Walter Pitts observed that having recordings on a regular grid of electrodes we can 62 estimate CSD by taking numerical second derivative of the potential [15], we call this 63 approach traditional CSD method. Pitt's idea gained popularity only after Nicholson 64 and Freeman popularized its use for laminar recordings [28] in the cortex. In this setup, 65 assuming the layers are infinite and homogeneous [29], the current source density at each 66 layer can be estimated from where z j is the position of the j th electrode and h is the inter-electrode distance. . Initially proposed in 1D, the 72 method was later generalized to other dimensionalities [30,31]. Given a set of recordings 73 V 1 , . . . , V N at regularly placed electrodes at x 1 , . . . , x N this method assumes a model of 74 CSD parametrized with CSD values at the measurement points, , 75 where f k (x) are functions taking 1 at x k , 0 at other measurement points, with the values at 76 other points defined by the specific variant of the method, for example, spline interpolated 77 in spline iCSD [17]. Assuming the model C(x) one computes the potential at the electrode 78 positions obtaining a relation between the model parameters, C k , and the measured 79 potential, V k , which can be inverted leading to an estimate of the CSD in the region of 80 interest. The kernel Current Source Density method [26] can be considered a generalization of the 83 inverse CSD. It is a non-parametric method which allows reconstructions from arbitrarily 84 placed electrodes and facilitates dealing with the noise. Conceptually the method proceeds 85 in two steps. First, one does kernel interpolation of the measured potentials. Next, one 86 applies a "cross-kernel" to shift the interpolated potential to the CSD. In 3D, in space of 87 homogeneous and isotropic conductivity, this amounts to applying the Laplacian to the 88 interpolated potential, Eq. (1). To handle all cases in a general way, including data of 89 lower dimensionality or with non-trivial conductivity, we construct the interpolating kernel 90 and cross-kernel from a collection of basis functions. The idea is to consider current source 91 density in the form of a linear combination of basis sources b j (x), for example Gaussian, 92 where the number of basis sources M N , the number of electrodes. Let b j (x) be the 93 contribution to the extracellular potential from b j (x), which in 3D is but in 1D or 2D we would need to take into account the directions we do not control in 95 experiment (for example, along the slice thickness for a slice placed on a 2D MEA). Then, 96 the potential will have a form To avoid direct estimation of the coefficients a j we construct a kernel for interpolation of 98 the potential, Then, any potential field V (x) span by b i (x) can be written as for some L, x l , and β l , but it minimizes the regularized prediction error when L = N . Here, x k are the positions of the electrodes, V k are the corresponding 102 measurements, λ is the regularization constant. The minimizing solution is obtained for 103 where V is the vector of the measurements V k , and K jk = K(x j , x k ).

104
To estimate CSD we introduce a cross-kernel If we define then the estimated CSD takes form of where λ is the regularization parameter and I the identity matrix; see [26] for derivation 108 and discussion. The Spike CSD [22] is the forerunner of the method presented here, as it aims to estimate 111 the current source distribution of single neurons with unknown morphology. This requires 112 estimation of the cell-electrode distance and a simplified model of the shape of the neuron. 113 Separating potential patterns generated by different neurons is critical and it is obtained 114 by clustering extracellular fingerprints of action potentials which are different for every 115 neuron. The limitation of this model is the assumed simplified morphology of the model 116 and low spatial resolution. Even with this simplified model it was possible to demonstrate 117 for the first time the EC observability of backpropagating action potentials in the basal 118 dendrites of cortical neurons, the forward propagation preceding the action potential on 119 the dendritic tree and the signs of the Ranvier-nodes [22]. The single cell kCSD method (skCSD), which we introduce in this work, is an application 122 of the kCSD framework where we assume that the measured extracellular potential comes 123 mainly from a cell of known morphology and known spatial relation to the MEA. To 124 estimate the CSD in this case we must cover the morphology of the cell with a collection 125 of basis functions. To do this, a one dimensional parametrization of the cell morphology 126 is needed. This could be done independently for each branch of the neuron or globally 127 for the whole cell at once. While the first approach might seem easier, handling of the 128 branching point is non-trivial. Instead, we decided to fit a closed curve on the morphology, 129 which we call the morphology loop (Fig. 1). This curve should cover all the segments Figure 1. Schematic overview of the skCSD method. The black line indicates the 2-dimensional projection of the neuron on the MEA plane, the blue circles mark the location of multielectrode array (hexagonal grid, in this example), r k is the position of the k th electrode. The morphology in our method is described by a self-closing curve in three dimensions, which is indicated by red on the plot. We shall refer to this curve as the morphology loop. A point of the cell is visited once, if it is a terminal point of a dendrite, more than twice, if it is a branching point and twice in all the other cases. With this strategy, any point on the morphology loop uniquely identifies the physical location of the corresponding part of the cell unambiguously. To set up estimation framework we distribute 1-dimensional, overlapping Gaussian basis functions spanning the current sources. Several of these Gaussians are plotted in green, t i marks the center of the i th basis element, R is the width parameter.

130
of the cell, be as short as possible, and be aligned with the morphology. For example, 131 in case of a ball-and-stick neuron, the curve starts at the soma, goes towards the tip 132 of the dendrite, turns back, goes back to the soma, and closes there. One parameter s 133 is enough to unambiguously determine a position on this line, although most points on 134 the morphology are mapped to two s parameters. We also need a method to handle the 135 branching points and guide the parametrization so that all the branches will be visited in 136 an optimal way. This problem is a special case of the Chinese postman problem known 137 from graph theory [32]. Given this information we can distribute the basis functions b j (x) 138 along the morphology of the cell (Fig. 1).

139
In practice, based on the morphology information we define an ordered sequence of 140 all the segments such that the consecutive segments are always physically connected and 141 preference is given to those neighbors which have not been visited yet. The process is 142 continued until all the segments are covered and the last element in the sequence connects 143 to the first element. Note that in the sequence the final segments of the branches are 144 present once, the branching point multiple times and the itermediate ones twice. Then we 145 fit a spline on the coordinates of the segments following the ordered sequence resulting in 146 a morphology loop construction. The CSD basis functions are distributed along this loop 147 uniformly. Any point x ≡ (x, y, z) on the morphology can be parameterized with s ∈ [0, l] 148 on the loop: where l is twice the length of all the branches. Consider the following basis functions: where s i is the location of the i-th basis function on the morphology loop, R its width.

151
The contribution to the extracellular potential from a basis source b i (s) is given by As in kCSD, for CSD of the form we obtain the extracellular potential as As before, for estimation of potential we use kernel interpolation. Note that in this case 155 the basis functions in the CSD space, b(s), live on the morphology loop, while the basis 156 functions in the potential space, b i (x), live in the physical 3D space. To determine the 157 current source density distribution along the fitted curve we introduce the following kernel 158 functions: With these definitions the regularized solution for C on the morphology loop is given by 160 Eq. (12): To obtain the distribution of currents at a given point in space we need to sum the currents 162 on the loop at points which are mapped to that physical position x: To validate the method we used simulated data which allows us to consider arbitrary 165 cell-electrode setups and test various current patterns. The LFPy package [33] was used to 166 simulate the extracellular potential at arbitrarily placed virtual electrodes. We assumed 167 the .swc morphology description format [34] and the sections were further divided to 168 segments. The coordinates of every segment's ends were used to find the connections. 169 Once the connection matrix was calculated, we used the Chinese postman algorithm 170 to obtain the morphology loop. We calculated the potential using neuron models with 171 various morphologies shown in Fig. 2 and different input distributions, assuming one- and two-dimensional multielectrode arrays. We used toy models to better understand 173 and characterize the method as well as a biologically realistic neuron model to estimate 174 performance of skCSD in an experimentally realistic scenario.

175
The simplest setup we used was a ball-and-stick neuron recorded with a laminar probe. 176 Various artificial CSD patterns and also biologically more realistic CSD distributions 177 served as test distributions in order to quantify the spatial resolution and reconstruction 178 errors. To generate the ground truth data we simulated a 500 µm long linear cell model of 179 52 segments in LFPy. The diameter of the two segments representing the soma was 20 µm, 180 while the other segments were 4 µm wide. 100 synaptic excitation events were distributed 181 randomly along this morphology in order to imitate a biologically realistic scenario.

182
To test the effect of branching on the results, a simple Y-shaped morphology was used 183 (Fig. 2B). The synapses were placed at segments 33 and 62 on different branches. The first 184 was stimulated at 5, 45, 60 ms, the other at 5, 25, 60 ms after the onset of the simulation. 185 As a realistic example we used a mouse retinal ganglion cell morphology [35] from 186 NeuroMorpho.Org [36]. In the simulations 608 segments were used. 100 synaptic excitation 187 events were distributed randomly along this morphology within the first 400 ms of the 188 simulation. The cell was also driven with an oscillatory current. In the dendrites, only 189 passive ion channels were used.

190
Parameters of the simulations. We simulated three different model morphologies: 191 ball-and-stick (BS), Y-shaped (Y), and a ganglion cell (Gang). The Y-shaped neuron was 192 oncisdered in two situations, when it was parallel (Y) or orthogonal (Y-rot) to the MEA 193 plane. The extracellular potential was computed at multiple points modeling different 194 experimentally viable recording configurations (cell and setup). All combinations used are 195 summarized in Table 1. The parameters describing the neuron membrane physiology are 196 given in Table 2. The length of the simulation was 70 s in case of the ball-and-stick and 197 Y-shaped neurons, and 850 s for the ganglion cell model.  Parameters of synapses. In most simulations we modeled synaptic activity. We 199 used synapses with discontinuous change in conductance at an event followed by an 200 exponential decay with time constant τ (ExpSyn model as implemented in the NEURON 201 simulator). When simulating the Y-shaped neuron we placed two synapses with the 202 following parameters: reversal potential: 0 mV , synaptic time constant: 2 ms, synaptic 203 weight: 0.04 µS. The synapses were placed at segments 33 and 62 (See Fig. 2

and 5). 204
When simulating the other models (ball-and-stick and ganglion cell) we used the same 205 type of synapse, however, the synaptic weights were a quarter of the above (0.01 µS) since 206 they were more numerous (Table 1).

208
To validate the skCSD method we need to consider two situations. When we know the 209 ground truth -the actual distribution of sources which generated the measured potentials 210 -we can compare the reconstruction with it. This is available directly only in simulations. 211 In that case we can measure the prediction error between the reconstruction and the 212 original. However, the skCSD method by its nature gives smooth results. This is a 213 consequence of kernel interpolation of the potential which occurs in the first step of the 214 method. The same phenomenon occurs in regular CSD estimation [17]. Thus, we can 215 never recover the original CSD distribution but only a coarse-grained approximation. This 216 is not a significant problem as the coarse-grained CSD should have equivalent physiological 217 consequence. However, to compare the reconstructed density with the ground-truth, which 218 is typically very irregular in consequence of multiple synaptic activations, we always 219 smoothed the ground truth CSD with a Gaussian kernel. The width of the kernel was 15 220 µm for ball-and-stick model, while for the Y-shaped and ganglion cell models we used 30 221 µm.

222
Thus, whenever ground truth was known, we computed L1 norm of the difference 223 between the reconstruction C * and smoothed ground truth C normalized by the L1 norm 224 of C: When analyzing experimental data we only have access to the noisy measurements 226 and cannot apply the above strategy directly. Thus we consider two strategies. One 227 is to use cross-validation error (CV). In leave-one-out cross-validation [26] we estimate 228 CSD from all the measurements but one and compare estimated prediction with actual 229 measurement on the removed electrode. Repeating this procedure for all the electrodes 230 gives us a measure of prediction quality for a given set of parameters for this specific 231 dataset. Scanning over some parameter range we identify optimal parameters as those 232 giving minimum error. They are further used to analyze the complete data. The advantage 233 of using cross-validation error is that it does not require the knowledge of the ground 234 truth current source density distribution and can still provide an estimation about the 235 performance of the skCSD method. As this algorithm is quadratic in the number of 236 electrodes, for large arrays one might prefer to use the leave-p-out cross-validation instead. 237 When we test how the quality of the reconstruction changes with the number of electrodes 238 we use CV error normalized by the number of electrodes which can then be compared 239 between different setups.

240
The other strategy we use and recommend in the experimental context, when we know 241 the cell morphology and its geometric relation to the setup, as well as the measurements, 242 is model-based analysis. The idea is to simulate different current source distributions, 243 either placing specific distribution by hand or by modeling activity of the cell assuming 244 passive membrane and random or specific synaptic activations, both of which are relatively 245 inexpensive both in computational time and coding complexity. This reduces the problem 246 to the modeling case. We can use thus generated data (CSD and potentials) scanning for 247 optimal reconstruction parameters to be used in analysis of actual experimental data from 248 the setup.

249
To handle the effects of noise one should study its properties on electrodes, e.g., assuming 250 white measurement noise identify its variance, then tune the regularization parameter λ 251 on simulated sets with comparable simulated noise added. To apply the skCSD method we need to decide upon the number of basis functions, set their 254 width (R), and choose the regularization parameter λ. In this work the number of basis 255 function was set to 512 for all cases, which is at least twice the number of electrodes used. 256 This is usually not a limitation, the more the better. For the basis width (Eq. (14)) we 257 took the following values: 8, 16, 32, 64, 128 µm. Selection of the regularization parameter 258 is not trivial [26,37]. Here, we tested the effect of the regularization parameter taking 259 values of 0.00001, 0.0001, 0.001, 0.01, 0.1 The optimal parameters were identified by the 260 lowest value of reconstruction error. Horizontal hippocampal slices of 500 µm thickness were cut with a vibratome (VT1200s; 281 Leica, Nussloch, Germany). We followed our experimental procedures developed for human 282 in vitro recordings [38], adapted to rodent tissue. Briefly, slices were transferred to a dual 283 superfusion chamber perfused with artificial cerebrospinal fluid. Intracellular patch-clamp 284 recordings, cell filling, visualization and three-dimensional reconstruction of the filled cell 285 was performed as described in [38]. For the extracellular local field potential recordings, we 286 used a 16-channel linear multielectrode (A16x1-2mm-50-177-A16, Neuronexus Technologies, 287 Ann Arbor, MI, USA), with an INTAN RHD2000 FPGA-based acquisition system (InTan 288 Technologies, Los Angeles, CA, USA). The system was connected to a laptop via USB 289 2.0. Wideband signals (0.1-7500 Hz) were recorded with a sampling frequency of 20 kHz 290 and with 16-bit resolution. The recorded neuron was held by a constant −40 nA current 291 injection.

292
Data preprocessing 154 spikes were detected on the 180s long intra-cellular recording 293 by 0 mV upward threshold crossing. A ±5 s wide time windows were cut around the 294 moments of each spikes on each channels of the extra-cellular (EC) potential recordings 295 and averaged, to access the fine details of the EC spatio-temporal potential pattern which 296 accompanied the firing of the recorded neuron on all channels. Two channels were broken (2, 297 5), however, as the skCSD method allows retrieving CSD maps from arbitrarily distributed 298 contacts, this has not prevented the analysis; the broken channels were excluded from 299 further consideration. The averaged spatio-temporal potential maps were high-pass filtered 300 by subtracting a moving window average with 100 ms width. This filtering, together 301 with the spike triggered averaging procedure, ensured that the resulted EC potential 302 map contains only the contribution from the actually recorded cell. The price we paid 303 was filtering out EC signals of the spontaneous repetitive sharp-wave like activity of the 304 slice which was correlated by the firing of the recorded neuron and thus the presumptive 305 synaptic inputs of the recorded neuron as well. An additional temporal smoothing by a 306 moving average with 0.15 ms window was used to reduce the effect of noise.

308
In this section we study the properties of the skCSD reconstruction for three representative 309 morphologies of increasing complexity and for different setups. First, for a ball-and-310 stick neuron, we study the general quality of reconstruction of fine detail by considering 311 oscillating CSD distributions of increasing spatial frequency which form the Fourier basis. 312 Since the oscillating sources are not a natural representation for branching morphologies, 313 there we show examples of reconstructions for random or specific activation, typically 314 synaptic, which might arise in experimental context. To build intuition on how the Fourier 315 space representation translates into a specific distribution we consider reconstruction of 316 sources for random synaptic activation of the ball-and-stick cell.

317
Then, for a neuron with a single branching point (Y-shaped morphology), we check if 318 skCSD can differentiate between synaptic activations close to the branching point located 319 on different branches. We also investigate the effects of random electrode placement on 320 skCSD reconstruction. Finally, we investigate the possibility of skCSD reconstruction on a 321 realistic model of a ganglion cell placed on a MEA as well as the sensitivity to noise of the 322 method.

323
After establishing and validating the method on these fully controlled model data, to 324 show experimental viability of the proposed method, the spike-triggered average current 325 source density distribution is reconstructed for a pyramidal cell from experimental data. 326

327
Here we consider the simplest neuron morphology, so-called ball-and-stick model, which 328 stands for the soma and a single dendrite. A virtual linear electrode was placed in parallel 329 to the cell 50 µm away, the electrodes were distributed evenly along the electrode extending 330 for 600 µm.

331
Increasing the density and number of electrodes improves spatial resolution of 332 the method. To study the spatial resolution of the skCSD method we consider ground 333 truth membrane current source density distributions in the form of waves with increasing 334 spatial frequencies where A = 0.15 nA/µm is the amplitude, f ∈ {0.5, 1, 1.5, . . . , 12.5} is the spatial frequency, 336 x is the position along the cell, L is the length of the cell. Then, we compute the generated 337 extracellular potential at the electrode locations. The laminar shank consisting of 8, 16 and 338 128 electrodes was placed 50 µm from the cell in parallel to the dendrite. Finite sampling 339 of the extracellular space sets a limit on the spatial resolution of the method. Increasing 340 the density of electrodes within the studied region leads to higher spatial precision. As 341 we can see in Fig. 3, with 128 electrodes it is possible to reconstruct higher frequency 342 distributions as compared to 8 electrodes. This is reminiscent of the Nyquist theorem, 343 except here we measure the potential and reconstruct current sources, while Nyquist 344 applies to sampling and reconstruction of the same quantity. What we observe is quite 345 intuitive and typically observed in the discrete inverse methods [37]. Note that once we 346 move to complex morphologies and random rather than regular electrode placement, the 347 intuition we build here, that denser probing gives better spatial resolution, would still 348 hold, even if the relation with the Nyquist theorem would be less apparent.

349
Reconstruction of random synaptic activations. In the same setup as before we 350 place 100 synapses along the dendrite and stimulate them randomly in time. We simulate 351 70 ms of recordings from this synaptically activated cell. The stimulation is sufficiently 352 strong to evoke spiking, see the Appendix for details. The spiking is indicated by strong 353 red spots in the lowest first two segments in Fig. 4, which correspond to the soma. As we 354 can see, the reconstructed current source density distribution reflects the ground-truth, 355 and the precision of reconstruction improves with increasing the number of electrodes, 356 which is reflected in the reduction of cross-validation error. Notice how the reconstructed 357 synaptic activity gets more precise with increasing the density of probing the potential. 358

Simple branching morphology 359
Let us now study the effect of branching and breaking of rotational symmetry of the 360 cell on the skCSD method. We consider here a simple Y -shaped model neuron with one 361 branching point (Fig. 2 B). We place two synapses, one on each branch (at segments 362 33 and 62, close to the branching point, see Fig. 2 D and Fig. 5 C). We consider both 363 simultaneous and independent activation of these synapses, specifically, the first synapse 364 was activated at 5, 45, 60 ms of the 70 ms long simulation, while the other was stimulate 365 at 5, 25, 60 ms from the stimulation onset. Our goal here is to find out if we can separate 366 the synaptic inputs located on two different branches, what happens at the branching 367 point, how the arrangement of the electrodes-cell setup affects the reconstruction, and if 368 our method provides more detail about the current distribution on the cell than what is 369 accessible from the interpolated potential and the CSD reconstructed with kCSD under 370 the assumption of smooth distribution of sources in space.

371
Differentiation of synaptic inputs located on different branches. To investigate 372 the differentiation power of the proposed approach we consider two placements of the cell 373 with respect to the electrode grid. One, in which the cell is placed in parallel to the plane 374 of electrodes 50µm above (Fig. 5 A), and the other, where the cell is perpendicular to the 375 grid, with the grid 50µm away from the dendritic shaft stemming from the soma, (Fig. 5 376 B, C). In Fig. 5, each panel (A-C) shows the spline-interpolated extracellular potential 377 (V), followed by standard kCSD reconstruction, both at the plane of the 4x16 electrodes' 378 grid used for simulated measurement. Then, the ground truth and skCSD reconstruction 379 are shown in the branching morphology representation in the plane containing the cell 380 morphology. Each figure shows superimposed morphology of the cell. The dark gray 381 shapes are guides for the eye and are sums of circles placed along the morphology with 382 radius proportional to the amplitude of the sources located at the center of the circle. 383 Panel A shows results for a synaptic input depolarizing one branch. Panel B shows the 384 same current distribution as in the previous setup, but the cell is rotated by 90 degrees 385 with respect to the grid. In panel C a synaptic input is added to the other branch. Observe 386 that in all three cases the interpolated potential and the standard CSD reconstruction, 387 which can be drawn only in the plane of the electrodes' grid, do not differ significantly, 388  A. The ground truth spatio-temporal membrane current density in time (x-axis) along the cell in the interval representation (y-axis). The lowest segment is the soma, where the visible high amplitude of potential is a consequence of spiking. To make the much less pronounced synaptic activity on the dendritic part visible, nonlinear color map was used. Panel B shows the lowest values of cross-validation and L1 error for the before-mentioned setups. Panels C-E present the best skCSD reconstruction in case of recording with 8, 32, and 128 electrodes. One can see how increasing the number and density of probes in the region improves the reconstruction quality until a certain level. CV error was used here to select the parameters leading to the best reconstructions. hence they cannot distinguish between these three situations. On the other hand, skCSD 389 method is able to identify correctly the synaptic inputs in all three cases.

390
The effect of electrodes placement on skCSD reconstruction for Y-shaped cell. 391 In Fig. 6 we show how the number and specific distribution of the electrodes affect the 392 quality of the reconstruction in the case of simultaneous stimulation. Panel 6.A shows the 393 ground truth data, that is the actual distribution of the transmembrane current sources, 394 along the morphology. To visualize it simply, we used the interval representation, the 395 soma is shown first, followed by one branch, followed by the other. Fig. 6.B shows the 396 reconstruction results for regularly arranged 8 (4x2), 16 (4x4), 32 (4x8), and 64 (4x16) 397 electrodes. In Fig 6.C we show reconstructions for five different random placements of 398 the same number of electrodes as for the regular case. As expected, the skCSD method is 399 able to recover the synaptic activations and the reconstruction resolution increases with 400 the number of electrodes. Note that in certain cases the random distribution is more 401 efficient than the regular grid, which is probably due to more fortunate samplings of the 402 area covered by the morphology. In this section we consider the performance of skCSD method in case of complicated, 406 biologically realistic scenario. To reach good spatial resolution allowing detailed study 407 of a cell with substantial extent, densely packed electrode arrays are required. In the 408 present reconstruction we assumed a hexagonal grid arrangement with 17.5 µm inter-409 electrode distance inspired by recent experiments on reconstructing axonal action potential 410 propagation [11,25]. We assumed the grid consisting of 936 contacts from which we used 411 128 electrodes for reconstruction to be consistent with the hardware of [11,25].

412
In the simulation we assumed an experimentally plausible scenario, where oscillatory 413 current was injected to the soma of a neuron in a slice with other inputs impinging through 414 a 100 excitatory synapses distributed on the dendritic tree. The simulated data consisted 415 of two parts. During the first 400 ms the cell was stimulated by the injected current as well 416 as through the synapses. The amplitude of the injected current was 3.6 nA, the frequency 417 of the current drive was around 6.5 Hz. During the second 400 ms the cell was stimulated 418 only with the current. Fig. 7 shows an example of the skCSD reconstruction at a time 419 selected right after a spike was elicited by the cell. As we can see, neither the standard 420 CSD recontruction assuming smooth current distribution in space, nor the interpolated 421 potential, give justice to the actuall current distribution. At the same time, the skCSD 422 reconstruction is quite a faithful reproduction of the ground truth. A movie comparing 423 the ground truth with kCSD, interpolated potential, and skCSD reconstruction, in time, 424 is provided as a supplementary material (S1 Video).

Dependence of reconstruction on noise level
426 So far we have assumed that the data are noise-free which is never true in an experiment. 427 Both the measurement device and the neural tissue are potential sources of distorted 428 data. To investigate how the performance of the method is influenced by noise, we added 429 Gaussian white noise of differing amplitudes to the simulated extracellular recordings 430 of Y-shaped cell described in Section 3.2. Fig. 8. A shows the smoothed ground truth 431 we used. The Y-shaped neuron is placed on top of a MEA with a regular grid of 4x8 432 electrodes marked by asterisks. Fig. 8.B shows the noise-free reconstruction. Panel C-F of 433 the figure show the reconstruction results for increasing measurement noise with signal to 434 noise ratio, SNR= 16, 4, 1. The signal-to-noise ratio (SNR) here is the standard deviation 435 of the simulated extracellular potentials normalized with the std of the added noise. The 436 degradation of reconstruction visible in this figures is summarized in Fig. 8.C. As we can 437 see in the reconstruction plots (Fig. 8.D-F), the increasing noise actually does not seem to 438 significantly alter the obtained reconstructions so the regularization is providing adequate 439 correction, except for the noise on the order of signal (Fig. 8.F). Reconstruction of the distribution of the current sources along the morphology with skCSD, 443 just like the reconstructions of smooth population distributions with kCSD, formally can 444 be attempted from arbitrary set of recordings, even a single electrode. While we do not 445 expect enlightening results at this extreme, it is natural to ask to what extent can we trust 446 the reconstruction in a given case, which of the reconstructed features are real and which 447 are artifacts of the method, and how to select optimal parameters of the method. We will 448 discuss these issues in the final section. Here we wish to investigate how the number of 449 electrodes, the density of the grid, and the area covered by the MEA, affect the results. 450 To answer these questions, we selected a snapshot of simulation of the model of 451 the ganglion cell described in the Methods section, with the specific membrane current 452 distribution shown in Fig. 9.A. In Fig. 9.B-H we show 7 different reconstructions assuming 453 different experimental setups, with differing numbers of electrodes, covering different area. 454 In each case we selected the width of basis functions and the regularization parameter 455 for the method by minimizing L1 error calculated for the first 1000 time steps of the 456 simulation or cross-validation error (L1-T and CV in Fig. 9.I). To verify the quality of 457 reconstruction we computed the L1 error between the ground truth and reconstruction 458 for the remaining 5800 time steps of the simulation. It turns out that minimization of L1 459 error gave better results and L1-V in Fig. 9.I shows the results for this case.

460
Given that L1 error can only be used in simulations, where the ground truth is known, 461 and yet it gives better parameters for the method to be applied to actual experimental 462 data than the CV error, we propose the following. Given data necessary to apply skCSD 463 method, thus the morphology, electrode positions, and recordings, one should assume 464 different current sources distributions, for example, make a simulation of a cell model 465 with the obtained morphology, make reconstructions for a range of parameters, and use L1 466 error for optimization. Then, perform the analysis of actual experimental data with thus 467 obtained parameters. Performing the simulations and comparing the best reconstructions 468 with the assumed ground truth has the further benefit of building intuition about which 469 features of the real CSD survive in the reconstruction and which are distorted. This is 470 another example of model-based data analysis which we believe becomes inevitable with 471 the growing complexity of experimental paradigms, such as the one considered here.

472
The results obtained in this study are consistent with our expectations: the quality 473 of reconstruction improves with the coverage of the morphology by the electrodes, with 474 increasing density of probing, and with increasing number of probes ( Fig. 9.I). Interest-475 ingly, it seems, that it is difficult to improve the reconstruction beyond certain level, in 476 consequence, the setups with moderate densities (on the order of 200 µm IED) can easily 477 compete with setups at the edge of current developments (40 µm IED, [5]). We believe 478 this is not a hard limit, that better results can be obtained here. This, however, requires 479 further development of the methods. To examine the experimental feasibility of the skCSD method we analyzed data from a 483 setup including simultaneous patch clamp electrode and linear probe with 14 working 484 electrodes recording signals from a hippocampal pyramidal cell in vitro slice preparation 485 (see Methods). As there is no ground truth data available in this case, the optimal width 486 of the basis functions and the regularization parameter were selected using the L1 error 487 and simulated data. To do this, we used the same simulation protocol as for the ganglion 488 cell model. A snapshot of the reconstruction is shown in Fig. 10 at the moment of firing. 489 A 10 ms long video of the spike triggered average is shown in the supplementary materials 490 (S2 Video). At -0.05 ms one can observe a brief appearance of a sink (red) in the basal 491 dendrites which can be a consequence of the activation of voltage sensitive channels in 492 the axon hillock or the first axonal segment leading to the firing of the cell. Since the 493 axon has not been traced in this case, the skCSD method is trying to reconstruct in the 494 most meaningful way introducing the activity in the basal dendrite. This phenomenon is 495 quickly replaced by a source (blue) in the basal dedrite with a sink at the soma and in 496 the proximal part of the apical dendritic tree, with return current sinks at more distal 497 dendrites. The extracellular potential on the second electrode reaches its minimum at 0.45 498 ms, which signals the peak of the spike. The deep red of the soma at this point signifies 499 a strong sink, while the blue of the surrounding parts of the proximal apical and basal 500 dendrites indicates the current sources set by the return currents. At 1.30 ms a source 501 appears at the soma region, which indicates hyperpolarization. From an experimental 502 setup consisting of only 14 electrodes on a linear probe a detailed distribution of current 503 sources along a complex morphology cannot be expected, but the firing activity is well 504 observable. This example demonstrates the experimental feasibility of the skCSD method 505 and may help in planning further experiments using this method. Summary. In this work we introduced a method to estimate the distribution of current 508 sources (CSD) along the dendritic tree of a neuron given its known morphology and a set 509 of simultaneous extracellular recordings of potential generated predominantly by this cell. 510 First, assuming the ball-and-stick neuron model and a laminar probe parallel to the cell, we 511 studied the basic viability of the method. We showed that introducing more electrodes to 512 cover the same area leads to the increase of spatial resolution of the method allowing us to 513 reconstruct higher Fourier modes of the CSD generating the measured potentials (Fig. 3). 514 In a dynamic scenario of multiple synaptic inputs impinging on the cell, higher density of 515 probes leads to higher reconstruction precision allowing us to distinguish individual inputs 516 (Fig. 4). Testing the reconstruction against the known CSD (the ground truth) shows a 517 clear transition between faithful and poor reconstruction when the electrode distribution 518 becomes too sparse to capture the fine detail of the CSD profile to be reconstructed 519 (Fig. 3.E). Also in neurons of more complex morphologies we studied, the Y-shape and 520 the ganglion cell, as expected, the reconstructed CSD profiles became more detailed with 521 the increase of electrode number on a fixed area ( Fig. 6 and 9).

522
Using the Y-shaped morphology we showed that i) synaptic inputs activating different 523 dendrites can be separated, Fig. 5; ii) skCSD provides meaningful information about the 524 membrane CSD in cases, when interpolated LFP and standard, population CSD analysis, 525 are not informative, Fig. 5; iii) the reconstruction is not sensitive to a specific selection of 526 electrode placement, Fig. 6 and 8; and iv) even significant additive noise (SNR=1) is not 527 prohibitive for the reconstruction, Fig. 8. 528 Biologically, the most relevant example we considered was a ganglion cell model which 529 we studied with virtual multi-electrode arrays of different designs. The MEAs used differed 530 with the inter-electrode distances for the simulated setups, as well as in the area they 531 covered, ranging from an area close to the soma to roughly four times the size of the 532 square covering the whole morphology. The best results where obtained when we used the 533 electrodes from the region covering closely the cell (9.G and H); reduction of interelectrode 534 distance from 100µm to 40µm was less spectacular than selecting the electrodes from the 535 smallest square covering the convex hull span by the morphology. Our study, assuming 536 realistic cell morphology of the ganglion cell and commercially available MEA designs, as 537 well as realistic cell activity showed that it is feasible to reconstruct the distribution of the 538 current sources in realistic, noisy situations.

539
The skCSD method performed adequately for the proof of concept experimental data, 540 even if the nature of the setup allowed only the reconstruction of the general features of 541 the spike-triggered average spatio-temporal current source density distribution patterns. 542 Historically, the idea of investigating the membrane currents of single cells was first 543 proposed in [21], however, it used simplified, linear neuron morphologies. An important 544 preprocessing step proposed there was separating the single neuron's contributions to 545 the extracellular potentials from the background activity. The novelty of the skCSD 546 method proposed here is in its use of actual neuronal morphologies and in the underlying 547 algorithmic solutions based on the kCSD method [26] devised for the study of populations 548 of neurons.

549
Experimental Recommendations. To attempt experimental application of skCSD 550 we must have 1) an identified cell of known morphology, and 2) a set of simultaneous 551 extracellular recordings of electric potential generated by this cell. Each aspect poses 552 its challenges, some of which have been addressed here. Once we have the necessary 553 data the natural question is how to select the parameters of the method in the specific 554 context of a given setup, specific morphology, and recordings. Our investigations above 555 give some indications: the electrodes selected for analysis should essentially uniformly 556 cover the area span by the cell; the width of a basis source should be on the order of mean 557 nearest neighbor interelectrode distance (for essentially uniformly distributed electrodes). 558 We feel, however, that the proper approach is to actually investigate the effects of the 559 different parameters through simulations. This is a natural place to apply the model-based 560 validation of data analysis [39]. Our suggestion is to build a computational model of the 561 cell. We believe that for the purpose of parameter selection assuming passive membrane 562 in the dendrites should be sufficient, but of course, more realistic biophysical information 563 may be included, especially if available. The model cell may be stimulated with synaptic 564 input, with current injected, or even specific profiles of ground truth CSD may be placed 565 along the cell. Then the extracellular potential must be computed at points where the 566 actual electrodes are placed in the experiment. One can then investigate the effects of 567 different parameter values on reconstruction and, for the analysis of actual experimental 568 data, select those parameters minimizing prediction error on test data. The advantage of 569 this procedure is two-fold. First, we end up with a selection of parameters adapted for 570 the specific problem at hand. Secondly, we build intuition regarding the interpretation 571 of the results for our specific cell and setup. This approach is the only way to address 572 arbitrary electrode-cell configurations and to see how much information we can extract 573 in a given case. Finally, we found that the best way to identify optimal parameters for 574 reconstruction is by minimizing the L1 error between the reconstruction and the ground 575 truth. Since we cannot have the ground truth in an experiment but we can assume it 576 in the model-based validation, this is another argument for the model-based validation 577 approach. Obviously, to efficiently apply this technique one must have appropriate tools. 578 We plan to develop and open framework facilitating such studies, meanwhile, the code 579 used for the present study will be made available upon request.

580
Challenges of recording extracellular potential and obtaining morphology from 581 the same cell. Although recording extracellular potential with a MEA, filling up a 582 neuron with a dye, and reconstructing its morphology, are standard experimental techniques, 583 using them simultaneously remains a challenge due to the size of the experimental devices 584 which need to be arranged within a small volume. Cells in the vicinity of the MEA can 585 be filled up individually by intracellular or juxtacellular electrodes, or with bulk dying. 586 Individual recording and dying with a glass electrode provides not only the morphology, 587 but also unambiguous spike times, gividing an opportunity to determine the extracellular 588 potential fingerprint of the recorded cell on the MEA. Although these would be favorable 589 data, intracellular recording less than 100µm from the MEA is extremely challenging. 590 Experimental setups featuring the necessary equipment already exist [40], but as far as 591 we know, haven't been used in this way. On the other hand, bulk dying techniques result 592 in more filled neurons, although the quality of the dying, and thus the quality of the 593 3D morphology reconstructions, is considerably lower in these cases. Although there are 594 methods for estimation of the cell position relative to the MEA ( [21], [22]), association of 595 multiple optically labeled neurons with the recorded extracellular spike patterns is still 596 unsolved.

597
Challenges of separating the activity of a single neuron from background. We 598 propose two ways to separate the activity of a neuron from the background. If we can sort 599 the spikes elicited by the neuron of interest we can calculate the spike-triggered averages 600 of the potentials reducing all uncorrelated contributions. Unfortunately, in live tissue, 601 contributions from neighboring cells will have some correlations due to shared inputs. 602 Separation of the contribution of the neuron of interest from the correlated background can 603 be obtained in two ways. One is decomposition of the activity into meaningful components, 604 for example, our results show that the high amplitude correlated oscillatory background 605 of hippocampal theta activity can be extracted with independent component analysis, 606 allowing the determination of cell-type specific time course of the synaptic input [41]. An 607 alternative is combining skCSD with population kCSD analysis, i.e., inclusion of basis 608 sources covering not just the cell of interest but also the space covering the whole population. 609 This will be the subject of further study. A second way to obtain the contributions to the 610 extracellular potential from a specific cell is by driving the cell with intracellular current 611 injection of known pattern, for example, with an oscillatory drive as we discussed (Fig. 7), 612 and by averaging over multiple periods (event-based triggering). Again, further study is 613 needed to establish efficiency of such a procedure in experiment.

614
Challenges of using novel MEAs. Handling data from high density MEAs with 615 thousands of electrodes will require further studies, as the large numbers of small singular 616 values of the kernel matrix may introduce numerical sensitivity to the reconstruction. Also, 617 optimal selection of electrodes in case of programmable MEAs merits further investigations. 618 We believe it is best to address such issues when actual experiments are attempted.

619
Importance of this work. Traditional electrophysiology has focused on the electrical 620 potential, which is relatively easy to access, from intracellular recordings, all kinds of patch 621 clamp, juxtacellular, to extracellular and voltage sensitive dyes [42]. While the relation 622 of the actual measurement to the voltage at a point may significantly differ, often this is 623 a reasonable interpretation, if needed one may always consider more realistic models of 624 measurement, for example, average over the contact surface for extracellular electrodes, 625 etc [27,43].

626
Already in the middle of XXth century, Walter H. Pitts had realized that with recordings 627 on regular grids one can approximate the Poisson equation to estimate the distribution of 628 current sources in the tissue, which he did [15]. His approach assumed recordings on a 629 regular 3D grid, which was challenging to obtain for some 60 years [30]. However, with the 630 work of Nicholson and Freeman [28] 1D CSD analysis became attractive, as summarized by 631 Ulla Mitzdorf [16]. In 2012 we proposed how to overcome the restriction of regular grids 632 with a kernel approach which both allows to use arbitrary distribution of contacts and 633 corrects for noise [26]. All the previous work, however, always assumed the contributions 634 to the extracellular potential coming from the whole tissue and smooth in the estimation 635 region.

636
In the present work we show for the first time how one can use a collection of extracellular 637 recordings in combination with a cell morphology to estimate the current sources located 638 on the cell contributing to the recorded potential. Since it is now feasible experimentally 639 to obtain the relevant data, we believe that the method proposed here may find its 640 uses to constrain the biophysical properties of the neuron membrane, facilitate checking 641 consistency of morphology reconstruction, as well as guide new discoveries by offering a 642 more global picture of the distribution of the currents along the cell morphology, giving a 643 coherent view of the global synaptic bombardment and return currents within a cell.  Figure 7 656 shows a snapshot taken at t = 495.25 ms from the simulation onset. As described in 657 Section 3.3, during the first 400 ms of simulation, apart from somatic drive, 100 excitatory 658 synaptic inputs were randomly distributed along the dendrites. For reconstruction, 128 659 virtual electrodes were selected from the 936 arranged in a hexagonal grid of 17.5 µm 660 interelectrode distance to record the extracellular potentials. Panel A presents the somatic 661 membrane potential during the simulation. The red line marks the time instant for which 662 the remaining plots were made. The colormap on Panel B shows the extracellular potential 663 interpolated between the simulated measurements computed at the electrodes, which 664 are marked with asterisks. The regular CSD is shown on Panel C, while the spatially 665 smoothed ground truth membrane current is presented on Panel D. Panel E shows the 666 skCSD reconstruction of current source density along the cell morphology from the selected 667 measurements. The dark gray shapes are guides for the eye and are sums of circles placed 668 along the morphology with radius proportional to the amplitude of the sources at the 669 center of the circle.

670
The movie is available at https://www.dropbox.com/s/8ea0q9mjhgk2s0x/CSDSmoothed. 671 mp4?dl=0.  At -0.05 ms a sink appears at the basal dendrites. This can be a consequence of the 684 activation of voltage sensitive channels in the axon hillock or the first axonal segment 685 leading to the firing of the cell. Since there were no electrodes close to the axon initial 686 segment, the skCSD method did not resolve it and reconstruct the source by introducing 687 the activity into the basal dendrite. This phenomenon is quickly replaced by a source (blue) 688 in the basal dedrite with a sink at the soma and in the proximal part of the apical dendritic 689 tree, with return current sinks at more distal dendrites. The extracellular potential on the 690 second electrode reaches its minimum at 0.45 ms, which signals the peak of the spike. The 691 deep red of the soma at this point signifies a strong sink, while the blue of the surrounding 692 parts of the proximal apical and basal dendrites indicates the current sources set by 693 the return currents. At 1.30 ms a source appears at the soma region, which indicates 694 hyperpolarization.

695
The movie is available at https://www.dropbox.com/s/50tgai6oiz172zm/PyramidalSTA. 696 mp4?dl=0.  Figure 5. Reconstruction of synaptic inputs on a Y-shaped neuron with a regular rectangular 4x16 electrode grid. Each panel (A-C) shows the spline-interpolated extracellular potential (V), followed by standard kCSD reconstruction, both at the plane of the 4x16 electrodes' grid used for simulated measurement. Then, the ground truth and skCSD reconstruction are shown in the branching morphology representation in the plane containing the cell morphology. Each figure shows superimposed morphology of the cell. Note that in panel A the grid is parallel to the cell, while in panels B-C it is perpendicular. The dark gray shapes are guides for the eye and are sums of circles placed along the morphology with radius proportional to the amplitude of the sources at the center of the circle. A. Shows results for a synaptic input depolarizing one branch. B. Shows the same current distribution as in the previous setup, but the grid is rotated by 90 degrees. C A synaptic input is added to the other branch. Observe that in all three cases the interpolated potential and the standard CSD reconstruction, which can be drawn only in the plane of the electrodes' grid, do not differ significantly, hence they cannot distinguish between these three situations. On the other hand, skCSD method is able to identify correctly both synaptic inputs. Figure 6. Reconstruction of synaptic inputs placed on different branches of the Y-shaped neuron for electrodes arranged regularly and randomly within the same area. We use the interval representation for visualization. The numbers on horizontal axis enumerate different electrode setups. The black profiles show the averaged membrane current as reconstructed in a given case; for random electrode distribution these are averages over five different realizations. A Ground truth membrane currents, the strong red indicates the synaptic inputs. B Reconstruction results for 8 (4x2), 16 (4x4), 32 (4x8), and 64 (4x16) electrodes arranged regularly. The skCSD reconstruction improves with the number of electrodes as the color representation and the black profiles indicate. C When distributing the same numbers of electrodes on the same plane as in the previous case, the quality of the average skCSD reconstruction, as indicated by the black profiles, is similar. Figure 7. skCSD reconstruction of dendritic backpropagation patterns for a retinal ganglion cell model driven with oscillatory current. A Somatic membrane potential during the simulation. The red line marks the time instant for which the remaining plots were made. B Extracellular potential interpolated between the simulated measurements computed at the electrodes, which are marked with asterisks. C kCSD reconstruction computed from the simulated measurements of the potential. D Spatial smoothing with a Gaussian kernel was applied to the ground truth membrane current to facilitate comparison with the skCSD reconstruction with the same spatial resolution level. E skCSD reconstruction computed from the simulated measurements of the potential. in cases of no added noise and signal-to-noise ratio equal to 16, 4, 1, respectively. Even the highest noise consider does not fully disrupt the reconstructed source distribution, although increasing the noise systematically degrades the result. This is shown in C, where the L1 error of the reconstruction was calculated for the full length of the simulations. This is consistent for different electrode setups which are marked with various colors. While the setups consisting of more electrodes perform better for low noise, the reconstruction seems to be more sensitive to noise in these cases. This might be a side effect of a specific definition of error. Reconstructed sources for a setup of 5x5 electrodes with 50 µm interelectrode distance (IED) covering a small part of the cell morphology around the soma. C. Reconstructed sources for a setup of 5x5 electrodes with 100 µm IED covering a substantial part of the dendritic tree, which improves the reconstruction of the synaptic input on the left. D. Reconstructed sources for 5x5 setup with 200 µm IED setup; both sinks in the membrane currents are visible. E. Expanding the 5x5 electrode setup to 400 µm IED leads to a small number of electrodes placed in the vicinity of the cell which leads to a poor reconstruction. F. Increasing the number of electrodes to 9x9 while keeping the coverage, which leads to 200 µm IED, does not improve the reconstruction. G. Reducing IED in the previous example to 100 µm, which reduces the coverage of the MEA to the whole cell (same area as in panel D) bringing majority of the electrodes close to one of the dendrites, leads to one of the most faithful reconstructions among the ones shown in this figure. H. Shows results for a matrix of 21x21 contacts with 40 µm IED, covering the same area as in examples D and G. The results are very good but the improvement in reconstruction does not justify the use of so many contacts with so high density. I. Comparison of reconstruction errors for all the cases shown. Left axis: L1 error for the training (L1-T) and validation (L1-V) part . Right axis: crossvalidation error (CV). The L1-T error is marked with black points, L1-V error is represented by green stars. Generally, the L1-V errors are a bit higher than the L1-T errors but show a similar tendency. Also the CV errors, which are drawn with red crosses, show a similar tendency. The reconstructions in panels B-H are for parameters determined with the L1-T error. The amplitudes of the measured potentials are shown as color-coded circles around the electrodes. C The skCSD reconstruction on the branching morphology representation. This is a snapshot of the cell firing, the red color indicates the sinks close to the soma, the blue marks the current sources on the dendrites.