REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ......

44
Appendix 1 REFERENCES TO APPLICATIONS PART 1 In this section we give some explicit references to the Geophysics literature which contain the ideas and techniques we have developed. The list is not exhaustive but will we believe give some insight into the use and value of the mathematics. 1.1 Functions The idea is so embedded in the literature that it is difficult to dissect. As some examples try Claerbout (1976) Chapter 1, Introduction and Section 1.1 Chapter 2 Robinson (1980) Section 7.3 Kulhanek, O. (1976) Chapter 1 Notice in most cases no explicit reference is made. 1.2 Polynomials The main application is as the representation of data, perhaps as a wavelet. This gives a compact data representation. C1aerbout (1976) Chapter 1 Robinson (1980) Sections 6.4, 6.11 Robinson (1983) Section 2.9 1.3 Trigonometric and Other Functions McQuillin et al. (1979) Section 1.3 log Section 1.5 exp Section 1.8 sine Grant and West (1965) Robinson (1980) Claerbout (1976) Appendix 1. Sine and cosine Section 3.9 Section 5.7 Chapter 3

Transcript of REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ......

Page 1: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Appendix 1

REFERENCES TO APPLICATIONS

PART 1

In this section we give some explicit references to the Geophysics literature which contain the ideas and techniques we have developed. The list is not exhaustive but will we believe give some insight into the use and value of the mathematics.

1.1 Functions

The idea is so embedded in the literature that it is difficult to dissect. As some examples try

Claerbout (1976) Chapter 1, Introduction and Section 1.1

Chapter 2 Robinson (1980) Section 7.3 Kulhanek, O. (1976) Chapter 1

Notice in most cases no explicit reference is made.

1.2 Polynomials

The main application is as the representation of data, perhaps as a wavelet. This gives a compact data representation.

C1aerbout (1976) Chapter 1 Robinson (1980) Sections 6.4, 6.11 Robinson (1983) Section 2.9

1.3 Trigonometric and Other Functions

McQuillin et al. (1979) Section 1.3 log Section 1.5 exp Section 1.8 sine

Grant and West (1965)

Robinson (1980) Claerbout (1976)

Appendix 1. Sine and cosine Section 3.9 Section 5.7 Chapter 3

Page 2: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

212

Chapter 2: Differentiation

McQuillin (1979) Grant and West (1965)

Claerbout (1976)

Grant and West (1965)

Robinson (1983)

Chapter 3: Integration

McQuillin (1979)

Claerbout (1976) Grant and West (1965)

Robinson (1980) Bath (1974) K. Hubbert Runcorn (1966)

PART 2

Chapter 4: Complex Numbers

Mathematics for Seismic Data Processing

Section 3.6, repeated differentiation Section 5.1, ordinary derivatives

ordinary differential equations Section 2.5 Section 6, Minimisation Sections 2.6, 2.9, partial differential

equations Section 8.4, Greens theorem Section 9.9, Interpolation Section 8.7, Minimisation

Section 3.5 Appendix 1 Chapter 4 Sections 5.1, 5.5, 8.3. Chapter 8 uses

line integrals and Greens theorem Sections 3.4, 4.4 Chapter 3 Line Integrals pp. 123-204 for triple integrals

The ideas here are essential for Fourier theory and study of filters. The frequency time domain duality is crucially dependent on the complex exponential.

McQuillin (1979) Claerbout (1976) Rayner (1971) Robinson (1980) Runcorn (1964)

Chapter 5

Chapter 1, seismic waves Chapter 1, section 2 Section 5.2 Section 8.8

Matrices are a key data processing concept. Claerbout (1976) Robinson (1980) Robinson (1983) Robinson (1981)

Chapter 6

Chapter 5, section 9.7 Section 1.9, sections 4.1 to 4.1 0 Chapter 15

Clearly any data gathering operation must have some statistical component, even if just for quality control.

Page 3: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

References to Applications

Claerbout (1976) Robinson (1980) Robinson (1981)

Chapter 7

Rayner (1971) McQuillin (1979) Robinson (1971) Robinson (1980) Parasnis (1972) Claerbout (1976)

Robinson (1980) Runcorn (1966)

Chapter 8

Chapter 4 Chapter 8 Chapters 1, 3, 10

Chapters 2, 3, 5 Appendix 1 Chapter 11 Whole volume Section 5.9 Section 1.2 for the Dirac delta Section 1.3 Chapter 4

Almost any volume by E. Robinson gives a wealth of illustration. Claerbout (1976) Chapters 3, 4 McQuillin (1979) Chapters 1,3,4 Rayner (1971) Whole volume Bath (1974) Whole volume Robinson (1980) Robinson (1981) Robinson (1978) Kulhanek O. (1976) Robinson E. A. and Treitel (1973) Silvia and Robinson (1978) Webster G. M. (1978)

REFERENCES

213

Grant, F. and West, G. (1965), Interpretation theory in applied Geophysics, McGraw Hill.

Bath, M. (1974), Spectral Analysis in Geophysics, Elsevier. Runcorn, S. K. ed. (1966), Methods and Techniques in Geophysics, J. Wiley. Kulhanek, O. (1976), Introduction to digitalfiltering in Geophysics, Elsevier. Robinson, E. A. and Treitel, S. (1973), The Robinson-Treitel Reader (3rd

edn) Seismograph Service Corporation, Tulsa, Oklahoma. Silva, M. T. and Robinson, E. A. (1978), Deconvolution of Geophysical Time

Series in Exploration for Oil and Natural Gas, Elsevier. Claerbout, J. F. (1976), Fundamentals of Geophysical Data Processing,

McGraw Hill. Robinson, E. A. (1983), Multichannel Time Series Analysis with Digital

Computer Programs, (2nd edn), Goose Pond Press. Robinson, E. A. (1980), Physical Applications of Stationary Time Series with

Special Reference to Digital Data Processing of Seismic Signals, C. Griffin.

Page 4: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

214 Mathematics for Seismic Data Processing

Parasnis, D. S. (1972), Principles of Applied Geophysics (2nd edn), Chapman and Hall.

McQuillin, R., Bacon, M. and Barclay, W. (1979), An Introduction to Seismic Interpretation, Graham and Trotman.

Webster, G. M. (1978), Deconvolutions (2nd Volume), Society of Explor­ation Geophysicists, Tulsa, Oklahoma.

Robinson, E. A. (1981), Time Series Analysis and its Applications, Goose Pond.

Rayner, J. N. (1971), An Introduction to Spectral Analysis, Pion. -Gradshteyn, I. S. and Ryzhik, I. M. (1980), iHU., Academic Press. Knuth, D. E. (1977), The Art of Computer Programming, Vol. I, Addison­

Wesley.

Page 5: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Appendix 2

SOME USEFUL FORMULAE FOR READY REFERENCE

TRIGONOMETRIC FORMULAE

sin(A + B) = sin A cos B +cos A sin B

cos(A + B) = cos A cos B -sin A sin B

sin 2A = 2 sin A cos A; cos 2A = 2 cos2 A - I

tan A+tan B tanA+B=----

I-tan A tan B

2 tan A tan2A= 2 A

I-tan

tan( -A) = -tan A, cos( -A) = cos A, sin( -A) = sin A

I +tan2 A = sec2 A

A sin x + B cos x = C sin(x + cf»;

where

LOGS

loga (x) = loga b . 10gb X

loge (x) = In(x) = log(x); log( eX) = x;

aX = exloga; loga xy = loga x + loga Y

SUMS AND SERIES

n

L aj=ao+a l +" '+c n i=O

Page 6: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

216 Mathematics for Seismic Data Processing

or n

L aj = am + am + I + ... + an i=m

An arithmetic series is one of the form n-I

a+(a+x)+·· ·+(a+(n-1)x)= L (a+ix)=!n(2a+(n-1)x) j~O

A particular example is given by a = 1, x = 1. Then 1 + 2 + 3 + ... + n = L~~I i =!n(n + 1). Another series is

n

12+22+32 .. '+n 2= L r2=~(n)(n+l)(2n+1). r~1

Geometric series 2 n-I n-I j l-xn

a+ax+ax +"'+ax = L ax =a'-- (ifx,.,I). j~O I-x'

i exp(iwj) = exp(iw(b +a)~2) sin(w(b + l-a)/2 (if w,., 0) j~a sm(w/2)

= b + 1- a (if w = 0)

Also xn - an = (x - a)(xn- I + x n-2a + ... + xa n- 2 + an-I) or

xn _an n-I .. ~ n-l-r I

---=L.,X a. x-a j~O

n(n-l) n(n-l)(n-2) (l +xt = 1 +nx+ x 2 + x 3 + . .. +xn

2! 3! We define

C = = . where n' = n . n - 1 . n - 2 . .. 2· 1 (n) n' n r r (n-r)!r!" , , .

(1 +xt = I (n)xr, r~O r (~)=1=(:).

This is known as the binomial theorem. Some infinite series

x 2 x3 eX = a +x+-+-+···

2! 3!

x 2 x 3

log(1 +x)=x--+--'" 2 3

(-1 <x:::; 1)

x 3 X S sinx=x--+-_·· .

3! 5!

x 3 X S

cos x= I-x +---+ ... 3! 5!

Ixl = positive value of x, i.e. 1-21 = 2, 131 = 3 etc.

Page 7: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Some Useful Formulae for Ready Reference

CALCULUS

f X"+I x" dx=-­

n + l' d .

dx sm x = cos x,

d 1 - (log x) =-, dx x

f ~ dx = log\x\,

d . - cos x = -sm x, dx

f cos x dx = sin x f sin x dx = -cos x,

f sec2 x dx = tan x also f tan x dx = -log\ cos x\

If f and g are functions of x,

d(f(x)g(x) df. g(x) + dg . f(x) dx dx dx

If h(x) = f(g(x))

dh df dg -=-.-dx dg dx

f u(x)v'(x) dx= u(x)v(x)-f v(x) du(x).

x2 x3 f(a +x) = f(a) +xf'(a) +- f(2)(a) +-t<3)(a) ...

2 3!

where f(r)(x) = d,//dxr.

217

Page 8: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Appendix 3

PROGRAMS

We have listed below a selection of programs written in BASIC. These will hopefully enable you to carry out simple calculations to aid in your under­standing of the mathematical material in the text. The letter P in the margin of the main text indicates that one of the programs supplied here is relevant.

The programs listed here are not presented as "state of the art" and we do not claim they are good examples of the programmer's art, they will we hope assist comprehension. They are written in what we believe to be a fairly universal subset of BASIC. We have thus not provided any graphics, apart from character plots, as there is no common standard. We have also avoided extensions that will only be implemented on some machine (thus we use one line functions and do not use matrix commands). In consequence all these programs should work on a cheap microcomputer and all have been tested on a micro.

1 FUNCTIONS

Most dialects of BASIC allow the user to define one-line functions in a program.

Typically the function is defined using DEF; late in the program the previously DEFined function may be used e.g.

10 DEF FN A(W)=2*W+W

.. n.. X. FN A(23)

Most BASICS also provide some functions which are already defined. We will assume these are:

SIN COS TAN

ATN INT RND

SGN ABS SQR

EXP LOG

From these one can immediately obtain a set of "defined" functions using DEF FN.

Page 9: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Programs

SECANT SEC(X) = IjCOS(X)

COSECANT CSC(X) = IjSIN(X)

COTANGENT COT(X) = IjTAN(X)

INVERSE SINE ASN(X) = ATN(XjSQR( -X * X + 1)

INVERSE COSINE ACN(X) = -ATN(X/SQR( -x * x + 1» + 1.5708

INVERSE SECANT ASE(X) = ATN(SQR(X * X - 1) +(SGN(X) - 1) * 1.5708

INVERSE COSECANT ACE(X) = ATN(1/SQR(X * X-I» +(SIGN(X) - 1) * 1.5708

INVERSE COTANGENT ARCCDT(X) = -ATN(X) + 1.5708

HYPERBOLIC SIGN SINH(X) = (EXP(X) - EXP(-X»/,i

HYPERBOLIC COSINE COSH(X) = (EXP(X) + EXP( -I) )/2

HYPERBOLIC TANGENT TANH(X) = -EXP( -X)/(EXP(X) + EXP( -X» * 2 + 1

A MOD B MOD(A)= INT«A/B-INT(A/B» * B+0.05) * SIGN(A/B)

219

ABS(X) returns the absolute value of X i.e. IXI so if X < 0 ABS(X) = -X while if X> 0 ABS(X) = X

INT(X) returns the largest integer less than or equal to X e.g.

INT(1.7) = I INT(2.07) = 2

INT(2) =2

RND( 1) returns a random number less than 1 but exceeding zero SG N (X) returns -1 if X < 0 or +1 if X> 0, 0 otherwise SQR(X) returns the positive square root of X

Two strange but useful functions are

(a) 100 DEF FNR(X) = INT(X * (lOjF0) +0.5)/(lOjF0)

where we assume F0 is set on some previous line to be an integer like 2 or 6. This function takes a number X and keeps only the first F0 numbers after the decimal point-it "rounds" the number, If F0 = 2 and X is 212.123456 then FNR(X) will equal 212.12. Setting F0= -2 with the same X will give FNR(X) equal to 200, i.e. the number would be rounded to the nearest 100.

This is useful to print tidy versions of numbers, thus with F0 = 6

PRINT(FNR(X) )

prints X to 6 decimals.

(b) MOD(A) = INT(A/B - INT(A/B» * B +0.05) * SGN(A/B)

Page 10: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

220 Mathematics for Seismic Data Processing

Thus function, which assumes that B is previously defined returns the remainder after A is divided by B. For B = 3

MOD(7)= I MOD(3)=O MOD(2)=2

MOD(13) = I

We will from time to time write A mod B to mean MOD(A). The following program demonstrates the use of these functions.

Program 1

This program tests the two functions we have just described.

R(x): the rounding function

mod(x): the mod function

As you can see we display the output to assist in the understanding of the program.

JLIST

100 RE" FUNCTION TESTIN6 110 RE" TESTS R(XI AND "00 120 RE" DATA FRO" RANDO" 130 FO : 4:8 : 3 1~0 DEF FN R(XI: INT (X • (10

~ FO) + 0.51 I (10 ~ FOI 150 DEF FN "OD(A) = INT ((A I

B - INT (A ! B») • B + 0.05 ) • S6N (A I B)

160 FOR I : 1 TO 4 170 X = RND (9) 180 X = 100 • X 190 PRINT 200 PRINT I X= "jX 210 PRINT "ROUNDED X IS "j FN R(

Xl 220 PRINT 230 X = INT (X) 240 PRINT'X = ";X 250 PRINT ""OD(X) = "j FN "OD(X

)

260 NEXT 270 PRINT 280 PRINT "PR06RA" ENDS ": END

JRUN

X= 71.4390695 ROUNDED X IS 71.4391

x = 71 "ODm = 2

X= 40.8186764 ROUNDED X IS 40.8187

x = 40 "ODm =

X= 21. 0867141 ROUNDED X IS 21.0867

x = 21 ImDm = 0

X= 96.0521198 ROUNDED X IS 96.0521

x = 96 "ODm = 0

PR06RA" ENDS

Page 11: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Programs 221

Program 2

This program is provided for you to evaluate polynomials. Given the order of the polynomial and its coefficients the program will compute the value of the polynomial for a given number of points. A range of values must be given.

Do note this is not an efficient way of computing values: there are very much better ones, for example Homer's algorithm.

JlIST

100 RE" PROGRA" 2.1 110 RE" OBVIOUS AND SLOM POLY NO

"IALS 120 PRINT "GIVE THE ORDER OF THE

": 130 INPUT "POLYNO"IAL "jN 140 DI" AIN) 150 PRINT "NOM GIVE THE COEFFICI

ENTS,STARTING WITH THE LEADI NG"

160 FOR I = N TO 0 STEP - 1 170 PRINT HAI"jIj"): ": INPUT AI

I) 180 NEXT 190 INPUT "GIVE THE LOWER END OF

THE RANGE"jLS 200 INPUT "GIVE THE UPPER END"jU

S 210 INPUT "HOW "ANY POINTS "jNP

220 Y = ,IUS - LB) ! NP 230 FOR I = 0 TO NP 240 I = LB + Y • I 250 S = 0 260 FOR J : N TO 0 STEP - 1 270 S : S + AIJJ * II A J) 280 NEXT 290 PRINT "X = "jZ,· PIX) = "jS

Program 3

300 HEXT 310 END lRUN GIVE THE ORDER OF THE POLYNO"IAL 2 NON GIVE THE COEFFIC.IENTS,STARTING MITH THE LEADING A(2)= ?2 A(1J= ?1 AIO)= ?-1 GIVE THE LOMER END OF THE RAN6EO GIVE THE UPPER END2 HON "ANY POINTS 10 X=O PIXJ=-1 X = .2 PIX) = -.72 X = .4 pm = -.28 X = .6 P!Xl = • 32 x = .8 X = 1 X = 1.2 X = 1.4 X = 1.6 X : 1.8 X = 2

PIX) = 1.08 PIXl = 2 PIX) = 3.08 PIX} = 4.32000001 PIX) = 5.72000001 PIX) = 7.28000001 pm = 9

This program uses the method of bisection to find the solution of f(x) = o. You must give a range of values which include the solution, the program will warn you if there is no solution in this range. Notice you are asked to specify the accuracy required. To ensure that the procedure terminates, the program will ask you for an upper bound to the number of iterations.

Page 12: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

222

JlIST

100 REP! P!ETHOD OF BISECTION 110 REP! SOLVES EGUATION 120 REP! FN IS DEFINED IN 140 130 REP! RAN6E A(X(B NEEDED 140 DEF FN FIX) = X • X + 3 • X

+ 1 150 PRINT "YOU "UST GIVE A AND B

160 PRINT "VALUES WHICH INCLUDE THESOlN"

170 INPUT ·S"ALlER VALUE A= "jA 180 INPUT "LARSER VALUE B= "jB 190 INPUT "SIVE ACCURACY "iEE 200 PRINT ""AXI"UPI NO. OF ITERAT

IONS· 210 INPUT "TO STOP PROS"jIT 220 FA = FN FIA):FB = FN F(B) 230 IF FA • FB > (I THEN PRINT"

TRY A6AIN": SOTO 160

240 I = I + I: IF I ) IT THEN PRINT "STOPPED":SO = PI: GOTO 310

Program 4

Mathematics for Seismic Data Processing

250 IF ABS IFA) < EE THEN SO : A: 60TO 310

260 IF ABS (FB) ( EE THEN SO : B: SO TO 310

270 PI : (A + B) I 2:FPI: FN FIPI'

280 IF FA • FPI) : 0 THEN A : " :FA : F": GOTO 230

290 B : ":FB : FPI 300 SOTO 230 310 PRINT "SOLH. IS ",SO 320 PRINT "FN VALUE AT THIS POIN

T: ";FPI 330 END JRUN YOU "UST SIVE A AND B VALUES WHICH INCLUDE THE SOLN S"AllER VALUE A: -I LARGER VALUE B: 2 SIVE ACCURACY 0.000001 "AXI"U" NO. OF ITERATIONS TO STOP PROSIOO SOlN. IS -.381966114 FN VALUE AT THIS POINT: -2.30e36676E-01

This program uses the Newton-Raphson algorithm to solve f(x) = O. You should note that the program computes the derivatives of the function itself. If you supply the derivatives in the subtoutine beginning at line 1000 the program will converge more quickly but this does make the program less flexible. Notice an initial guess and the accuracy required must be specified.

There is no check to ensure that the program stops if the algorithm does not converge so take care.

JLIST

100 RE" NEWTON-RAPHSON AlSORITH

" 110 RE" NEED AN INITIAL SUESS 120 RE" FN DEFINED AT 140 130 RE" PROS FINDS DERIVATIVE 140 DEF FN FIX) : SIN IX) - X •

X I 2

150 INPUT "SIVE INITIAL VAL ";XO

160 INPUT "GIVE ACCURACY NEEDED" JEE

170 EP : IE - 16: RE" ACCURACY 80 UND FOR "leRO

RUN 180 EP = SGR (EP) 190 FO: FN FIXO)

Page 13: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Programs

200 SOSUS 1000 210 Xl = XO - FO I FD:I = I + 1 220 PRINT ·STEP "iIi" X= "iXI 230 E = Xl - XO:XO = Xl 240 IF ADS (E) > EE GO TO IBO 250 PRINT "ACCURACY ACHIEVED": STOP

1000 H = ( ASS (XO) + EP) * EP 1010 Fl = FN F(XO + H) 1020 FD = (Fl - FO) I H 1030 REM FD IS DERIVATIVE 1040 RE" H IS DELTA X 1050 RETURN JRUH SIVE INITIAL VAL 1 GIVE ACCURACY NEEDEDO.OOOOI STEP 1 X= 2.62956303 STEP 2 X= 1.78211336

Program 5

STEP 3 X= 1.47B46231 STEP 4 X= 1.4155181 STEP 5 X= 1.40783465 STEP 6 X= 1.40600649 STEP 7 X= 1.40528888 STEP 8 X= 1.40492846 STEP 9 X= 1.40472574 STEP 10 X= 1.4046056:: STEP 11 X= 1.40453268 STEP 12 X= 1.40448785 STEP 13 X= 1.40446015 STEP 14 X= 1.40444298 STEP 15 X= 1.40443232 STEP 16 X= 1.4044257 ACCURACY ACHIEVED

BREAK IN 250

223

This program computes the minimum value of a function in the range a to h. The method is to split the range into n intervals and then find the minimum function value. The process is then repeated on this interval to give a smaller interval. This process is repeated until the accuracy required is attained. The diagnostic print is given to illustrate the method.

One could also find the maximum using the same program, we leave this as an exercise for the reader. Alternatively the stationary values might be found by using bisection or Newton-Raphson to find the values for which the derivative is zero.

JLIST 170 INPUT I A= ";A: INPUT "BE ", 8

100 RE" "INI"U" PROGRA" 180 T = FN FIA):K = 0 110 RE" ASSU"ES THERE IS ONE "I 190 N = FN FIB)

N 200 IF N < T THEN T E N:K = N 120 RE" NEEDS INTERVAL Of INTER 210 H = (8 - A) I N

EST 220 FOR J = 1 TO N - 1 130 OEF FN F (X) = - 250 • X + 230 P = FH F(A + J • H)

22500 • (1.00949) A X 240 IF P > = T GOTO 260 140 INPUT "NO OF GRID POINTSE "i 250 T = P:K = J

N 2bO NEXT 150 INPUT "TOLERENCE= 'iEE 280 R = A + J • H 160 PRINT "FN EXA"INED BETWEEN A 290 PRINT "INTERVAl IS "jiR - H)

AND B" ; I ro"iR

Page 14: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

224

300 RE" THIS GIYES INTERYAL 310 IF ABS (H) < EE I 2 THEN GOTO

340 320 B = A + (K + 1) • H:A = B-2

* H 330 GOTO 180 340 SO = R - H ! 2 350 PRINT "SOLN= ";SO 360 PRINT "FN YALUE = "jP 370 END lRUN NO OF GRID POINTS= 10 TOLERENCE= 0.0001

Program 6

Mathematics for Seismic Data Processing

FN EXA"INED BETNEEN A AND B A= 15

B= 20 INTERYAL IS 19.5 T020 INTERYAL IS 17.4 T017.5 INTERYAL IS 17.28 T017.3 INTERYAL IS 17.216 T017.22 INTERYAL IS 17.1992 T017.2 INTERYAL IS 17.19664 T017.1968 INTERYAL IS 17.196928 T017.19696 SOLN= 17.196944 FN YALUE = 22168.985

This program plots contours for a function of two variables f(x, y). The function is evaluated for x values between xa and xb,y values between ya and yb. The letters indicate the "height" of the function. We have used this display as it only requires a text string as opposed to full graphics.

You may wish to set vt, the number of vertical lines, and vh, the number of horizontal places, to fit the display to your own machine.

lLIST

100 RE" CONTOUR PLOT 110 RE" SET YT=NO YERT LINES 120 RE" YH=NO HORIZONTAL CHAR S

PACES 130 RE" BOUNDS XA-XB,YA,YB 140 REM FN DEFINED AT 250 150 VT = 20:VH = 39 160 DIH 5$(40) 170 DI" Z(20,40):"AX = O:"IN = 0

180 INPUT ·XA = "ilA: INPUT I IB = "jXB

190 INPUT I YA= "jVA: INPUT I VB = "jVB

200 IX = (XB - XA) ! VH:IV = (VB -VA) ! VT

210 FOR I = 1 TO VT 220 V = VA + I • IV 230 FOR J = 1 TO YH 240 X = XA + J * IX

250 Z ( I , J) = 100 * (X * X - V * V )

260 P = Z(I,J) 270 IF "AX < P THEN "AX = P 280 IF HIN ) P THEN HIN = P 290 NEXT 300 NEXT 310 RE" SRID CO"PUTED IN Z 320 PRINT "SRID CO"PUTED " 330 PRINT ""AX= "j"AX,""IN= "i"I

N 340 RE" NAIT HERE 350 SET A$ 360 R = ("AX - "IN) 370 HO"E 380 FOR I = 1 TO YT 390 FOR J = 1 TO VH 400 K = INT ((Z(I,J) - "IN) * 9 I

R) + 48 410 0$ = US + CHRS (K) 420 NEXT 430 PRINT US

Page 15: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Programs

440 Q$ = II 450 NEXT 460 PRINT "END": END lRUN XA = -1

XB= 1 VA= -1 VB= 1

GRID CO"PUTED "AX= 100 "IN= -99.9342538 444333222111111000000001111112223334445 554443332222211111111111122222333444556 655544433332222222222222222333344455566 666555444333333322222233333334445556667 766655544444333333333333334444455566677 777665555444444333333334444445555667778 877666555544444444444444444455556667788 877766655554444444444444444555566677788 887766665555444444444444445555666677888 887766665555444444444444445555666677888 887766665555444444444444445555666677888 877766655554444444444444444555566677788 877666555544444444444444444455556667788 777665555444444333333334444445555667778 766655544444333333333333334444455566677 666555444333333322222233333334445556667 655544433332222222222222222333344455566 554443332222211111111111122222333444556 444333222111111000000001111112223334445 433222111100000000000000000011112223344 END

Program 7

JRUN XA : -1

XB= 1 VA= -1 VB= 1

GRID CO"PUTED "AX= 200 "IN= 0

225

776665554444443333333333444444555666778 666555444333333322222233333334445556667 655544433332222222222222222333344455566 554443332222211111111111122222333444556 544333222211111111111111111122223334455 443332222111110000000000111112222333445 443322211111000000000000001111122233444 433322211110000000000000000111122233344 433222111100000000000000000011112223344 433222111100000000000000000011112223344 433222111100000000000000000011112223344 433322211110000000000000000111122233344 443322211111000000000000001111122233444 443332222111110000000000111112222333445 544333222211111111111111111122223334455 554443332222211111111111122222333444556 655544433332222222222222222333344455566 666555444333333322222233333334445556667 776665554444443333333333444444555666778 887766665555544444444444455555666677889 END

This is a non-linear least squares program which minimises a nonlinear sum of squares using a technique called Marquardt's method. We have included it so you might have an example of the minimisation of a more complex function, this technique is often used in practical problems. The program tries to find b values to minimise

12

I {xj -b1/[1 +b2 exp(ib3)]}2 j=1

the data being obtained from the data statement. As you will see from the output we have printed values of IG, INF and LAMBDA. These are diagnostic parameters.

Page 16: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

226 Mathematics for Seismic Data Processing

Notice that there is a Choleski decomposition algorithm starting at line 1270 which transforms a matrix into a lower triangular form. The subroutine which follows it solves equations using this decomposition. This is a very good example of the practical use of some matrix results.

nRI00

lLIST

100 REI'I THIS IS MARQUART 110 REI'I DERIVATIVES NOl NEEDED 120 DII'I E(12),A(6),CI6),B!3),XI3

),VI3),D(3),FI12),ZI3) 130 DATA 5.308,7.24,9.638,12.86

6 140 DATA 17.069,23.192,31.443,3

8.558 150 DATA 50.156,62.948,75.995,9

1.972 160 INPUT "NO OF PARAI'IETERS:1jN 170 INPUT "NO OF RESIDUALS:I;I'I 180 INPUT "TOLERENCE,USUALLY lE-

37";TL 190 FOR I : 1 TO 1'1: READ E(I): NEXT

200 PRINT "INPUT INITIAL PARAI'I V ALS"

210 FOR I : 1 TO N 220 INPUT "BII):";B(I) 230 NEXT 240 INC: 10:DEC = 0.4 250 PH : I:LAI'I : 0.0001 260 REI'I FUNCTION EVAL 270 FOR IS : 1 TO 1'1: 60SUB 1100:

NEXT 280 60SUB 1790 290 PO : P 300 FOR I : 1 TO N:ZII) : BII): NEXT

310 16 : 16 + 1:INF : INF + 1 320 LA" : LA" • DEC 330 PRINT I FN VAL:ljPO 340 PRINT "16 :1;16;" INF:ljINF

350 PRINT I LAI'IBDA:I;LAI'I

360 "1'1 : N • (N + 1) ! 2 370 FOR I = 1 TO I'II'1 380 All) : 0 390 NEXT 4(10 FOR I : 1 TO N 410 V(J) : 0 420 NEXT 430 FOR I = 1 TO 1'1 440 IS = I: 60SUB 1160 450 FOR J = 1 TO N 460 V(J) = V(J) + DIJ) * F(I) 470 Q = J * (J - 1) I 2 480 FOR K = I TO J - 1 490 A(D + K) = AID + K) + D(J} *

DUO 500 NEXT K 510 NEXT J 520 NEXT I

530 FOR J = 1 TO "" 540 CIJ} = AIJ) 550 NEXT 560 FOR J = 1 TO N 570 DW = B(J) 580 NEXT 590 FOR J = 1 TO N 600 D = J * (J + 1) I 2 610 A(9) = C(g) * II + LAI'I) + PH *

LA" 620 X(J) = - V(J) 630 IF J = 1 60TO 670 640 FOR I = I TO J - 1 650 AID - I) = C(D - I) 660 NEXT 670 NEXT 680 60SUB 1270 690 IF ND ) 1 THEN 6010 880 700 60SUB 1530 710 CO = 0 720 FOR I = 1 TO N 730 B(J) = DU) + 1m

Page 17: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Programs

740 IF BII) = OIl) THEN CO = CO + I

750 NEXT 760 IF CO = N 6oTo 950 770 FOR IS = I TO H: 60SUB 1100:

NEXT 780 SoSUB 1790 790 INF = INF + I 800 REH IF HANGS HERE TRY 770 810 PRINT 1 FN YAL="jP 820 FOR I = 1 TO N 830 PRINT IBII;ljl)=I,BII) 840 NEXT 850 PRINT "LA"BDA="jLA" 860 IF P < PO THEN GOTO 290 870 RE" INCREASE PARA" 880 LA" = LA" • INC 890 IF LA" < lEI5 THEN SOTo 930

900 PRINT "LA" TOO BIS,TRY RESTA RT"

910 PRINT "TRY A NEN START" 920 soro 950 930 IF LA" = 0 THEN LA" = TL 940 60TO 590 950 PRINT "END OF RUN" 960 PRINT "FN YALUE=",P 970 PRINT "LAST FN VALUE =";~O 980 PRINT "CORRESPONDING PARA"ET

ERS" 990 FOR I = I TO N 1000 PRINT "B(ljI") = "jZII): NEXT

1010 PRINT "COEFF YALS="; 1020 FOR I = I TO N 1030 PRINT "BI"jI")="jB(I) 1040 NEXT 1050 PRINT "RESIDUALS • 1060 FOR I = 1 TO " 1070 PRINT Ij" IjF(I) 1080 NEXT 1090 STOP 1100 RE" RESIDUALS EYALUATED 1110 PX = IS * B(3) 1120 IF PX ) 8 THEN FIlS) = 3E4:

227

SOTO 1150 1130 PX = 8(2) * EXP iPX) + I:PX

= 8!1l I PX 1140 FIlS) = PX - EllS) 1150 RETURN 1160 RE" DERIYATIVE 1170 EPS = 0.000001 1180 FOR L = 1 TO N 1190 XX = BIL):H = ADS IXX) • EP

S + EPS • EPS 1200 GOSUB 1100 1210 PI = F lIS) 1220 BIL) = BIL) + H 1230 GOSUB 1100 1240 P2 = F lIS)

1250 DIL) = P2 - Pl:D(L) = D(L) j

H 1260 RETURN 1270 RE" CHOLESKI DECO"P 1280 FOR J = 1 TO N 1290 Q = J • (J + 1) j 2 1300 IF J = I THEN GOTO 1390 1310 FOR I = J TO N 1320 "" = I * (I - 1) j 2 + J 1330 S = A("") 1340 FOR K = 1 TO J - 1 1350 S = S - AI"" - K) * A(g - K)

13bO NEXT 1370 AI"") = S 1380 NEXT 1390 IF AIQ) ) 0 THEN ND = 0: 60TO

1430 1400 RE" ND=O IS POS DEF 1410 ND = 10 1420 A(Q) = 0 1430 S = SQR (A(g) 1440 FOR I = J TO N 1450 "" = I * (I - 1) j 2 + J 1460 IF S = 0 THEN A("") = 0: 60TO

1480 1470 AI"") = AI"") ! S 1480 NEXT 1490 NEXT 1500 RE" END OF CHOLESKI

Page 18: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

228

1510 RETURN 1520 RE" NON RECONS1UCl FRO" CH

OL 1530 IF All) = 0 THEN XII) = 0: 6OTO

1550 1540 XI!) = X III I A(1)

1550 RE" 1560 IF N = 1 THEN 6010 1660 1570 Q = 1 1580 FOR I = 2 TO N 1590 FOR J = 1 TO I - 1 1600 Q = Q + I:XII) = XII) - AIQ)

• XlJ) 1610 NEXT 1620 Q = Q + 1 1630 IF AIQ) = 0 THEN XII~ = 0: 6OTO

1650 1640 XII) = XII) I AIQ) 1650 NEXT 1660 IF AIN • IN + 1) I 2) = 0 THEN

XIN) = 0: 60TO 1680 1670 XIN) = XIN) lAIN. IN + 1) I

2) 1680 IF N = 1 60TO 1770 1690 FOR I = N TO 2 STEP - 1 1700 Q = I • (I - 1) I 2 1710 FOR J = 1 TO I - 1 1720 XIJ) = X(J) - XII) • AI9 + J

)

1730 NEXT 1740 IF A(9) = 0 THEN XII - 1) =

0: 60TO 1760 1750 XII - 1) = XII - 1) I A(9) 1760 NEXT 1770 RE" END CHOLESKI 1780 RETURN 1790 RE" SU" OF SQUARES 1800 CU = 0 1810 FOR IS = 1 TO " 1820 CU = CU + FilS) • FilS) 1830 NEXT 1840 P = CU 1850 RETURN lRUN NO OF PAR~ETERS=3

Mathematics for Seismic Data Processing

NO OF RESIDUALS=12 TOLERENCE,USUALLY lE-370.000001 INPUT INITIAL PARA" YALS B(I)=196 Bill =50 B(I)=-0.3

FN YAl=237.859078 16 =1 INF=l1 lA"BDA=4E-05 FN YAl=3.88438723

Bill =217 • 300262 B(2)=50 BI31=-.3 LA"BDA=4E-05

FN YAl=3.88438723 16 =2 INF=13 LA"BDA=I.6E-05 FN YAL=9.00000008E+09

BI1I=219.169401 B(2)=50 BI3)=3.51491685 l~BDA=.456976

FN YAl=7321.77648 B (1) =217.308558 8(2)=50 8(3)=-.199591924 lA"8DA=6.397664

FN YAL=100.039937 8(1 )=217.306271 B(2) =49. 9246579 8(3)=-.308975884 LA"BDA=1439.4744

FN YAl=3.88412928 B (1) =217.302883 B(2)=49.9953757 B(3)=-.300008395 LA"8DA=23031.5904

FN YAL=3.88412928 16 =3 INF=18 lA"BDA=9212.63617 FN YAl=3.89945702

B (1) =217.305573 8(2)=49.9835004 8(3)=-.300169186 LA"BDA=9212.63617

Page 19: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Programs 229

FN VAL=3.88496789 CORRESPONDIN6 PARA"ETERS 81 I) =217.305491 8(1) = 217.302883 8(2)=49.9947509 8(2) = 49.9953757 8(3)=-.300005289 8(3) = -.300008395 L~BDA=175040.087 COEFF VALS=8(1)=217.305491

FN VAL=3.88425395 B(2)=49.9953757 Bll)=217.305491 8(3)=-.300008395 8(2)=49.9953445 RESIDUALS 8(3)=-.300008209 1 .404976705 LA"BDA=3500801.74 2 .401489398

FN VAL=3.88421308 3 .551654126 8 (I) =217 • 305491 4 .666696049 B(2)=49.9953742 5 .808856748 8(3)=-.300008386 6 .265581213 LA"BDA=73516S36.6 7 -.930688426

FN VAL=3.88421113 8 .701020166 BII) =217.305491 9 -• 311987355 8(2)=49.9953756 10 -.663439274 8(3)=-.300008395 11 .418302804 LA"8DA=I.61737041E+09 12 -.123885065 END OF RUN FN VALUE=3.88421113 BREAK IN 1090 LAST FN VALUE =3.88412928

Program 8

This is another complex program which finds the minimum of a function of n variables b(l) ... b(n). We think of it as a variable metric method. In this example the function defined in the subroutine starting at 970 is

P(b) b2 b3 ••• ) = lOO(b2 - bi)2 +(b) _1)2

a famous test example. Starting values for the b's are needed.

llIST

100 RE" VARIABLE "ETRIC NKI 110 INPUT "THE NO OF PARA"S= "jN

120 FOR I = I TO N: INPUT "B(I)= "j8(1)

130 NEXT 140 W = 0.21TL = 0.0001 ISO RE" SETUP 160 60SU8 950 170 PO = P 180 INF = INF + I

190 60SUB 1000 200 16 = 16 + 1 210 FOR I = 1 TO N 220 C8 ( I , I) = 1 230 NEXT 240 ILAST = 16 250 PRINT "FN EVAlUATION NO";INF

260 PRINT "&RADIENT CAlCS=";I6 270 PRINT "FN ="jPO 280 FOR I = 1 TO N 290 PRINT "COEFF=";BII): NEXT 300 PRINT

Page 20: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

230

310 RE" ITER LOOP 320 FOR I = 1 TO N 330 X(I) = 8(1):C(I) = 6(1) 340 NEXT I 350 Dl = 0 360 FOR I = 1 TO N 370 5 = 0 380 FOR J = 1 TO N 390 5 = 5 - CD II, J) * 6 (J) 400 NEXT 410 T(I) = 5:Dl = Dl - 5 * 6(1) 420 NEXT I 430 IF Dl } 0 THEN GOTO 460 440 IF ILAST = IS SOTO 860 450 SOTO 160 460 K = 1 470 COUNT = 0 480 FOR I = 1 TO N 490 8(1) = XII) + K * T(I) 500 IF 8(1) = XII) THEN COUNT =

COUNT + I 510 NEXT I 520 IF COUNT < N 60TO 550 530 IF ILAST = IS THEN 60TO 860

540 60TO 160 550 605UB 950 560 INF = INF + 1 570 RE" IF FN NO CO"P THEN 580 IF P ( PO - Dl * K l TL THEN

60TO 600 590 K = W * K: 60TO 470 600 PO = P 610 SOSU8 1000 620 16 = 16 + 1 630 Dl = 0 640 FOR I = 1 TO N 650 T(I) = K * T(I) 660 C(I) = S(I) - C(I):Dl = Dl +

T(I) * cm 670 NEXT I 680 IF 01 < (I THEN 60TO 210 690 IF 01 = 0 SOTO 160 700 02 = 0 710 FOR I = 1 TO N

Mathematics for Seismic Data Processing

720 S = 0 730 FOR J = 1 TO N 740 5 = S + C(J) * CBII,J) 750 NEXT J 7bO XII) = 5:D2 = D2 + 5 * C(I) 770 NEXT I 780 D2 = D2 I Dl + 1 790 FOR I = 1 TO N 800 FOR J = 1 TO N 810 WX = T(l) * XlJ) + xm • T(J

) - D2 * T(I) * T(J) 820 C8(I,J) = C8(I,J) - WX I Dl 830 NEXT 840 NEXT 850 60TO 250 8bO PRINT "NO FN EVALUATIONS=";I

NF 870 PRINT "NO GRADIENT CALC5=";1

6 880 PRINT "NUft8ER OF FUNCTION CA

llS ";S9 890 PRINT "FUNCTION VALUE=";PO 900 FOR I = I TO N 910 PRINT 920 PRINT "1= ";1;" 8(I)=",B(I) 930 NEXT I 940 END 950 5X = B(2) - B(I) • 8(1) 960 5Y = 8(1) - 1 970 P = 5X • 5X • 100 + 5Y • 5Y 980 69 = S9 + 1 990 RETURN 1000 EPS = 0.00001 1010 FOR I = 1 TO N 1020 XX = BII):H = XX • EP5 + EPS

* EPS 1030 SOSU8 950 1040 PI = P 1050 B(I) = 8(1) + H 1060 S05UB 950 1070 P2 = P 1080 BII) = XX:S(I) = P2 - PI 1090 S(I) = S(I) I H 1100 NEXT 1110 RETURN

Page 21: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Programs 231

lRUH FN EVAlUATION N014 THE NO OF PARA"S= 2 GRADIENT CAlCS=8 BIIl= 0.5 FN =.028705741 BIII= 0.7 COEFF=.8317717 FN EVALUATION NOI COEFF=.689831749 GRADIENT CALCS=l FN =20.5 FNEVALUATION N015 COEFF=.5 6RADIENT CALCS=9 COEFF=.7 FN =.0275865741

COEFF=.837636146 FN EVAlUATION N06 COEFF=.698134952 GRADIENT CALCS=2 FN =2.06336416 FN EVALUATION N016 COEFF=.64559693 6RADIENT CALCS=10 COEFF=.555998938 FN =.0249911004

COEFF=.852374883 FN EVALUATION N09 COEFF=.720887921 6RADIENT CALCS=3 FN =.438546167 FN EVALUATION N017 COEFF=.92955768 GRADIENT CALCS=11 COEFF=.798230381 FN =.0210267683

COEFF=.874676951 FN EVAlUATION NOlO COEFF=.757765317 6RADIENT CALCS=4 FN =.423564151 FN EVALUATION N018 COEFF=.733021118 GRADIENT CALCS=12 COEFF=.596673681 FN =.0146130444

COEFF=.902775999 FN EYALUATION NOll COEFF=.807820817 6RADIENT CALCS=5 FN =.0994769478 FN EVALUATION N019 COEFF=.788153424 GRADIENT CALCS=13 COEFF=.644552029 FN =5.6447563E-03

COEFF=.933557974 FN EVALUATION N012 COEFF=.868023051 GRADIENT CALCS=6 FN =.0684814198 FN EVALUATION N020 COEFF=.859137235 6RADIENT CALCS=14 COEFF=.716062515 FN =1.87848705E-03

COEFF=.958881672 FN EVALUATION N013 COEFF=.918083769 GRADIENT CALCS=7 FN =.0306907852 FN EVALUATION N021 COEFF=.825135854 GRADIENT CALCS=15 COEFF=.681913677 FN =4.89762509E-04

Page 22: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

232

COEFF=.983692503 COEFF=.966154852

FN EVALUATION N022 GRADIENT CALCS=16 FN =1.51795138E-04 COEFF=.991676235 COEFF=.984330105

FN EVALUATION N023 GRADIENT CALCS=17 FN =5.3680833E-06 COEFF=.997989834 COEFF=.9958685

FN EVALUATION N035 GRADIENT CALCS=18 FN =5.3680833E-06 COEFF=.997989834 COEFF=.9958685

FN EVALUATION N040 GRADIENT CALCS=t9 FN =4.64069246E-06 COEFF=.997948812 COEFF=.995836005

FN EVALUATION N049 GRADIENT CAlCS=20 FN =4.64069229E-06 COEFF=.997948812 COEFF=.99S836004

FN EVALUATION HObO GRADIENT CALCS=21 FN =4.64069229E-06

Program 9

Mathematics for Seismic Data Processing

COEFF=.9979488t2 COEFF=.995836004

FN EVAlUATION N065 GRADIENT CALCS=22 FN =4.35884451E-06 COEFF=.997913901 COEFF=.995840544

FN EVALUATION N076 GRADIENT CALCS=23 FN =4.35884451E-06 COEFF=.997913901 COEFF=.995840544

FN EVALUATION NOGt GRADIENT CALCS=24 FN =4.33694836E-06 COEFF=.997917467 CDEFF=.995839032

FN EVALUATION H092 GRADIENT CALCS=25 FN =4.33694836E-06 COEFF=.997917467 COEFF=.995839032

NO FN EVALUATIOHS=102 NO GRADIENT CALCS=25 NU"BER OF FUNCTION CALLS 202 FUNCTION VALUE=4.33b94836E-06

1= 1 BII)=.997917467

1= 2 8(1)=.995839032

This is a simple program that integrates the function defined at line 160 using the trapezoidal rule with n points. Two values of n are illustrated. See also program 10 for Simpson's rule.

Page 23: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Programs

ll\ lUST

100 RE" INTEGRATION USING TRAPI ZODAl

110 RE" FN DEFINED IN 160 120 RE" lI"ITS A,B 130 INPUT I GIYE lONER lI"IT "jA

140 INPUT I GIVE UPPER ll"IT ";B

150 INPUT "NO OF POINTS "jN 160 DEF FN FIX) : EXP ( - X *

X ! 2) * 0.39894228 170 IC : IB - A) I N 180 S : 0 190 FOR I : 1 TO N - 1 200 X : A + I • IC 210 S : S + FN FIX)

Program 10

233

220 NEXT 230 S : S + t FN F(A) + FN FIB))

I 2 240 S : S • Ie 250 PRINT "INTEGRAL lS",S 260 END

JRUN SIYE lONER ll"IT -4 GIVE UPPER ll"IT 0

NO OF POINTS 25 INTEGRAL IS .499967192

JRUN GIVE LONER LI"IT -4 GIVE UPPER ll"IT 0

NO OF POINTS 50 INTEGRAL IS .499968043

This program integrates the function defined at line 150 using Simpson's rule with n points. Two values of n are used as illustration.

lUST

100 RE" SI"PSONS RULE 110 RE" INTE6ERAND IS DEFINED

ONLINE 150 120 RE" A,B ARE LI"ITS OF INTEG

RATION 130 RE" N IS THE NU"BER OF STRI

PS 140 RE" SI"PSONS RULE 150 DEF FN F(X) : EXP ( - X *

X ! 2) • 0.39894228 160 INPUT "LONER LI"IT ";A 170 INPUT "UPPER LI"IT ";B 180 INPUT "N: "iN 190 60SUB 1000 200 PRINT "INTEGRAL IS ";P 210 END 1000 D : (B - Al ! N 1010 P : 0:10: FN F(A) 1020 FOR I : 1 TO N

1030 11: FN FIA + 0.5 • D) 1040 A : A + D:Z2: FN FIA) 1050 P : P + D • (ZO + Z2 + 4 • Z

1) I 6 1060 ZO : Z2 1070 NEXT 1080 RETURN

lRUN LONER LI"IT -4 UPPER U"IT 0 N: 25 INTEGRAL IS .499968328

JRUN LONER U"IT -4 UPPER LI"IT 0 N: 50 INTEGRAL IS .499968329

Page 24: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

234

Program 11

Mathematics for Seismic Data Processing

This is a program which can be used to solve systems of equations and to find inverses. Essentially it uses elementary operations (in a rather clever way) to find the solution of

Ax=b

and is written to work for several different b's at the same time. If the b's are chosen to be the columns of the unit matrix then the solutions

are the columns of the inverse matrix. Note the tolerance asked for is used to ensure values close to zero are avoided in scaling.

lLIST

100 RE" GAUSS ElI"INATION 110 INPUT I N THE ORDER OF A";N 120 INPUT I P THE NU"DER OF R.H.

SIDES"iP 130 PRINT "NOW INPUT A,COlU"NWIS

E" 140 FOR I = 1 TO N 150 PRINT "COlU"N "iI 160 FOR J = 1 TO N 170 INPUT AIJ,I) 180 NEXT 190 NEXT 200 PRINT "NOW INPUT R.H.SIDES" 210 FOR I = I TO P 220 PRINT "COl NO. "jI 230 FOR J = I TO N 240 INPUT AIJ,N + I) 250 NEXT 260 NEXT 270 RE" NOW TO START 280 D = I: RE" DET INITIALISED 290 INPUT "SIVE TOLERANCE "jTl 300 FOR J = 1 TO N - 1 310 S = ADS IAIJ,J)):K = J 320 FOR H = J + 1 TO N 330 lF ADS IAIH,J)) ) S THEN S =

ADS IA(H,J)):K = H 340 NExT: RE" PIVOT SEARCH END

ED 350 IF K = J THEN SOTO 400 360 FOR I = J TO N + P 370 S = AtK,I):AtK,I) = AIJ,I):AI

J, Il = S

380 NEXT 390 D = - 0 400 D = D • AtJ,J) 410 IF ADS IAtJ,J)) < Tl THEN STOP

420 RE" STOPS HERE IF CO"P. SIN SULAR

430 FOR K = J + 1 TO N 440 AIK,J) = A!K,J) ! AIJ,J) 450 FOR I = J + 1 TO N + P 460 AtK,I! = A(K,I) - A(K,J) • AI

J,1) 470 NEXT 480 NEXT 490 NEXT 500 0 = 0 • AtN,N): RE" DET CO"P

UTED 510 IF ADS IAIN,N)) < = TL THEN

STOP 520 RE" AGAIN CO".SINGULAR 530 RE" •••••••••••••••••••• 540 RE" BACK SUBSTITUTION 550 FOR I = N + I TO N + P 560 AIN,I) = A!N,I) / AIN,N) 570 FOR J = N - I TO I STEP - 1

580 S = A(J,I) 590 FOR K = J + 1 TO N 600 S = 5 - A(J,K) • AtK,I) 610 NEXT 620 AiJ,I) = 5 / AIJ,J) 630 NEXT 640 NEXT 650 RE" PRINT SOLNS 660 FOR I = 1 TO P

Page 25: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Programs 235

b70 PRINT "NO."jI ?1 b80 FOR J = 1 TO N ?-1 b90 PRINT A(J,I + N) COLUItN 2 700 NEXT ?1 710 PRINT 13 720 NEXT ?2 730 END COLUItN 3 JRUN ?-1 N THE ORDER OF A3 12 P THE NU"BER OF R.H.SIDESI ?1

NON INPUT A,COLU"NNISE NON INPUT R.H.SIDES COLU"N 1 COL NO. 1 ?1 ?1 ?3 ?O ?4 ?O COLU"N 2 COL NO. 2 ?2 ?O ?1 ?1 ?-3 ?O COLU"" 3 COL NO. 3 ?1 ?O ?-2 ?O ?-1 ?1 NON INPUT R.H.SIDES GIVE TOLERANCE 0.001 COL NO.1 NO.1 ?2 .1 ?1 .3 ?3 -.5 GIVE TOLERANCE 0.001 NO.1 NO.2 1 .3 0 -.1 1 .5 JRUN N THE ORDER OF A3 NO.3 P THE NU"BER OF R.H.SIDES3

NON INPUT A,COLU"NMISE -.5

COLU"N 1 .5

?2 -.5

Program 12

This is a program for finding the eigenvalues and vectors of a real symmetric matrix using what is often called Jacobi's method. The input ensures that a symmetric matrix is supplied.

Page 26: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

236

lLIST

100 RE" JACOBI Al6 FOR EIGENYAL UES

110 INPUT· GIYE ORDER OF "ATRIX ·;N

120 PRINT ·THIS IS ONLY FOR SY"" ETRIC "ATRU·

130 DI" YIN,N),AIN,N): RE" A IS INPUT Y HOLDS EYECTORS

140 PRINT ·READ UPPER TRIANGLE C OLU"NIIISE·

150 FOR I = 1 TO N 160 PRINT ·COLUftN ·jI 170 FOR J = 1 TO I 180 INPUT AII,J): 190 IF J < I THEN A(J,I) = AII,J

)

200 NEXT 210 NEXT 220 60SUB 870 230 FOR I = 1 TO N 240 FOR J = 1 TO N:YII,J) = 0, NEXT

250 YU,1l = 1 260 NEXT 270 CO = 0 280 CO = CO + 1 290 IF CO < 30 THEN GOTO 340 300 PRINT ·STOPPED BY ITERATION

COUNT·: PRINT 310 60SUB 710 320 GOSUB 770 330 STOP 340 " = 0 350 FOR I = 1 TO N - 1 360 FOR J = I + 1 TO N 370 P = 0.5 • IAII,J) + A(J,I») 3809= AII,I) - A(J,J):T = SQR

(4 * P * P + 9 * g) 390 IF T • 0 THEN GOTO 500 400 IF 9 < 0 THEN GOTO 450 410 IF ABS (A(I,I)) = ABS IAII

,I) + 100 * ABS IP) THEN GOTO 430

Mathematics for Seismic Data Processing

420 GOTO 440 430 IF ABS IAIJ,J)) = ABS (AIJ

,J) + 100 * ABS IP)) THEN GOTO 500

440 C = S9R liT + g) ! 12 • T)): S = P / IT • C): GOTO 470

450 S = S9R liT - g) / 12 • TI) 460 IF P < 0 THEN S = - S 470 C = P ! IT • S) 480 IF ABS IS) ( > 0 THEN GOTO

520 490 GOTO 650 500 " = " + 1 510 GOTO 650 520 FOR K = 1 TO N 530 9 = A II , K I 540 AII,K) = C * 9 + S • AIJ,K) 550 AIJ,K) = - S * 9 + C * AIJ,K

)

560 NEXT 570 FOR K = 1 TO N 580 9 = AIK,I) 590 AIK,I) = C • 9 + S * AIK,J) 600 AIK,J) = - S • 9 + C * AIK,J

I 610 99 = VIK,I) 620 YIK,I) = C * gg + S * VIK,J) 630 VIK,J) = - S • 99 + C * VIK,

J)

640 NEXT 650 NEXT 660 NEXT 670 IF" < N * IN - 1) ! 2 THEN

GOIO 280 680 GOSUB 710 690 GOSUB 770 700 END 710 RE" PRINTE EI6ENVALUES 720 PRINT ·EI6ENVALUES ••• ·: PRINT

730 FOR I = 1 TO N 740 PRINT· ·;1;· ·jA(I,I) 750 NEXT 760 RETURN 770 RE" :PRINT EIGENYALUES

Page 27: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Programs 237

780 PRINT "EIGEN VALUES I '4 790 FOR I = 1 TO N ?5 800 PRINT 'VECTOR NO. "jl ?6 810 PRINT : 124 820 FOR J = 1 TO N 235 830 PRINT VIJ,Il 456 840 NEXT EIGENVALUES ••• 850 NEXT 860 RETURN 1 11.5640289 870 RE" TRACER 2 -.0573962428 880 FOR I = 1 TO N 3 -1.50663263 890 FOR J = 1 TO N EIGEN VALUES 900 PRINT A(J,I)j" "; VECTOR NO. 1 910 NEXT 920 PRINT .386153928 930 NEXT .530682311 940 RETURN .754494155 JRUN VECTOR NO. 2 GIVE ORDER OF "ATRIX 3

THIS IS ONLY FOR SYKKETRIC KATRIX -.62028727 READ UPPER TRIANGLE COLUKNWISE .754782185 COLUKN 1 -.213418736 ?1 VECTOR NO. 3 COLU"N 2 '1'1 -.682736294 :1..

?3 -.385590636 COLUKN 3 .620637587

Program 13

This program computes Binomial probabilities.

JlIST

100 REK PROSRAK 110 REK COKPUTES BINO"IAL PROBS

120 REK THE NU"BER OF TRIALS IS N

130 RE" P THE PROBABILITY IF SU CCESS

140 PRINT "BINOKIAL PROBABILITIE S"

150 PRINT: PRINT : 160 INPUT' GIVE N "jN 170 INPUT I GIVE P "iP

180 INPUT "NO OF DECIKAL PLACES "iFO

190 g = 1 - P 200 DII'! A(N) 210 DEF FN R(X) = INT iX • (10

.• FO) + 0.5) ! (to" FO) 220 IF P < g THEN 60SUB 410: GOTO

240 230 GOSUB 330 240 PRINT' I P(X=!) PO(=I

)": PRINT: 250 FOR I = 0 TO N 260 Y = Y + A!I)

Page 28: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

238

270 PRINT Iii "i FN RIAII)!;" "; FN RIY)

280 NEXT 290 PRINT "END OF RUN" 300 END 310 REH ••••••••••••••••••• 320 REH COHPUTES PROBS IF P)Q 330 XX : P i Q

340 A(O! : Q A N 350 FOR I : 1 TO N 360 A (I) : A I I - 1) • (N - I + 1)

• XX ! I 370 NEXT 380 RETURN 390 RE" ••••••••••••••••••• 400 RE" COHPUTES PROBS IFQ)P 410 X : Q I P 420 AIM) : PAN 430 FOR I : N TO 1 STEP - 1 440 AlI - 1) : Am • x • I ! (N -

I + 1)

450 NEXT 460 RETURN lRUN BINOHIAL PROBABILITIES

Program 14

Mathematics for Seismic Data Processing

GIVE N 17 GIVE P 0.37

NO OF DECIHAL PLACES 4 I PIX:Il P(X<=Il

0 4E-04 4E-04 1 3.9E-03 4.3E-03 2 .0182 .0225 3 .0534 .0759 4 .1099 .1858 5 .1677 .3535 6 .197 .5505 7 .1818 .7324 B .1335 .B659 9 .0784 .9443 10 .0368 .9811 11 .0138 .9949 12 4E-03 .99B9 13 9E-04 .9998 14 2E-04 1 15 0 1 16 0 1 17 0 1 END OF RUN

This program computes Poisson probabilities.

JlIST 200 GOSUB 280 210 PRINT I I PIX:!) PO<=I

100 REH COHPUTES POISSON PROBS !": PRINT: 110 REH THE NUHBER OF TRIALS IS 220 FOR I : 0 TO N

M 230 Y = Y + A(I! 120 REH P THE PROBABILITY IF SU 240 PRINT Ij" "i FN R(A(I)!j"

CCESS " j FN R(Y) 130 PRINT I POISSON PROBS. I 250 NEXT 140 PRINT : PRINT : 200 PRINT "END OF RUN" 150 INPUT I GIVE N "jN 270 END 160 INPUT • GIVE "EAN "jP 280 RE" ••••••••••••••••••• 170 INPUT "NO OF DECIHAL PLACES 290 RE" CO"PUTES PROBS IF P)Q

"jFO 300 A(O) = EXP ( - P) IBO DIH A(N! 310 FOR I = 1 TO N 190 DEF FN RlXl = INT (X • (10 320 All) = A(I - I! • P ! I

.• FO! + 0.5) ! (10 ... FO) 330 NEXT

Page 29: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Programs 239

340 RETURN 5 .0607 .1157 350 RETURN 6 .0911 .2068 JRUN 7 .1171 .3239 POISSON PROBS. 8 .1318 .4557

9 .1318 .5874 10 .1186 .706

GIYE N 18 11 .097 .803 GIYE "EAN 9 12 .0728 .8758

NO OF DECI"AL PLACES 4 13 .0504 .9261 I P(x=Il P(x(=Il 14 .0324 .9585

15 .0194 .978 0 lE-04 lE-04 16 .0109 .9889 1 1.IE-03 I. 2E-03 17 5.8E-03 .9947 2 5E-03 6.2E-03 18 2.9E-03 .9976 3 .015 .0212 END OF RUN 4 .0337 .055

Program 15

This program is a simple data analysis program. Given some data, here supplied by a random number generator, the program computes some sample statistics, prints the data in order of magnitude and plots a simple histogram.

Points of note are the recursive mean and variance estimation, lines 170 and 180, and the "Shell sort" algorithm starting at line 320.

llIST

100 RE" DATA INPUT 110 PRINT "SIVE THE NU"BER OF" 120 INPUT "DATA POINTS "jN 130 DI" XIN) 140 "E = O:VA = 0 ISO FOR I = 1 TO N 160 XII) = RND 12) * 10 170 VA = VA + III - 1) * IXII) -

~) A 2) I I

180 "E = II - 1) • "E + XIII,"E = fIE I I

190 NEXT 200 VA = VA I IN - II 210 PRINT ""EAN = ";"E 220 PRINT "VARIANCE = "iVA 230 RE" SORT FOR "EDIAN 240 60SUB 320 250 6 = N I 2 - INT (N I 2)

260 IS = INT IN I 2) 270 IF S } 0 THEN "D = XIIS + 1)

: SO TO 290 280 "D = IXIIS) + XIIS + 1)) I 2 290 PRINT ""EDIAN = ";"D 300 SOSUB 520 310 PRINT "END OF RUN ": END 320 RE" ••••• SHELL SORT ••••••••

330 RE" S,I,J,Jl,W 340 S = N 350 6 = INT IS I 2) 360 IF S = 0 THEN 60TO 490 370 FOR I = 1 TO N - 6 380 FOR J = I TO 1 STEP - 6 390 Jl = J + 6 400 IF XIJ) } XIJl) THEN 430 410 J = 0 420 aUTO 460 430 If = XlJ)

Page 30: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

240

440 I(J) = 1(11) 450 I(Jl) = " 460 NEXT 470 NEXT 480 SOTO 350 490 REft ••••••••••••••••••••••••

• 500 FOR I = t TO NI PRINT X(I). NEXT

510 RETURN 520 REft HISTDSRAII FREQUENCIES 530 INPUT "LONER END OF RAMSE";A

I 540 INPUT "UPPER END OF RANSE";B

X 550 INPUT "NO OF INTERVALS";II 560 IF IX ) 20 ThEN IX = 20 570 Dlft Flm 580 RI = BX - AX 590 FOR I = 1 TO N 600 PX = XII) - AX:PI = PI I RX 610 PX = INT IIX • PX) 620 FIPX) = F(PX) + 1 630 NEXT 640 RE" NON PLOT 650 FOR I = 0 TO IX 660 PRINT "!"; 670 IF Fill = 0 SOTO 710 680 FOR J = I TO Fill 690 PRINT "'"; 700 NEXT 710 PRINT 720 NEXT 730 RETURN

JRUN GIVE THE NUftBER OF DATA POINTS 20 ftEAN = 6.27661226 VARIANCE = 7.5952495

Program 16

Mathematics for Seismic Data Processing

.569998023

.609974674 3.26050515 3.71763383 4.3B754545 4.73742943 4.84409365 5.49798409 6.46748403 6.89944903 7.022541K14 7.35606948 7.72387781 7.9535178 8.47421985 8.6852196 B.92224367 9.13709861 9.61442052 9.65093233 ftEDIAN = 6.96099853 LONER END OF RANGEO UPPER END OF RAN6EI0 NO OF IHTERVAlS12 !U

!t ! • ! ... ! • !. !u. !U !UU !U

END OF RUN

This program generates random numbers from the Binomial distribution with n = 4 and p = 0.4. The sample frequencies are compared with the theoretical ones.

Page 31: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Programs

JLIST

100 RE" BIN GENERATOR 110 INPUT 'SA~LE SIZE 'jREP 120 DI" AIREP) 130 FlO) = 0.1296 140 Fll) = 0.4752 150 F(2) = 0.8209 160 F(3) = 0.9744 170 F(4) = 1.0000 180 FOR I = 1 TO REP 190 X = RND (9) 200J= -1 210 J = J + 1 220 IF X ) FIJ) SOTO 210 230 CIJ) = CIJ) + 1 240 Am = J 250 NEXT 260 FOR I = 0 TO 4 270 X = CII) J REP

Program 17

280 Z = I + X 290 PRINT Ij" "jFII);" "jCII);'

";X;" "iZ 300 NEXT 310 PRINT "SA"PLE' 320 FOR I = 1 TO REP 330 PRINT All);" "j

340 NEXT 350 END

JRUN SA"PLE SIZE 20 o .1296 4 1 .4752 7 2 .8209 8 3 .9744 1

o I

.2 .2 .35 .55 .4 .95 .05 1

241

1 0 2 2 2 2 320 1 200 1 1 1 1 122

This is a departure for our original self imposed brief but we couldn't resist the temptation to include a drunkard's walk. The lines 150, 340 contain code to plot using an Apple II micro. F is a scale parameter.

JUST

100 REI'I DRUNKARDS WALK 110 INPUT "SIVE NO OF STEPS";N 120 INPUT IF"iF 130 PX = O:PY = 0 140 VI = 80:11 = 140 150 HSR l HCOLOR= 3 160 FOR I = I TO N 170 D = RND (9) 180 DI = RND (9) 190 PX = OlPY = 0 200 IF D < 0.5 THEN SOTO 240 210 PX = 1 220 IF DI < = 0.5 THEN PI = -

1 230 SOTO 260 240 PV = 1

250 IF Dl < = 0.5 THEN PY = -1

260 CX = CX + PXley = CV + PV 270 X = ex * FlY = CV * F 280 Y = 80 - V 290 X = 140 + X 300 IF X < 0 THEN SOSUS 380 310 IF Y < 0 THEN 60SUB 380 320 IF X ) 279 THEN SOSUB 380 330 IF Y > 159 THEN 60SUB 380 340 HPLOT XI,Yl TO X.Y 350 Yl = YlXl = X 360 NEXT 370 END 380 RE" ENDER 390 VTAB (24); PRINT "END OF 6RA

PH"j 400 STOP 410 RETURN

Page 32: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

242

JRUN GIVE NO OF STEPS400 F4

Program 18

Mathematics for Seismic Data Processing

We have chosen to give a fairly standard FFr program and this one follows the original form due to Cooley and Tukey. There are others which are slicker but more obscure.

This program is devised for powers of two and expects a data series with real part RA(I) and imaginary part IA(I) which are supplied on line 160. The transform is computed and then the transform ofthe complex conjugate of the transform. As we expect we retrieve our original series times a constant.

JLIST

100 RE" FFT TEST 110 INPUT"" "j" 120 N = 2 ... " 130 PRINT"" = "j"j" N= "jN 140 DI" RAINl,IAIN) 150 FOR I = 1 TO N 160 RAIIl = I

170 NEXT 175 GOSUB 1000 180 GOSUB 2000 190 GOSUB 1000 195 FOR I = 1 TO NIIAII) = - IA

(f)INEXT 199 PRINT "BACKNARDS": PRINT : 200 GOSUB 2000 210 60SUB 1000

Page 33: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Programs

220 END 1000 RE" PRINTER 1010 FOR I = 0 TO N 1020 PRINT Ij" "jRAtI),IAtl) 1030 NEXT 1040 RETURN 2000 RE" FFT AFTER COOLEY & TUK

EY 2010 NV = N / 2 2020 N" = N - 1 2030 J = 1 2040 FOR I = 1 TO N" 2050 IF I ) = J SOTO 2100 2060 IT = IA (J)

2070 RT = RA (J)

2080 RAtJ) = RAtl) 2090 IAtJ) = JAIl) 2092 RA (I) = RT 2094 lAm = IT 2100 K = NV 2110 IF K > = J THEN SOTO 2150

2120 J = J - K 2130 K = K ! 2 2140 SOTO 2110 2150 J = J + K 2155 NEXT 2160 PI = 3.1415927 2170 FOR L = 1 TO " 2180 LE = 2 A L 2190 Ll = LE ! 2 2200 RU = 1.0 2210 IU = 0.0 2220 RN = COS tPI / Ll) 2230 IN = SIN tPI / LI) 2240 FOR J = 1 TO Ll 2250 FOR I = J TO N STEP LE 2260 IP = I + Ll 2270 RT = RAtIP) • RU - IAtIP) *

IU 2280 IT = IAtIP) • RU + RA(IP) •

IU 2290 RAtIP) = RAtl) - RT 2300 IA(IP) = IAII) - IT 2302 RAtl) = RAtl) + RT

2304 IAtl) = IAtl) + IT 2310 NEXT

243

2312 91 = IU * IN;92 = RU * RN;93 = IU • RN;94 = RU • IN

2314 RU = 92 - 91 2316 IU = 93 + 94 2340 NEXT 2350 NEXT 2360 RETURN JRUN " 4 " = 4 N= 16 000 1 1 0 220 3 3 0 440 550 b 6 0 7 7 0 880 990 10 10 0 11 11 0 12 12 0 13 13 0 14 14 0 15 15 0 16 16 0 000 1 136 0 2 -7.99999913 -40.2187153 3 -7.99999953 -19.3137084 4 -7.99999914 -11.972846 5 -7.99999981-8 6 -7.99999965 -5.34542922 7 -7.99999965 -3.31370864 8 -7.9999992 -1.59129925 9 -8 0 10 -8 1. 59129879 11 -8.00000009 3.31370836 12 -8.00000007 5.34542864 13 -8.00000019 8 14 -8.00000042 15 -8.00000074

11.972846 19.3137087

Page 34: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

244

16 -8.00000239 BACKWARDS

40.2187163

0 0 0 1 16 7. 4505806E-09 2 32.0000005 3. 68739381E-07 3 47.9999999 -1.71712605£-08 4 64.0000001 -1. 95979044E-07 5 80.0000005 3. 72529149E-08 6 96.0000007 -9.91920048E-08 7 112.000001 8.08504415E-08 8 128 -8. 97791664E-08

Program 19

Mathematics for Seismic Data Processing

9 144 7. 4505806E-0'I 10 160 -1.8318566E-07 11 176 1. 71712595E-08 12 192 -5. 35448974E-08 13 208 -5. 21540761E-08 14 223.999999 -1.35746416E-07 15 240 -8.08504405E-08 16 255.999999 3.88687806E-07

This program will compute the gain and phase of a given filter. It is very much better with plotting. You must supply the program with the coefficients of the filter polynomial, A(l) ... A(LAGS). The frequency range is expected to be between multiples of pi.

If the filter inverse is wanted this can be provided.

lLIST

100 RE" FILTER PR06RA" 110 6X : 20 120 INPUT "NO. OF LASS: "jN 130 DI" AIN),6ISX),PI6X),PLI6X) 140 DI" DISXl 150 PRINT "NON INPUT COEFFS "j

160 PRINT: PRINT 170 FOR I : 1 TO NI INPUT" All)

"jAm: NEXT 180 PRINT "ECHO CHECK " 190 FOR I : 1 TO N 200 PRINT' AI";I;'): 'jAII) 210 NEXT 220 PRINT "OK ••• TO PROCEED ••• • 230 PRINT 'FRE9UENCY FRO" WI TO

W2 " 240 PRINT "JUST 61VE THE ~LTIPL

E OF PIE" 250 INPUT" WI: ";Wl: INPUT" N2

: "jW2 260 WI : WI • 3.14159:W2 : W2 • 3

.14159 270 EP : IW2 - WI) I ex

280 N : WI 290 FOR J : 0 TO ex 300 Y : O:Z : 0 310 FOR K : 1 TO N 320 X : AIIO 330 V : V + X' COS IK • N) 340 Z : Z + X' SIN IK • W) 350 NEXT 360 61J) : V • V + Z • Z 370 IF Z ( > 0 THEN PIJ): ATN

IV I Zl 380 N : N + EP 390 NEXT 400 PRINT 'IF INVERSE USE TYPE V

ES" 410 INPUT 'WELL ? •• ·;9$ 420 IF 9$ < } 'VES' SOTO 470 430 FOR I : 0 TO 6X:6(1) = I ! 6

m 440 P(I): - P(I) 450 NEXT 460 PRINT: PRINT "INVERSE RE9UE

STED •• • 470 PRINT ·SAIN •••• • 480 PRINT 'FRE9UENCV SAIN'

Page 35: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Programs

490 II = III 500 FOR I = 0 TO SX 510 PRINT N;' ';SII) 520 II = II + EP 530 NEXT 540 SET AS 550 PRINT 'PHASE ••••• SbO N = N1 570 PRINT' FREUUENCY •••••• PHASE

580 FOR I = 0 TO 6X 590 PRINT N;' ';PII) 600 N = N + EP 610 NEXT 620 SET AS 630 HO"E 640 STS = ·SAIN ••• • 650 FOR I = 0 TO 6X:D(I) = SII):

NEXT 660 STS = ·PHASE •••• • 670 FOR I = 0 TO 6X:D(I) a P(I):

NEXT 680 RE" tt*t PLOTTIN6 HERE* •••••

690 HO"E 700 TEXT 710 PRINT 'THAT'S AlL FOLkS ••• • 720 END 730 "A = D(O):"I = "A 740 FOR I = 1 TO 6X 750 IF-"A < 0(1) THEN "A = D(I) 760 IF "I) 0(1) THEN "I = D(I) 770 NEXT 780 R = "A - "I 790 FOR I = 0 TO SX 800 PL(I) = 160 - INT (((0(1) -

"I) * 150) I Rl 810 NEXT 820 OY = 160 - INT i((O - "I) •

150) I R) 830 OX = INT (N1 ! EP)IOX = - 0

X

840 RETURN

lRUN NO. OF LASS = 4 NON INPUT COEFFS

Am 0.25 Am 0.25 Am 0.25 Am 0.25

ECHO CHECk AIl)= .25 A(2)= .25 A(3)= .25 A(4)= .25

OK ••• TO PROCEED ••• FREQUENCY FRO" N1 TO 112 JUST 61VE THE "ULTIPLE OF PIE

IU= 0 N2= 1

IF INVERSE USE TYPE YES IIELL ? ... SAIN •••• FREQUENCY o 1 .1570795 .314159 .4712385 .628318 .7853975 .942477 1.0995565 1.256636 1.4137155 1.570795 1.7278745 1.884954 2.0420335 2.199113 2.3561925 2.513272 2.671\3515 L.827431 2.9845105 3.14159

6AIN

.969523123 .882373788 .750628444

.592009056 .426777378

.274283868 .149839713

.0625004559 .0141502105

8. 78525569E-13 .0103215865

.03299125' .05bZb80695

.0711082419 .0732233648

.0625002154 .0432648653

.0221351976 6.00537332E-03

1.75717995E-12

245

Page 36: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

246

PHASE .... FREQUENCY •••••• PHASE

o 0 .1570795 .314159 .4712385 .628318 .7853975 .942477 1.09955b5 1.256636 1.4137155 1.570795 1.7278745

1.17809758 .785398827 .392700077

1.32616363E-06 -.392697424

-.785396174 -1.17809493

-1.57079368 1.17810023

.7852606 • 392702725

Program 20

Mathematics for Seismic Data Processing

1.884954 2.0420335 2.199113 2.3561925 2.513272 2.6703515 2.827.31 2.9845105 3.14159 0

3.97507172E-06 -.39269477

-.785393521 -1.17809227

-1. 57079102 1.17810288

.785404129 .392705375

THAT'S AlL FOLKS •••

Often one wishes to manipulate polynomials when using filters. This pro­gram will untangle discrete time series as follows.

Suppose that

A(z)f(z) = B(z)g(z)

Then the program will find the coefficients of the polynomial

C(z) = A-1(z)B(z)

A(z) is the AR part of a polynomial of order p and B(z) is the MA part of order q, i.e.

i=O

q .

B(z)= L bjz' ;=0

JlIST 190 FOR I = 0 TO P 200 INPUT "AII)= "jAII)

100 RE" FINDS "A 210 NEXT 110 PRINT "NEED 3 PLOYNO"IALS" 220 FOR I = 0 TO P 120 INPUT "GIVE ORDER OF AR"jP 230 PRINT "AI "jl j")= "jAII) no INPUT "GIVE ORDER OF "A"ja 140 INPUT I NO OF TER"S NEEDED I 240 NEXT

jN" 250 PRINT "INPUT "A COEFFS· 150 N = a 260 FOR I = 0 TO a 160 IF P > 9 THEN N = P 270 INPUT I BII)= "j8II) 170 DI" AIN),BIN),PIN"} 280 NEXT 180 PRINT • AR. POLYNO"IAL COEFF 290 FOR I = 0 TO a

ICIENTS· 300 PRINT I 8(l jl j") = "j8(1)

Page 37: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Programs

310 NEXT 320 PIO) = BIO) I AIO) 330 FOR I = I TO Nil 340 S = 0 350 FOR J = I TO I 360 K = I - J 370 IF J ) N THEN DU = 0: SOTO 3

90 380 DU = AIJ) 390 S = S + PIK) • DU 400 NEXT 410 IF I ) N THEN PII) = - S !

A (0): SOTO 430 420 pm = Bm - S:P(l) = pm !

A(O) 430 NEXT 440 PRINT "II.A. REP •••• • 450 FOR I = 0 TO Nil 460 PRINT" PI"iIi")= "jP(I) 470 NEXT 480 END

JRUN NEED 3 PLOYNOIIIALS GIVE ORDER OF AR3 GIVE ORDER OF IIA4

NO OF TERIIS NEEDED 12 AR. POLYNOIIIAL COEFFICIENTS

Am= 1 Am= 0.3

Program 21

A (I) = 0.7 A(I)= 0.2 AI 0)= A( 11= .3 A( 2)= .7 AI 3)= .2 INPUT I!A COEFFS 8(l)= 1 81Il= 0.2 8m= 0.3 8m: 0.4 8m: 0.9 B(O) : 1 8111 = .2 B(2) : .3 B(3) : .4 B(4) : .9

II.A. REP .... P(o): 1

P(ll: -.1 P(2)= -.37 P(31= .381 P(4): 1.0647 PIS): -.51211 PIli): -.667857 pm= .3458941 PIS): .46615367 P(9)= -.248400571 PIIO)= -.320966218 P(ll): .176939531 P(12): .221274607

247

This program gives the recursive method ascribed to Levinson for estimating the filter coefficients for a Wiener filter. This is discussed in Chapter 9. For this simple case the correlations are supplied in the program.

JLIST

100 REI! :TOEPLITZ TESTER 110 REII: CORRELATIONS ARE IN RI

1)

120 DIll PHI9,91,RII0) 130 RIO) = I:RII) = 0.B06 140 R(2) = 0.42B:R(31 = 0.070

ISO R(4) = 0.01:RI51: - O.Ol:R( 6) : 0.02

160 R(71 : O.OI:RIB): - 0.001 170 PRINT "SIVE ORDER OF IIATRIX

180 INPUT "Dl"=";NO 190 IF NO ) 10 THEN GOTO 270

Page 38: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

248

200 IF NO = I THEN PRINT R(ll: 60TO 260

210 IF NO < 1 THEN 60TO 270 220 60SUB 290 230 FOR I = 1 TO NO 240 PRINT Ii" "iPH(NO,I) 250 NEXT 260 60TO 180 270 PRINT "PR06RA" END": 280 END 290 RE" :TOEPlITZ RECURSION 300 PH(I,I) = R(l) 310 FOR I = 2 TO NO 320 DX = OlDY = 0 330 FOR J = 1 TO I - 1 340 DX = PH!I - I,J) • R(I - J) +

DX 350 DY = PH!I - I,J) • R(J) + DY 360 NEXT 370 PH(J,Il = IRm - Dx) i II -

DY) 380 FOR J = I TO I - 1 390 PH(I,J) = PHil - J,J) - PHil,

II * PHil - 1, I - J) 400 NEXT 410 NEXT 420 RETURN

Program 22

Mathematics for Seismic Data Processing

JRIIN GIVE ORDER OF ~TRIX DI"=4 1 1.23163107 2 -.455699002 3 -2.31438685 4 1.69420738 DI"=5 1 3.01352816 2 -2.53858417 3 -.479285322 4 1.29537851 5 -1. 05175855 DI"=9 1 2.32118233 2 -4.37933773 3 -.494J141014 4 1.29569952 5 .0119352533 6 -3.17087649E-03 7 8.27713829E-03 8 .0164944491 9 -7.1073405E-03 DI"=O PR06RA" END

This program gives the recursive method ascribed to Levinson for estimating the filter coefficients for a Wiener. Unlike the simple version in program 21 this program has some extra wrinkles. Firstly it simulates a second order stationary process x(t) using the generating model ascribed to the sunspot series. Then it computes the correlations. The method used is direct and is quite slow on a micro (an FFT based routine might be better).

Given the correlations the filter coefficients can be found recursively where the assumed filter length is supplied. You will notice this is precisely predictive deconvolution with on step prediction. The extension to several steps is fairly easy.

lLlST

100 RE" ,SERIES 6ElERATOR 110 INPUT 'SERIES LENGTH";N 120 INPUT "NO OF CORRELNS';NC 130 NN = N + 12

140 DI" R!NC),XINN) 150 RE" :FIRST SI~lATE SERIES 160 FOR I = 2 TO NN 170 X III = 1.32 • X (I - 1) - 0.63

* XII - 2) + RND (9) 180 NEXT

Page 39: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Programs

190 FOR I = 1 TO N:XII) = XII + 12): NEXT

200 PRINT: PRINT "SERIES GENERA TED": PRINT

210 RE" :NON CO"PUTE CORRELATION S

220 XX = 0 230 RIO) = 1 240 FOR I = 1 TO N 250 XX = xx + XII) • XII) 260 NEXT 270 FOR I = 1 TO NC 280 XS = 0 290 FOR J = 1 TO N - I 300 XS = XS + XIJ) • XIJ + II 310 NEXT 320 RII) = XS ! XX 330 NEXT 340 RE" :PRINT CORRELNS. 350 FOR I = 0 TO NC: PRINT Ii"

"iRII): NEXT 360 RE" :NIENER FILTER USING 370 RE" LEVINSON RECURSION 380 RE": CORRELATIONS ARE IN RI

J)

390 PRINT "GIVE ORDER OF "ATRIX

400 INPUT "Dl"=";NO 410 IF NO ) NC THEN GOTD 490 420 IF NO = 1 THEN PRINT Rll): GOTO

480 430 IF NO < 1 THEN SOTO 490 440 SOSUB 510 450 FOR I = 1 TO NO 460 PRINT Iii "jPHINO,I) 470 NEXT 480 SOTO 400 490 PRINT "PROSRA" END": 500 END 510 RE" :TOEPLITZ RECURSION 520 PHll,l) = Rll) 530 FOR I = 2 TO NO 540 OX = OlDY = 0 550 FOR J = 1 TO I - 1 560 OX = PHIl - I,JI * RII - J) +

OX

570 DY = PHil - 1,J) • RIJI + DY 580 NEXT 590 PHIl,}) = IRIII - OX! ! 11 -

DY! 600 FOR J = 1 TO I - 1

249

610 PHII,J) = PHil - J,J) - PHIl, }) • PH (J - 1, I - J)

620 NEXT 630 NEXT 640 RETURN

JRUN SERIES LEN6TH64 NO OF CORRELNS12

SERIES GENERATED

o 1 1 .937597326 2 .850968041 3 .770074649 4 .715543398 5 .695582979 6 .690695288 7 .700835561 8 .713462715 9 • 729638382 10 .741111904 11 .753310002 12 .140191527 GIVE ORDER OF ~TRIX DI"=3

1.16522928 2 -.0415635165 3 .0411571131 01"=7 1 -4.63736286 2 1.06696384 3 -\. 92516782 4 .0298389376 5 -.258639504 6 .22046817 7 .0583621423 DI"=O PROGRA" END

Page 40: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Addition 53,79, 168 in scientific notation 24-25 of angles 8 of functions 54 of matrices 92, 93 of vectors 90

Aliasing 183-87 Amplitude 13, 154, 171, 197 Angles 7-9, 14,27, 149 Angular frequency 12-13, 171 Anti-wavelet 205 Aperiodic functions 158 Approximations 41-43 Area under a graph 51 Area under a parabola 56 Argand diagram 82 Argument 82 Arithmetic series 216 ARMA (autoregressive moving average

model) 180, 193 Arrays 89, 91 Augmented matrix 101, 102, \05-7 Autocorrelation 175, 181, 186 Autocorrelation function 175, 203 Autocovariance 186 Autocovariance function 175, 183, 203 Autoregressive estimate 195 Autoregressive model 180, 191 Autoregressive moving average model

(ARMA) 180, 193 Averaging filter 192

Band-limited white noise 176 Band-pass filter 189 Base numerals 21 BASIC 141, 218 Bayes theorem 119 Binary notation 21-23, 25, 26

251

INDEX

Binomial distribution 121-123, 131, 144, 145, 241

Binomial probability 238 Binomial theorem 216 Boolean algebra 26 Boundary conditions 73 Brownian motion 179

Calculus differentiation 27-50 formulae 217 integration 51-78

Cauchy-Riemann equations 87 Central conic 110 Central Limit Theorem 145-46 Chain Rule 34, 75 Choleski decomposition algorithm 227 Circle 109 Coefficients 24, 93 Column-vector 90 Combinations 119-21 Complex conjugate 80, 100 Complex function 29

differentiation 86-88 integration 86-88

Complex numbers 79-88, 93 references 212

Complex variables 83-86 Compound statement 25 Computer languages 15 Computer programs 218-52 Computer techniques 89, III Conditional probability 118 Confidence intervals 144-47 Conformability 95 Conjugate functions 87 Constants 2, 32, 42, 53, 56, 57, 74, 76, 77, 93 Continuous functions 177, 182

Page 41: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

252

Convolution 3, 157, 159, 161, 165, 167, 182, 190, 191, 195, 198, 199,206

Coordinates 90 Correlation 133, 138 Correlation coefficient 175 Cosec 11 Cosine 7, 29, 84, 149, 150, 152 Cot 11 Covariance 133 Cross-correlation function 203-4 Cross-correlation generating function 204 Cumulated process 178 Cumulative distribution 125

Daniell window 195 Data analysis program 240 Data processing 89, 90 Data samples 134-37 Decay 175 Decimal notation 21-23 Decimation

in frequency algorithm 169 in time algorithm 169

Deconvolution 195, 200, 208 Deconvolution filter 204, 205 Definite integral 53 Degree of differential equation 74 Delay 199,204,205 Delta function 160, 178, 183 Density function 131, 132, 182 Derivatives 31, 32

see also Higher derivatives; Partial deriva-tives

Diagonal matrix 97 Differential coefficients 47 Differential equations 47, 73-78

degree of 74 general solution 75 particular solution 75

Differentiation 27-50, 75, 180 complex functions 86-88 introduction 27-35 references 212 relationship with integration 54-60

Diffusion equation 48 Digital filters 191-93 Discrete Fourier transform (DFT) 163-68,

198 Discrete series 193 Discrete time 180, 181, 191-93 Discrete time series 183, 247 Division 81 Dot product 100 Double integral 71

Double integration 63-66 Drunkard's walk 242 Duality 79, 161 Dummy variable 51

Echelon matrix 102 Eigenvalues 77,108-9, 111,236 Eigenvectors 108-9 Electric circuits 26 Electric current 172 Electromagnetic theory 68 Elementary row operations 102 Ellipse 109-11 Ensemble 114 Ensemble average 181 Equation of motion 179 Ergodic theorem 181 Errors 138, 144-46, 205, 206, 208 Estimate 136, 138 Estimation 193-95 Even functions 152 Event 116 Expected value 130, 132

Index

Exponential distribution 130, 131 Exponential functions 14-16,84,85, 165

Fast Fourier transform (FFT) 168-70, 195, 243,250

Filter coefficients 248, 250 Filters 174, 188-95,202,208,245,247 Finite data filter 193 Finite discrete Fourier transform 163 Floating point representation 24 Flow lines 73 Fourier analysis 13, 149-73

examples of 152-54 references 213

Fourier coefficients 152, 153, 156 Fourier series 60, 78, 149-57 Fourier transform 149, 158-62, 182, 190 Frequency 85, 171-73 Frequency domain 171, 174 Frequency domain analysis 156 Function value 15 Functions 1-26,27,32,35,43,46,51,52,66,

80,149 addition of 54 BASIC programs 218-52 graphs of 15 integral of 53 matrices as 98-100 new from old 20 of two variables 83, 225 random variable as 116

Page 42: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Index

Functions (cont.)

references 211 special types of 152

Fundamental Theorem of Calculus 55

Gain 189, 245 Gauss Elimination Method 106 Gaussian distribution 127 Generalised function 160 Geometric series 163, 168,216 Ghost elimination filter 202 Gibbs phenomenon 154 Graphs 12

area under 51, 56 of functions 15

Gravimetric effects 72 Gravitational theory 68 Green's theorem 70-72

Harmonic functions 87 Harmonics 77 Heaviside function 4, 31 Hexadecimal notation 21-22 High pass filter 190 Higher derivatives 35-40 Higher order partial derivatives 46-48 Histogram 135, 137 Homogeneous equations 108 Hyperbola 109

Identity (or unit) matrices 96 Image processing 150 Imaginary part 79, 83, 84 Inconsistency 106 Indefinite integral 56 Independence 118 Infinite sequences 3 Integer 6 Integrals 56, 58, 60, 61, 76, 88, 150, 152, 161,

184-85 double 66, 71 line 66-73 of functions 53 triple 66

Integration 51-78,180 complex functions 86-88 double 63-66 numerical 61-63, 71-73 references 212 relationship with differentiation 54-60 repeated 63

Inverse 80, 81, 106 Inverse Fourier transform 158

Inverse functions 16-19,34, 158 trigonometric 18-19

Inverse sine 19 Inverse tangent 19 Inverse transform 164, 182 Invertibility 106 Invertible matrix 97

Jacobi's method 236 Joint density function 129 Joint distribution 128-29, 133

Kalman filter 119, 194

Laplace's equation 48, 87 Leading diagonal matrix 97 Leading term 2 Line integrals 66-73 Linear equations 74, 100-8, 207 Linear filters in discrete time 191-93 Linear functions 99 Linear problems 89, 99 Linear process 178 Local maxima and minima 38 Log tables IS Logarithms 15, 18, 85, 88, 215 Logic 26 Low pass filter 190

Marginal distribution 129 Markov process 177, 187

continuous time 187 discrete time 187

Marquardt's method 226 Mathematical models 43 Matrices 89-111, 227

addition of 92, 93 as functions 98-100

253

definitions and elementary properties 89-91 examples 91-93 introduction 89 multiplication of 93-96 notation of 92, 93 references 212 special types of 96-98

Matrix inversion 208 Maximum delay 199,204,205 Maximum entropy 195 Mean 130, 131, 145, 146 Median 136 Mesh 71-73 Mesh cells 72 Mesh point 71 Minimum delay 199,200, 204, 205

Page 43: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

254

Modulus 80 Moments 129-34 Monotonic functions 66 Monte Carlo methods 141-44 Multiple time series 174 Multiplication 18, 23-25, 79, 81, 85, 93-96,

168

Natural numbers 51, 56 Negative case 53 Negative exponential distribution 126 Negative indices 3 Newton-Raphson algorithm 223 Newton's approximation method 41 Non-linear least squares program 226 Non-singular matrix 97 Non-square matrix 98 Normal distribution 127, 130, 131, 145, 146 Normal equations 139 Numbers 20-26, 79 Numerical integration 61-63,41-73 Numerical processing 2 Nyquist frequency 185, 186

Odd functions 152, 153 Optimisation 48-49 Ordinary differential equations 47 Orthogonal matrix 97, 100, 109 Orthogonal vectors 100 Orthogonality relations 150

Parameter 70 Parametric form 70 Parseval's theorem 157 Partial derivatives 43-46, 206, 207

higher ·order 46-48 Partial differential equations 76, 78 Period 171 Periodic convolution 167 Periodicity 165 Periodogram 195 Permutations 119-21 Perpendicular vector 100 Phase 13, 154, 171, 189,245 Phase shift 189, 192 Point of inflection 39 Poisson distribution 122-28, 131, 147 Poisson probability 239 Polar coordinates 47, 84-85 Polar form 82 Polynomial degree 2 Polynomial functions 83

Index

Polynomials 2-6, 23, 68, 180, 190, 198,247 program 221 references 211

Power functions 15, 17 Power spectrum 181-83 Precision 147 Prediction filter equation 209 Predictive deconvolution 204-9, 250 Primitive 56, 59, 88 Probability 115-19, 143, 145-47 Probability density function 125 Probability distribution 121-28, 130, 132, 175 Product 94, 95 Pure noise series 183 Purely random process 176-79, 187 Pythagoras' theorem 8, 82

Quadratic form 109-11 Quadrature methods 63 Queue 147, 148 Queueing theory 124

Radians 7, 14, 18,30, 149, 164 Random digits 141 Random numbers 141, 143,241 Random variable 115, 116, 132, 141, 174 Random walk 177 Rate of change 27 Rational functions 20 Rational spectrum 190 Real numbers 79-81 Real part 79, 83, 84 Realisation 114 Recursion 208 Recursive method 248, 250 Reduced echelon matrix 102, 105 Reduced row echelon matrix 107 Regression 139 Root 4,85 Rosenbrock's banana-vaHey function 48 Row reduced form 102 Row-vector 89-91

Saddle point 48 Sample space 115 Sampling 183-87 Sampling interval 183 Sampling rate 183 Sampling theorem 185 Scalar multiplication 90, 93, 100 Scalar product 100 Scientific notation 24 Sec 11 Second order stationary process 175, 250

Page 44: REFERENCES TO APPLICATIONS - Springer978-94-011-7767-2/1.pdf · REFERENCES TO APPLICATIONS ... Deconvolution of Geophysical Time Series in Exploration for Oil and Natural Gas, Elsevier.

Index

Separable equations 73 Separation of the variables 77 Set of solutions 101 Shell sort algorithm 240 Simple Harmonic Motion 75, 77 Simpson's rule 63, 127, 153,234 Simulation 141-44 Simultaneous linear equations 93 Sine 7, 19,60,84, 149, 150, 152, 183 Sine curve 12 Sine wave 13,76, 153 Singular matrix 98 Skew-symmetric matrix 97 Slope function 30 Slope of curve 27 Slope of surface 44 Solution set 101 Spectral analysis 173 Spectral window 194 Spectrum 154-55, 183, 185, 186 Spread 130 Square matrix 95, 97, 98 Square root 85 Square wave 160 Stacking 200 Standard normal distribution 127 Stationarity 191 Stationary series 174-83, 207 Statistical tables 121 Statistics 144 Step function 4, 59 Stochastic independence 118 Stochastic processes 114, 115, 147-48, 174 Subtraction 79 Summation 61, 152 Symmetric matrix 96, 97, 109, 110 Symmetry 130

Tangent 7, 19,27 Taylor series 41-43 Ternary notation 21-22 Time and frequency relation 85 Time average 181 Time series 112, 114, 174-96

references 213

255

Time series models 188 Toeplitz matrix 194,208 Transfer function 189 Transforming procedure 106 Transpose 96 Trapezoidal rule 61 Trigonometric formulae 85, 215 Trigonometric functions 7-14, 29, 60, 70, 76,

84 inverse 18-19 references 211

Truth table 25 Turning points 38-39 "Twiddle factor" 169, 179

Uniform distribution 144 Unitary matrix 100, 110

Variables 43~ 45, 46, 66, 93 separation of 77 two 83, 138-40,225

Variance 130, 131, 136, 137, 145, 146 Vector time series 174 Vectors 89, 91, 100,236

addition of 90 dimension of 90 notation 90

Vibrating string 76

Walsh functions 150 Wave equation 48, 76 Wave theory 13 Wavelength 13 Wavelet analysis 197-204 Weakly stationary series 181 White noise 176-78, 190 Wiener filter 194,207,248 Wiener process 178-79 Wiener-Khintchin equations 182

Yule-Walker equations 194, 207

z-transform 3, 162-63, 198,200,202,204,206