Suppose we have some data in an ascii file of the form
2387.75 2433.34 2480.71etc, representing some P-wave velocity measurements, and a similar file with density measurements. We would like to be able to read into Lisp-Stat and do some calculations and make some plots.
> (def vp (read-data-file "pwavelog") ) VP > (def rho (read-data-file "densitylog")) RHO > (def imp (* rho vp))
This is pretty self-evident. And while we were at it,
we computed the impedance with a simple vectorized
multiplication of the velocity and density, stuffing
the results into an array called imp.
Now we can look at, let's say, a scatter plot matrix
of velocity, density, impedance against depth (the
latter we'll make up with iseq)
> (scatterplot-matrix (list rho vp imp (iseq 1 (length imp)))
:variable-labels (list "Density" "Velocity" "Impedance" "Depth"))
which produces the results shown in Figure 1.4.
Figure 1.4: A scatter plot of the velocity and density logs along with
impedance and depth.
Or we can make a spin plot of density, velocity and depth:
> (def depth (iseq 1 (length imp))) DEPTH > (spin-plot (list rho vp depth))
as shown in Figure 1.5.
Figure 1.5: A spinning plot of the velocity and density logs along with
depth.