• Keine Ergebnisse gefunden

The detection of upstrokes or activation times is central to data analysis tasks when studying the heart. Commonly two different approaches are used. When analyzing arrhythmia, temporal filtering with a following mean or median threshold is applied.

For data with clear upstrokes – when there is no arrhythmia – the upstroke may be defined by using a threshold or as the point where the derivative is largest.

Here, a slightly different method is used. The approach is similar to typical edge detection methods used in computer graphics [84] and has been briefly shown in [85].

The main idea is to employ a step or activation like kernel function and perform the convolution (or correlation) with the original signal. This procedure is summarized in Figure 4.2. Panel (a) shows an example time series of a pixel trace from a VF episode including the times that are finally detected as an activation. Panel (b) shows the kernel employed and Panel (c) the result of correlating3 the original signal with the

1This has been done by Johannes Schröder-Schetelig. To achieve correction with a slightly higher precision, I use a linear program with the constraints that every 5th or 6th frame is corrected. The linear program is implemented using the CVXOPT python package.

2The resting state is actually the highest value, so that𝐹 is only an approximation of the base value. However, the difference between the two is small since∆𝐹 is small.

3Meaning a convolution operation with (b) flipped.

4.2 Detection of Activation Times 37

0.00 0.25 0.50 0.75 1.00 1.25 1.50 1.75 2.00

0.01 0.00 0.01

fractional fluorescenceF/F

a)

trace detected activation

0.00 0.25 0.50 0.75 1.00 1.25 1.50 1.75 2.00

time [s]

−0.005 0.000 0.005

correlation

c)

correlation threshold -0.1 0.1

0.05 0.00 0.05

kernelweight

b)

0.03 0.02 0.01 0.00 0.01 0.02 0.03 kernel

Fig. 4.2 Example of the method for detecting the upstrokes during an arrhythmia. a) An example time series from a single pixel during VF, with the final excitation times indicated.

“Upstrokes” in the action potential point downwards in the fluorescent intensity. The thick line shows the trace with spatial smoothing applied. The same pixel trace without spatial smoothing is indicated in light blue. b)The kernel function used to identify steps/upstrokes in the original signal. In the left panel scaled to match (a) and enlarged along the time axis in the right panel. c) The result of correlating the original time series from (a) with the kernel in (b). The local maxima mark the upstrokes – as shown in (a) – with very small upstrokes removed. Due to particularly short action potentials in some of the experiments, a short kernel was used. Further, it worked better to err on the lower side for the threshold value.

kernel. The theoretically best choice of the kernel function is complex and depends on the signal [84]. The kernel used here is based on the Tukey windowing function and gives good results in practice although it is not optimized. Python code to generate this kernel can be found in the Appendix B.1 (p. 158).

Below, the necessary steps and parameters are described in more detail:

1. The choice of the kernel parameters.

2. The identification of upstrokes from the convolution.

3. Additional processing performed.

For all data analysis shown in the thesis the same kernel parameters as shown in Figure 4.2 were used. The general parameters decide on how long the kernel should be and how smooth the step/central part is4. With better data quality both can be chosen shorter to avoid systematical errors, while larger parameters make the result more robust. In general, however, the total length should not be longer than the action potential duration. The analysis results are however generally very robust to changes in these parameters. The parameter for the action potential duration was chosen to be short, due to the short action potentials observed in the Pinacidil experiments analyzed later.

Using this kernel, it is now possible to calculate the smooth signal seen in Fig-ure 4.2 (c) which reaches a maximum when the kernel correlates well with the signal.

From this correlation signal the upstrokes can now be identified as local maxima. To suppress too many misidentifications due to noise, a threshold slightly above zero is used. This threshold is set to 2.5 ⋅ 10−4 for the arrhythmia videos and 7.5 ⋅ 10−4 oth-erwise. While the threshold is small, it is chosen to reduce the number of incorrect detections when almost no signal is present during the arrhythmia. The threshold used when no arrhythmia is present is high enough to suppress most of the otherwise spuriously detected activations.

The correlation result is robust and smooth. Thus, to improve the activation time definition to below one frame a quadratic interpolation around the maximum value is used. While care should be taken not to interpret the results as being more precise than the intrinsic camera exposure time of 2 ms, it works well in practice.

After the activation times are detected, two additional processing steps are applied:

1. If detected upstrokes occur very close (less than 42 ms from each other), the one with the higher correlation value is chosen. This makes use of the assumption that there is a refractory time inhibiting very fast activations. During activation map and pacing analysis, with known much slower activation, this parameter was increased to 200 ms.

2. For the analysis of arrhythmia better results were achieved with a lower rather than a higher threshold. Additionally, however, when an activation is detected

4It should be noted, that due to the finite propagation velocity and intrinsic limitations, the upstrokes are smoothed out even without any filtering. Further, the kernel should be smoother than the signal to reduce the effect of noise.

4.3 Further Analysis 39