# Noise Attenuation Based on Wave Vector Characteristics
## 2 Principles
### Ground Roll Attenuation  
Ground roll propagates close to the surface in low-velocity strata with high-amplitude and low frequency elliptical polarization [16]. To separate the wave vectors of ground roll, we add a large-scale moving time window to the 3C record and calculate the median wave vector from a mean vector set in order to characterize the ground roll polarization [5]. Within time window \(T_{1}\), each mean wave vector \(\mathbf{K}_{j}\) is calculated by:  
\[\mathbf{K}_{j}=\begin{array}{l}\frac{\mathbf{U}(t-T_{1}/2+j\Delta t)+ \mathbf{U}(t+T_{1}/2-j\Delta t)}{2}\quad j=0,\ldots,\frac{T_{1}}{2\Delta t} \end{array} \tag{5}\]  
These mean vectors form a \(1+T_{1}/(2\Delta t)\) dimensional vector set, in which each element is close to the true wave vector at the time \(t\). Then, we calculate the total distance of one mean vector to all the other mean vectors by:  
\[D\big{(}\mathbf{K}_{j}\big{)}=\sum\limits_{i=0}^{T_{1}}\left\|\mathbf{K}_{j} -\mathbf{K}_{i}\right\|_{2}\quad j=0,\ldots,\frac{T_{1}}{2\Delta t},\quad i\
eq j \tag{6}\]  
The median vector is derived by a median filter [26; 27]:  
\[\mathbf{M}(t)=\text{argmin}\big{(}D\big{(}\mathbf{K}_{j}\big{)}\big{)}\quad \ j=0,\ldots,\frac{T_{1}}{2\Delta t},\quad i\
eq j \tag{7}\]  
As shown in Figure 1, \(\mathbf{M}(t)\) is located at the centre of the mean vector set and has a minimum total distance to all other mean vectors.  
The median filter is a low-pass filter that can remove impulse noise by smoothing [28]. Therefore, median filters may also suppress sharp amplitudes in valid signals. To make up for this, we recover the vector moduli of the valid signal using a least squares method given by:  
\[Q(t)=\sum\limits_{\tau=t-\tau_{1}/2}^{t+\mathbb{T}_{1}/2}(\mathbf{U}(\tau)- \gamma_{1}(t)\mathbf{M}(\tau))^{2} \tag{8}\]  
where \(\gamma_{1}(t)\) is the scaling factor used to modify the median vector modulus. To minimize the objective function \(Q(t)\), we set:  
\[\frac{\partial Q(t)}{\partial\gamma_{1}(t)}=0 \tag{9}\]  
Then, the scaling factor is derived as:  
\[\gamma_{1}(t)=\frac{\sum\limits_{\tau=t-\tau_{1}/2}^{t+\mathbb{T}_{1}/2} \mathbf{U}(\tau)\cdot\mathbf{M}(\tau)}{\sum\limits_{\tau=t-\tau_{1}/2}^{t+ \mathbb{T}_{1}/2}(\mathbf{M}(\tau))^{2}} \tag{10}\]  
Therefore, the ground roll vector with a true modulus is:  
\[\mathbf{G}(t)=\gamma_{1}(t)\mathbf{M}(t) \tag{11}\]  
Directly using the subtraction method according to Equation (2), we get a ground-roll-free wave vector time-series \(\mathbf{C}(t)\) of  
\[\mathbf{C}(t)=\mathbf{U}(t)-\mathbf{G}(t)=\mathbf{B}(t)+\mathbf{N}(t) \tag{12}\]  
The proper moving time window size is crucial to the recovery of ground roll vector characteristics. During the calculation of the median vector for ground roll, both valid signals and random noise are dealt with as noise. The vector moduli of valid signals can be suppressed through median filtering only when the moving time window size is longer than the period of the valid signal (Figure 2a). Nevertheless, a too-large moving time window leads to poor suppression of the high-frequency part of ground roll. Therefore, we set the moving time window size to be close to the maximum apparent period of the valid signal.  
Figure 1: Sketch map of mean wave vector set in a 3D space. The green vector is the median vector as defined by Equation (7).