where is an averaging column vector . Here denotes the transpose of the input matrix/vector. Substituting in (4) with , we can obtain a new weighting criteria:

where is the local similarity between th prestack trace and the low-rank approximated reference trace:

Inserting the new weighting criteria, as shown in (8), into (2), we obtain the new PCA-based weighted stacking approach. The detailed algorithm workflow of the proposed weighted stacking approach can be expressed as:

- Calculate the SVD of data matrix
:

- Calculate the low-rank approximated singular value matrix by selecting the largest diagonal elements and setting others zero:

- Calculate the low-rank approximated data matrix

- Calculate the arithmetic mean of the low-rank approximated data matrix according to (7).
- Calculate the local similarity between each trace and the low-rank approximated zero-offset reference trace.
- Calculate the PCA-based weighting function according to (8).
- Stack the CMP gather using the calculated weighting function according to (2).

2020-07-18