Log analysis example
-
Here is a sample well log. The first column
is the depth (in feet), the second is the delay time in microseconds
for compressional waves traveling 30 cm. So the P-wave velocity in
the i-th 30 cm layer is .3 * 10^ 6/dt(i). Plot velocity as a function
of depth.
-
Compute the running average of the P-wave velocity. We are going to model
the log as a Gaussian process. The running average will be your estimate
of the mean of the process. If you use a convolution to smooth the log
be careful to remove artifacts at both ends of the log. Feel free to
delete a small number of points at both ends of the log.
-
Compute the fluctuations of the log about the mean (subtract the running
mean from the raw log).
-
The Scilab function st_deviation will give you the standard deviation
of a vector. The standard deviation is the square root of the variance.
You could compute the standard deviation of the entire log as one number,
but clearly the standard deviation varies with depth. So write a function
that will return a vectors whose i-th element is the standard deviations
in a window of length n starting at the i-th depth.
Log simulation example
-
Define an nxn exponential covariance matrix C whose i-j element is equal
to sigma^2 exp (- ||i-j||/l) where l is the correlation length
and sigma is the standard deviation.
-
Use the Scilab function chol to compute the Cholesky decomposition of
C.
-
Take the inner product of the lower triangular part of the Cholesky
decomposition with an uncorrelated, normally distributed, pseudo-random
vector. What you have now is a zero-mean pseudo-random vector which
is approximately exponentially correlated. Plot the
autocorrelation of this. Compare this with what you get using
Scilab's corr function.