Makes a semblance correlation of the two input traces. This is a full (non-gated) semblance.
The program is used as follows:
runSemblance input1FileName input2FileName
Where the input1FileName and input2FileName are in our standard file format.
The output of the program appears one place:
(1) A copy of the output data is placed in the file lastDataOutput.
The returned floating point array is numbered , and the point represents the value of the semblance when the middle of the event is lined up with the point.
We present here the definition of semblance implemented in the LwsVector class using the method Semblance. We start by reviewing the basic theory of cross correlation. Our implementation of cross correlation is defined in RunXCorr. We summarize below the theory of cross correlation with lag.
Define:
(1.1)
or in the digital domain:
(1.2)
where l is the lag, and k is the center of the window.
This should be normalized by
(1.3)
When normalized correctly, it will be between -1 and 1. It is 1 when f=g and l=0, and it is -1 when f=-g and l=0. Here is the complete cross correlation formula:
(1.4) |
|
|
In the frequency domain:
If is the fourier transform of convolution, we have:
(1.5)
which has lots of phase and DC problems.
Cross correlation is very sensitive to phase differences. A better choice is Semblance, a measure of the coherence between traces. This is not usually computed with lag, but we need that here:
This is approximately the energy of f and G divided by the mean energy of each component. It is between 0 and 1, and is 1 when f=g and l=0.
In our implementation, we assume that the is an event, i.e. and have different lengths, and we are interested in the results of passing over . Let and be the lengths of and respectively. In our case,
|
|
Then in equation (2.1) and are extended with 0 values as necessary, and we have
|
|
that is we sum whenever and overlap, that is in the region where and . Remember that is the left hand endpoint of and so one should add to to find the lag corresponding to the center of the event.
It turns out that when the length of and are very different, the semblance for where they partially overlap can be biased. So, instead of (2.3) we use only those points for which and completely overlap, making use of the assumption (2.2).
|
|
There is no clear frequency domain analogue. If , then . If then . If then . In general, it can be characterized as the energy of the sum divided by the mean energy of the components of the sum. This method is more robust with respect to phase distortions.
For more than two samples, (2.1) can be generalized:
(2.5) |
|
|
Writing the equation this way makes it clearer that we are comparing energy of the sum to the mean energy of the components. However, for notational convenience the lag, which is different for each j, is applied the before summing.
In any case, we use equation (2.4) in RunSemblance and in Semblance. To make the array reference the center of the event, we pad zeros on the beginning and the end of the resulting array. Then the returned floating point array is numbered , and the point represents the value of the semblance when the middle of the event is lined up with the point.