## 2 Materials and Methods
### Algorithm for Detecting Weak Signals (\(\phi\)-Method)
\begin{array}{l}t_{on}(i)=m,\quad if\ (g(m)>h\ and\ g(m-1)<h)\\ t_{off}(i)=m,\quad if\ (g(m)<h\ and\ g(m-1)>h)\.\end{array}  \tag{6}\]  
Using the \(\phi\)-parameter, the decision function is calculated by successively performing the following steps:  
1. Zeroing the negative part of \(\varphi(t)\). 2. Recursive smoothing of the resulting vector. 3. Normalisation. These steps are discussed below in detail. We should notice here, that the choice of the detection threshold \(h\), Figure 1c, is particularly significant to the algorithm performance. Conventionally, it is chosen to minimise the total error rate subject to bounded false-alarm and missed-detection probabilities, c.f. [64]. The threshold optimisation problem itself is an area of burgeoning research which is beyond the scope of the present paper. Since we did not apply any optimisation technique to the other methods used for comparison, we did not try to optimise the h value in our approach too. It is obtained through the visual analysis of the decisive function \(g(t)\) in a pretty much the same way as the parameters are chosen in the STA/TLA algorithm. The simplest detection option is to use the \(\phi\)-parameter itself as the decision function and compare it with a certain threshold level \(h\). However, the small fluctuations in \(\phi\), which are clearly visible in Figure 1b can lead to false alarms. To eliminate false triggering, the \(\phi\)-parameter is smoothed by the recursive averaging procedure (the recursive version is recommended for computational cost-effectiveness):  
\[\varphi_{a}(m)=\frac{\varphi(m)^{2}}{M}+\frac{M-1}{M}\varphi_{a}(m-1), \tag{7}\]  
where the subscript index a denotes averaging, M is the length of the smoothing window, \(\varphi(m)\) is the original time series and \(\varphi_{a}(m)\) is the smoothed time series, which is used as a decision function \(g(m)=\varphi_{a}(m)\) at the level \(h\), as illustrated in Figure 1c. The expression (7) differs from the commonly used recursive formulas by the squared value in the numerator of the first term in the right-hand side. Squaring the \(\varphi(m)\) value works as a gaining factor \"amplifying\" the high-amplitude readings and \"smoothing\" the low-amplitude points close to the noise level. This allows highlighting the events against the background of a very smooth noise. Figure 1c shows the result of the smoothing of the \(\phi\)-parameter originally displayed in Figure 1b. Another characteristic feature of the \(\phi\)-parameter is that it exhibits, with necessity, two peaks-positive at the beginning and negative at the end of the signal, which is shown in Figure 1b as being separated by the time interval covering the signal length. When the sliding window starts to sense the signal in the region where the noticeable change in the power spectrum occurs, the positive peak arises. The negative peak occurs when the signal dies out at the end of the sliding window, Figure 1b. Since the squaring procedure applies during smoothing, Equation (7), the false-negative peak is inverted into a positive one. To avoid this, all negative readings are nullified before smoothing. After smoothing, the decision function is normalised to unity and the event detection proceeds according to Equations (4) and (5). As a result, one obtains the onset and end event times, \(t_{on}\) and \(t_{off}\)respectively. Once the event is detected, the \(t_{on}\) and \(t_{off}\) values can be used to calculate the temporal and spectral signal characteristics for further analysis. The final step in the detection procedure, which is not absolutely necessary, but which is practically recommended for improving the accuracy of arrival picking, is the shift of \(t_{on}\) and \(t_{off}\) values backwards in time by the step \(s\), as shown Figure 1, where the meaning of \(s\) is graphically illustrated by a green dashed line broken between (a) and (b). This shift compensates for the time lag, which arises inevitably in the calculation and smoothing of the \(\varphi\)-function.