# Algorithm for Extraction of Reflection Waves in Single-Well Imaging Based on MC-ConvTasNet
## 2 Theory and Method
### Network Architecture
#### 2.2.2 Conv2d (Spatial Feature Extraction)  
In the CSG domain, the arrival time differences of the flexural wave and reflected wave between channels are different, which can be used to distinguish the flexural and reflected waves. The difference in the arrival time of the flexural wave between channels \(n_{1}\) and \(n_{2}\) is  
\[\Delta t_{f}=d/v_{s}, \tag{3}\]  
where \(d\) is the distance between receivers \(n_{1}\) and \(n_{2}\), and \(v_{s}\) is the velocity of the flexural wave. The differences in the arrival time of reflected waves between channels \(n_{1}\) and \(n_{2}\) are  
\[\Delta t_{PP}=(L_{1}-L_{2})/\alpha, \tag{4}\]  
\[\Delta t_{SS}=(L_{1}-L_{2})/\beta, \tag{5}\]  
\[\Delta t_{PS}=\left(L_{S_{1}}-L_{S_{2}}\right)/\beta, \tag{6}\]  
\[\Delta t_{SP}=\left(L_{P_{1}}-L_{P_{2}}\right)/\alpha, \tag{7}\]  
where \(\Delta t_{SS}\) is the difference in arrival time of SH-SH and SV-SV waves; \(\Delta t_{PP}\), \(\Delta t_{PS}\) and \(\Delta t_{SP}\) are the differences in arrival time of P-P, P-SV and SV-P waves, respectively; and \(\alpha\) and \(\beta\) are the P-wave and S-wave velocities of the formation, respectively. For P-P, SH-SH and SV-SV waves, the reflection wave is of the same type as the incident wave. They share the same propagation distance for a given transmitter and receiver pair. \(L_{1}\) and \(L_{2}\) are the propagation distances from the acoustic source to the receivers \(n_{1}\) and \(n_{2}\), respectively. The propagation distance is different for the converted SV wave from an incident P wave. \(L_{S_{1}}\) and \(L_{S_{2}}\) are the distances of the P-SV wave between the virtual force source and the receivers \(n_{1}\) and \(n_{2}\), respectively. \(L_{P_{1}}\) and \(L_{P_{2}}\) are the distances of the SV-P wave between the virtual force source and the receivers \(n_{1}\) and \(n_{2}\), respectively. Distances \(L_{1}\), \(L_{2}\), \(L_{S_{1}}\), \(L_{S_{2}}\), \(L_{P_{1}}\) and \(L_{P_{2}}\) were first derived by [PERSON] and [PERSON] [28] and are given in Appendix A. Since their calculation formulas are not required in the MC-ConvTasNet, they are not introduced in detail. Due to the differences in propagation distance and velocity, the arrival time differences of the direct wave and the reflected waves between channels are different, which helps to distinguish the direct wave and the reflected waves. The arrival time differences between channels in the time domain are related to the phase differences between channels in the frequency domain. The calculation formula for the inter-channel phase difference (ICD) is as follows:  
\[\Delta\text{p}_{\text{n}}{=}{\angle}\text{Y}_{\text{n}_{1}}{-}{\angle}\text{ Y}_{\text{n}_{2}}, \tag{8}\]  
where \(\Delta\text{p}_{\text{n}}\) represents the inter-channel phase difference between the n-th pair of signal channels; \(\text{Y}_{\text{n}_{1}}\) and \(\text{Y}_{\text{n}_{2}}\) represent the complex spectrograms of the receiver \(n_{1}\) and \(n_{2}\), respectively, obtained through the short-time Fourier transform; and \(\angle\) represents the phase of the complex number, expressed in radians. Inspired by the inter-channel phase difference formula, [PERSON] et al. [24] designed a special 2-D convolution kernel to extract the ICD. The parameters of this Conv2d module learn in a data-driven manner, as shown in Figure 4. Like the waveform of the channel currently being processed, the c-th signal channel in the n-th pair of signal channels of the CSG can also be represented as overlapping segments of length L, expressed as \(\mathbf{y}_{n_{c}}\in\mathbf{R}^{1\times L}\), where \(c=1,2\) represents the channel index in the channel pair, and \(n\) represents the channel pair index. For eight receivers, \(n=1,2,3,4\). The filters of the spatial feature extraction module are \(\mathbf{K}=\{\mathbf{k}^{\prime(b)}\}\in\mathbf{R}^{2\times L\times B}\), where B represents the number of filters and \(\mathbf{k}^{\prime(b)}=\left[ \begin{array}{c}\mathbf{k}^{(b)}\\ \mathbf{k}^{(b)}\end{array}