IDL> tst39, myCase, tdSeed, tdMat, satLocwhere myCase is the test case you wish.

The other items are explained in the **INPUTS** section below.

All inputs are optional, but to get to the second input, you have to provide the first.

- myCase: The test case chosen. This is a scalar. See the list of cases below.
- tdSeed: The time delay used in the test cases. This is a scalar.
- timeDelayMatrix: is a NxN matrix of the relative time delays of the events. This is a NxN matrix, where N is the number of satellites. Since the satellites must not be co-planar, you must have at least 4 satellites. This can be constructed by you by taking the dot product of the slowness vector and the vector differences of each pair of satellite locations.
- satelliteLocations: The space delay array, i.e. a NxN array 3d vectors, representing the vector difference of pairs of satellite locations.

Here is a typical test run:

IDL> tst39,1 Case = 1 Z-incident case, seed = 1.00000 The condition number is: 1.00000 The slowness vector is: 0.00000 0.00000 1.00000 This calculated time delay - original time delay is: 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 IDL> tst39,2 Case = 2 X-incident case, seed = 1.00000 The condition number is: 1.00000 The slowness vector is: 1.63299 0.00000 0.00000 This calculated time delay - original time delay is: 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 IDL>Notice that in the z-direction case the slowness vectro is (0,0,1), while in the x-direction case the slowness vector is (1.63299,0,0). This is because we set the base of our height one tetrahedron in the (x,y) plane. Thus the distance (height) in the z-direction is 1, while if a wave comes in the x-direction, there is less length. Hence the same time delay will be "slower" in the (shorter) x-direction.

- Case 1: Z-incident case. We make a perfect tetrahedron, (height of 1, all sides the same length), and build the time differences so that a slowness vector of (0,0,tdSeed) should be calculated.
- Case 2: X-incident case. We make a perfect tetrahedron, (height of 1, all sides the same length), and build the time differences so that a slowness vector of (tdSeed,0,0) should be calculated.
- Case 3: Y-incident case. We make a perfect tetrahedron, (height of 1, all sides the same length), and build the time differences so that a slowness vector of (0,tdseed,0) should be calculated.
- Case 4: Negative Y-incident case. We make a perfect tetrahedron, (height of 1, all sides the same length), and build the time differences so that a slowness vector of (0,-tdSeed,0) should be calculated.
- Case 5: You provide the tdSeed, we provide a perfect tetrahedron, and a slowness vector of (1,2,3). We make the correct time delay matrix, and hope we get the same slowness vector back.
- Case 6: You provide the tdSeed, we provide a perfect tetrahedron, and a slowness vector of (-1,1,10). We make the correct time delay matrix, and hope we get the same slowness vector back.
- Case 7: You provide the tdSeed, we provide a perfect tetrahedron, and a slowness vector of (-1,1,10). We make the correct time delay matrix, corrupt it, and hope we do not get the same slowness vector back.
- Case 8: This is the roll your own. You have to provide all the input arguments,
i.e. myCase, tdSeed, tdMat, satLoc.
If you want to make your own test case, here is how to do it:

Set the slowness vector, ms, and the satellite vectors, x, y, z, and w. Then execute the following IDL code:

xt = total ( ms*x) yt = total ( ms*y) zt = total ( ms*z) wt = total ( ms*w) tdMat = [ $ [xt-xt,xt-yt,xt-zt,xt-wt], $ [yt-xt,yt-yt,yt-zt,yt-wt], $ [zt-xt,zt-yt,zt-zt,zt-wt], $ [wt-xt,wt-yt,wt-zt,wt-wt] $ ]

This code calculated the location in time of the event at x, y, z, w as xt, yt, zt, wt, and then it builds the time delay array.