• No results found

3.6 Peeling Reconstruction of Synaptic Inputs

3.6.2 Anatomy of a Peeling Reconstruction Step

Figure 3.18 summarizes the structure of a single iteration of the algorithm. Note that the references in this Section to maxima and minima should be understood in the context of a negative-going trace, i.e. a cEPSC.

Preprocessing We remove any local baseline shifts that survive a global highpass

filter at 0.5 Hz (top panel). The next steps of the algorithm assume a zero baseline throughout. The detection step will be conducted on the smoothed trace that results from applying a low-pass Butterworth filter of order 2 at 400 Hz. The trace extends 30 ms before and after the SWR peak.

Detection As a first step in every iteration, we detect candidate events as peaks in

the deconvolution with a single exponential kernel of decay constantτd= 4ms, equal to the average decay time constant of spontaneous events (Fig. 3.6; note that the histogram there reports 80%-20% amplitude decay times, not time constants). Such single-exponential deconvolution of a signaly is calculated as a linear combination of its amplitude and its derivative:

deconv(y) =y+τdd

y

50 pA 0 1 2 3 4 Time relative to SWR peak (ms) 0 -25

Preprocessing. The original highpass-filtered trace (in dark grey;

0.5 Hz) is turned into a deconvolution-ready low-pass filtered trace where the local baseline has been removed (light grey; 400 Hz).

Detection. A deconvolution threshold is obtained from the decon-

volution statistics outside cPSC (dashed line). Overthreshold deconvolution peaks are accepted as putative PSC onsets. Here four such candidate events are marked by magenta discs.

4

Bracketing. Starting (◮) and end (◭) points for the fit stretch are

calculated from the first two deconvolution peaks by searching for characteristic points on an 800 Hz lowpass-filtered trace, for extra sensitivity.

Reconstruction. A weighted least squares fit is carried on the

unfiltered trace. The relative weights used for the fit are repre- sented by the thickness of the dark blue area. The untainted part of the PSC is in orange continuous line, and the hidden one appears dashed.

Peeling. The reconstructed PSC is subtracted from the original

trace (light grey) yielding a peeled trace (dark grey) with one less PSC and a corrected shape.

1 ↓ Iteration

of steps 1-4 until no deconvolution peaks are left ahead.

Figure 3.18. Principle of Operation of Peeling Reconstruction.

We discuss in Section 3.6.5 below the choice of this particular deconvolution operator. Deconvolution peaks are accepted as putative PSC onsets if they are larger than the mean plus four standard deviations of the deconvolution peaks of noise surrounding the event and if the 400 Hz lowpass-filtered trace has both a negative amplitude and a negative derivative there.

Bracketing Second, we identify the starting and end point for the one-PSC fit. As

reference we use the first two accepted deconvolution peaks. The starting point is estimated as the zero crossing before the first deconvolution peak (preceding the peak by at most 3 ms) roughly indicating a maximum of the cPSC trace. The endpoint is estimated either as the first zero crossing of the trace after the first peak of the decon- volution or the last maximum before the second peak, whichever occurs first. Maxima and zeros are searched on the 800 Hz lowpass-filtered trace for increased resolution. These choices are adequate in most cases to provide the largest possible fitting window

that does not include contributions from upcoming events. Incorporating as much of the decay is critical to obtaining a good estimate in the reconstruction step.

onset doublets.If no local maximum can be identified between the first two

deconvolution peaks, we label those intervals as doublets and handle them specifically. Indeed, an extremely rapid succession of synaptic inputs can lead to composite currents where the decay phase of the initial event is masked in its entirety by the rapid rise of a second, superposed event. Generally this results in traces that do not show any local extremum between the first two onsets but at most a concavity change.

Reconstruction Third, we run a locally-weighted constrained least-squares fit using

the double exponential of Equation 3.1 that has proven to offer an accurate represen- tation of spontaneous PSCs.

weights.A Gaussian weight function emphasizes the kink of the PSC around its

minimum with an adaptive length constant equal to the distance of the min- imum to the end of the fit or to its start, whichever is shorter but in any case between 1 and 10 ms. This procedure of locally weighting a regression is often used in machine learning, where the point of maximum interest, with the larger weight, receives the name query point and the decay constant of the weight function that of bandwidth (Ng, 2011). Here we extend upon that approach by making bandwidth opportunistically shrink or expand in dependence of the available information forward and backward of the turning point.

constraints. In order to avoid artificially long decays, we add a quadratically

growing penalty to the fit error whenever a decay constantτd=τis exceeded. The penalty thresholdτwas either 8 or 10 ms. Artificially long decays jeop-

ardise the method, because they subtract too much amplitude from subsequent deconvolution peaks thus making them invisible. About only 5% of sponta- neous decays are longer than 10 ms (compare Fig. 3.21 below). An additional sentinel system allows to plug functions that decide on whether a fitted PSC is suitable; for our dataset we applied only the requirement that PSCs must have at least 5 pA amplitude.

Peeling Finally, with the fit parameters obtained in the previous step we rebuild the

PSC, including the previously missing tail, and subtract it from the unfiltered trace. Onset doublets (see above) are handled separately by fitting them simultaneously with a sum of two component alpha functions. Only the first PSC fit of the sum is subtracted from the cPSC.

After substraction of each PSC, we restart the iterative procedure by detecting deconvolution peaks after the endpoint of our previous fit and proceed as described above until no more events are left in the cPSC event window of (50, 100) ms around the SWR maximum.