Extended Data Fig. 1: The average calcium response formed the temporal filter kernel.
From: Segmentation of neurons from fluorescence calcium recordings beyond real time

We determined the temporal matched filter kernel by averaging calcium transients within a moderate SNR range; these transients likely represent the temporal response to single action potentials2. a, Example data show all background-subtracted fluorescence calcium transients of all GT neurons in all videos in the ABO 275 μm dataset that showed peak SNR (pSNR) in the regime 6 < pSNR < 8 (gray). We minimized crosstalk from neighboring neurons by excluding transients during time periods when neighboring neurons also had transients. We normalized all transients such that their peak values were unity, and then averaged these normalized transients into an averaged spike trace (red). We used the portion of the average spike trace above e–1 (blue dashed line) as the final template kernel. b, When analyzing performance on the ABO 275 μm dataset through ten-fold leave-one-out cross-validation, using the temporal kernel determined in (a) within our temporal filter scheme achieved significantly higher F1 score than not using a temporal filter or using an unmatched filter (*P < 0.05, **P < 0.005; two-sided Wilcoxon signed-rank test, n = 10 videos) and achieved a slightly higher F1 score than using a single exponentially decaying kernel (P = 0.77; two-sided Wilcoxon signed-rank test, n = 10 videos). Error bars are s.d. The gray dots represent scores for the test data for each round of cross-validation. The unmatched filter was a moving-average filter over 60 frames. c-d, are analogous to (a-b), but for the Neurofinder dataset. We determined the filter kernel using videos 04.01 and 04.01.test.