Abstract:
A workstation computer system, and its associated method and program storage device, stores a novel software package known as &#34;Variance Cube&#34;. The computer system is responsive to a plurality of seismic signals propagating through a cubic volume of an earth formation for generating a cube, representing said cubic volume of earth, where the cube includes a plurality of seismic data samples and where each seismic data sample has a corresponding &#34;variance value&#34; assigned thereto. The computer system also generates one or more maps, such as a time slice map, representing one or more slices through the cube. Each map displays and is used to determine certain geologic features which exist along the corresponding slice through the cube, each map including a plurality of the variance values representing the geologic features, each such variance value being defined as the degree to which an amplitude of each seismic data sample in the cube at a particular reflection time &#34;t&#34; varies about an average amplitude. When the Variance Cube software is executed, the method of this invention determines the plurality of variance values by: dividing the cube into a plurality of slices, dividing each slice into a plurality of cells, calculating an average of the amplitudes of a plurality of seismic data samples in each cell on the slice, subtracting that average from each amplitude of each seismic data sample in each cell thereby producing a plurality of differences, summing the squares of the plurality of differences thereby producing a numerator, summing the squares of the plurality of amplitudes of the plurality of seismic data samples in each cell thereby producing a denominator, dividing the numerator by the denominator to thereby produce an approximate variance value which is assigned to a center seismic data sample in each cell on the time slice.

Description:
CROSS REFERENCE TO RELATED APPLICATIONS 
     This application is a Utility application of prior pending Provisional application Ser. No. 60/123,412 filed Mar. 9, 1999 and entitled &#34;Specifications for Generation of a Variance Cube Volume from a 3D Seismic Data Volume&#34;. 
    
    
     BACKGROUND OF THE INVENTION 
     The subject matter of the present invention relates to a seismic signal processing method and apparatus and, in particular, a workstation computer system, and its associated method and program storage device, which stores a novel software package known as &#34;Variance Cube&#34;. The computer system is responsive to a plurality of seismic signals, which propagated through a cubic volume of an earth formation, for generating a cube representing said cubic volume of earth. The cube includes a plurality of seismic data samples, each seismic data sample having a corresponding &#34;variance value&#34; and a unique color assigned thereto. The computer system further generates one or more maps, such as a time slice map, representing one or more slices through the cube, each map displaying and being used to determine certain geologic features which exist along the corresponding slice through the cube. Each map includes a plurality of the variance values representing the geologic features, each such variance value being defined as the degree to which an amplitude of each seismic data sample in a cell in the cube at a particular reflection time &#34;t&#34; varies about an average amplitude of the samples in the cell. 
     Two dimensional seismic data is acquired along lines that consist of geophone arrays onshore or hydrophone streamers offshore. The geophones or hydrophones act as sensors which receive seismic energy from an earth formation. The seismic energy is transmitted into the earth formation, reflected back toward a surface of the earth from subsurface horizon interfaces in the earth formation, and propagates through a cubic volume of the earth formation before reaching the sensors. In three dimensional (3-D) seismic, the principle is the same except that the arrays of geophones and hydrophones are more closely spaced to provide more detailed subsurface coverage. As a result, extremely large volumes of digital seismic data are received by a computer and stored therein, the computer processing the seismic data by executing certain software stored in the computer and displaying the results of that processing. Following that processing, final interpretation of the processed seismic data can be made. 
     The processing of the digital seismic data requires computer resources which store and execute complex software for enhancing the received digital data/seismic signals and for muting any accompanying noise which masks the signals. Once the digital data/seismic signals are processed, the resultant processed signals are recorded and displayed in the form of a &#34;cube&#34; and a plurality of &#34;maps&#34; which represent slices through the cube, such as horizontal time slice maps or horizon maps, which display various geologic features situated on the corresponding slice through the cube. As a result, three dimensional seismic is used extensively to provide a more detailed structural and stratigraphic image of subsurface reservoirs. 
     During the computer processing of the seismic data, the computer responds to a set of seismic data which was digitally generated when seismic energy &#34;sound&#34; waves were transmitted through a cubic volume of earth. The computer operates on a cubic portion of the received seismic data (hereinafter called a &#34;cube&#34;) which corresponds to that portion of the seismic energy that propagated through the cubic volume of earth. The seismic data in the cube comprises a plurality of seismic traces, where each trace further comprises a multitude of seismic data samples. If a horizontal plane were to pass through corresponding seismic data samples in the cube, that plane would be called a &#34;time slice&#34;, since all the corresponding seismic data samples on that time slice have the same reflection time. Therefore, a plurality of such time slices pass through a plurality of corresponding seismic data samples in the cube (see FIG. 2). During the computer processing of the seismic data, a cell on a first time slice in the cube encompasses a first seismic data sample on the first time slice in the cube, similar such cells on other time slices in the cube encompass the same corresponding first seismic data sample on the other time slices in the cube, and a mathematical operation is performed on the seismic data samples in each of the plurality of cells on each of the plurality of time slices in the cube thereby producing a plurality of values or results corresponding, respectively, to a first plurality of the first seismic data samples in the plurality of cells of the cube. The plurality of values or results are then assigned, respectively, to the first plurality of first seismic data samples in the respective plurality of cells of the cube, one such value or result being assigned to each of the first seismic data samples. Then, the plurality of cells on each time slice in the cube move (or sequentially progress) from the first plurality of first seismic data samples to a second plurality of second seismic data samples, the above referenced mathematical operation is performed on the seismic data samples in each of the plurality of cells which now encompass the second plurality of second seismic data samples, and a second plurality of values or results is produced corresponding, respectively, to the second plurality of second seismic data samples in the plurality of cells of the cube, one such value or result being assigned to each of the second plurality of second seismic data samples. Then, the plurality of cells move or sequentially progress from the second plurality of second seismic data samples to a third plurality of third seismic data samples, and the above process is repeated until all of the seismic data samples on each of the time slices in the cube have a value or result assigned thereto. A color is assigned to each value or result corresponding to each seismic data sample. Therefore, each of the seismic data samples in the cube have a unique color assigned thereto. By slicing through the cube along the time axis, a time slice &#34;map&#34; is produced having a plurality of colors disposed thereon which correspond, respectively, to the plurality of values or results which further correspond to the plurality of seismic data samples on that time slice (see FIGS. 13-15). Similarly, by slicing vertically through the cube along a vertical axis, another &#34;map&#34; is produced having another plurality of colors disposed thereon which correspond, respectively, to the plurality of seismic data samples on that vertical slice (see FIG. 39). Consequently, the entire cube now has values or results and unique colors assigned to each of the seismic data samples in the cube and a plurality of maps can be produced which reflect the geologic features on the maps. 
     However, as good as the above referenced computer processing of the seismic data has become, improvements are needed. For example, there are different ways for performing the above referenced mathematical operation on the plurality seismic data samples in each of the plurality of cells on each of the slices in the cube. 
     For example, in U.S. Pat. No. 5,563,949 to Bahorich et al (the disclosure of which is incorporated by reference into this specification), in each of the cells on each of the time slices, a &#34;coherency&#34; is determined between two seismic data samples which are disposed in an &#34;in-line&#34; direction, and another &#34;coherency&#34; is determined between two seismic data samples which are disposed in a &#34;cross-line&#34; direction; the geometric mean of the coherency in the in-line direction and the coherency in the &#34;cross-line&#34; direction is determined; and that geometric mean value is assigned to one of the seismic data samples in each of the particular cells. The &#34;coherency&#34; is defined below with reference to FIG. 20. 
     In addition, in U.S. patent application Ser. No. 09/019,180 filed Feb. 5, 1998 to Peter P. Van Bemmel et al and entitled &#34;Seismic signal processing method and apparatus for generating time slice or horizon maps in response to seismic traces and quadrature traces to determine geologic features&#34; (hereinafter called the &#34;Van Bemmel application&#34;), the disclosure of which is incorporated by reference in this specification, a seismic signal trace and its quadrature trace undergo cross correlation for determining a cross correlation function (from which a plurality of values are determined for assignment to the seismic data samples) and generating the aforementioned &#34;maps&#34;. 
     However, the method disclosed in the Bahorich patent (which discloses a mathematical operation for calculating the geometric mean of two coherency values to represent the value to assign to a seismic data sample in each cell on a time slice of a cube) and the method disclosed in the Van Bemmel application (which discloses a mathematical operation for calculating the cross correlation between a seismic trace and its quadrature trace) represent only two such methods and mathematical operations for generating a &#34;cube&#34; and a plurality of corresponding &#34;maps&#34; that display a set of geologic features of the earth formation in the cube. 
     There exist other methods for performing other mathematical operations for calculating other values or results for assignment to a seismic data sample in each of the cells on each of the slices in the cube for the ultimate generation of a &#34;cube&#34; and corresponding &#34;maps&#34; that display the geologic features of an earth formation in the cube. 
     SUMMARY OF THE INVENTION 
     Accordingly, it is a primary object of the present invention to disclose another such method and associated apparatus for calculating another value or result (i.e., a &#34;variance value&#34;) for assignment to a seismic data sample in each cell on each time slice in a cube and for generating a cube and one or more maps from the cube, such as time slice maps, for displaying, via the variance values, the various geologic features of the earth formation in the cube. 
     It is a primary feature of the present invention to use a particular mathematical operation to calculate a value or result for assignment to a seismic data sample in each cell on each time slice through a cube, and to produce a cube and a plurality of corresponding maps, such as a time slice map, for displaying the geologic features of an earth formation along each slice through the cube, the calculation of that value or result being accomplished by: assigning a variance value to each such seismic data sample on each such slice through the cube and assigning a unique color to each such variance value thereby producing a cube and a plurality of corresponding maps representing slices through that cube which display, via the variance values, a set of geologic features of the earth formation along that slice through the cube. 
     It is another feature of the present invention to use a particular mathematical operation to calculate a value or result for assignment to a seismic data sample in each cell on each time slice through a cube, and to produce a cube and a corresponding map, such as a time slice map, that displays the geologic features of an earth formation along that slice through the cube, the calculation of that value or result being accomplished by: dividing the cube into a plurality of time slices and dividing each time slice in the cube at a particular reflection time &#34;j&#34; into a plurality of cells where each cell has (for example) nine seismic data samples disposed therein; calculating the average of the amplitudes of the nine seismic data samples in a particular cell at the time &#34;j&#34;; subtracting that average from the amplitude of each seismic data sample in the particular cell thereby producing a plurality of difference values; summing the squares of the plurality of difference values thereby producing a final summation value; dividing that final summation value by the sum of the squares of the amplitudes of the seismic data samples in the particular cell thereby producing a final variance value which is assigned to a center one of the nine seismic data samples in the particular cell; repeating the above steps for another adjacent cell on each of the time slices of the cube having another nine seismic data samples disposed therein until all of the seismic data samples on each of the time slices of the cube have variance values assigned thereto; and assigning colors to each of the variance values on each of the slices through the cube to thereby produce a plurality of color maps corresponding to each of the slices through the cube, the colors on each map representing a set of geologic features along a slice through the cubic volume of the earth formation. 
     In accordance with the above object and other features of the present invention, a &#34;Variance Cube&#34; software is disclosed which is adapted for storage in a memory of a computer workstation. The Variance Cube software is initially stored on a program storage device, such as a CD-Rom, the software being loaded from the program storage device into the memory of the computer workstation. That workstation includes a processor, and when the processor executes the Variance Cube software stored in the memory, a method is practiced. When the workstation processor executes the Variance Cube software, the workstation processor will respond to a set of seismic data which was digitally generated when seismic energy &#34;sound&#34; waves were transmitted through a cubic volume of earth. The computer operates on a cubic portion of the received seismic data (hereinafter called a &#34;cube&#34;) which corresponds to that portion of the seismic energy that is propagated through the cubic volume of earth. The seismic data in the cube comprises a plurality of seismic traces, where each trace further comprises a multitude of seismic data samples. When a plurality of horizontal planes (called `time slices`) pass through each corresponding set of seismic data samples in the cube, that cube is divided into a plurality of the time slices where each time slice has a particular reflection time &#34;j&#34;. During the processing of the seismic signal traces by the workstation processor, a first plurality of cells on the respective plurality of time slices in the cube will encompass a corresponding first plurality of seismic data samples on the plurality of time slices of the cube. Each cell on each time slice includes a plurality of seismic data samples having a corresponding plurality of amplitudes at the reflection time &#34;j&#34;, the plurality of seismic data samples in said each cell including a center seismic data sample. In each cell on each time slice, a mathematical operation is performed. During that mathematical operation which is performed in connection with each cell on each time slice, the following mathematical steps are performed: calculating an average of the amplitudes of the plurality of seismic data samples in said each cell at said reflection time &#34;j&#34;; subtracting that average from each amplitude of each seismic data sample of the plurality of seismic data samples in said each cell thereby producing a plurality of differences; summing the squares of the plurality of differences thereby producing a numerator; summing the squares of the plurality of amplitudes of the plurality of seismic data samples in said each cell thereby producing a denominator; dividing the numerator by the denominator to thereby produce an approximate variance value; mathematically operating said approximate variance value with respect to a weighting factor to produce a final variance value which is assigned to the center seismic data sample of the plurality of seismic samples in said each cell on the time slice; assigning a color to the final variance value; and repeating the above steps until all the seismic data samples on each slice through the cube have a final variance value and a corresponding unique color assigned thereto thereby producing a cube enclosing a plurality of seismic data samples wherein a unique variance value and a corresponding unique color is assigned to each seismic data sample in the cube. When any horizontal or vertical slice passes through that cube, that slice can be represented by a &#34;map&#34; which also includes a plurality of seismic data samples, each such seismic data sample having a unique variance value and a corresponding unique color assigned thereto. 
     Further scope of applicability of the present invention will become apparent from the detailed description presented hereinafter. It should be understood, however, that the detailed description and the specific examples, while representing a preferred embodiment of the present invention, are given by way of illustration only, since various changes and modifications within the spirit and scope of the invention will become obvious to one skilled in the art from a reading of the following detailed description. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     A full understanding of the present invention will be obtained from the detailed description of the preferred embodiment presented hereinbelow, and the accompanying drawings, which are given by way of illustration only and are not intended to be imitative of the present invention, and wherein: 
     FIGS. 1a-1b and 2 illustrate a plurality of seismic traces reflecting off a horizon in an earth formation and propagating through a cubic volume (i.e., a &#34;cube&#34;) of the formation; 
     FIGS. 3 through 12 illustrate how a mathematical operation is performed in each cell in connection with a plurality of corresponding cells on a plurality of time slices associated with a plurality of corresponding seismic data samples in the cube and how the plurality of corresponding cells sequentially progress through the cube for the purpose of determining a unique value or result for each seismic data sample in the cube, each value or result corresponding to a unique color which is subsequently assigned to each seismic data sample in the cube; 
     FIGS. 13-15 illustrate time slice maps resulting from the cube of FIG. 12; 
     FIGS. 16 through 22 illustrate the specific mathematical operation performed in each of the cells of FIGS. 3-12 as disclosed in U.S. Pat. No. 5,563,949 to Bahorich et al; FIG. 23 illustrates a seismic operation where the resultant seismic data output record undergoes data reduction to produce a reduced seismic data output record; 
     FIG. 24 illustrate a computer system, such as a workstation, which stores the &#34;variance cube software&#34; in accordance with the present invention; 
     FIGS. 25 through 28 illustrate the specific &#34;variance oriented&#34; mathematical operation (different from the mathematical operation of FIGS. 16-22 in the Bahorich patent, and different from the mathematical operation of the Van Bemmel application) performed in each of the cells of FIGS. 3-12 as disclosed in the present application when the &#34;variance cube software&#34; of the present invention is executed by the workstation processor of FIG. 24; 
     FIGS. 29 through 31 illustrate a set of user interface dialogs which are presented to the operator of the computer workstation of FIG. 24 via the &#34;recorder or display device&#34; when the variance cube software of the present invention is being executed; 
     FIG. 32 explains the structure of a flowchart depicting the structure of the &#34;variance cube software&#34; of the present invention of FIGS. 33 and 34; 
     FIGS. 33 and 34 illustrate a flowchart depicting the structure of the &#34;variance cube software&#34; of the present invention; and 
     FIGS. 35 through 39 illustrate different &#34;maps&#34;, such as time slice maps, which are generated by the recorder or display device of FIG. 24 when the &#34;variance cube software&#34; of the present invention is executed by the workstation processor of FIG. 24. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring to FIGS. 1a through 15, the following paragraphs will discuss a prior art &#34;sequential progression&#34; method for determining a unique value or result for each seismic data sample in a cube (i.e., a cubic volume of earth) and a corresponding unique color for each such seismic data sample in the cube and for generating one or more &#34;maps&#34; associated with each slice through the cube. 
     In FIGS. 1a and 1b, starting with FIG. 1a, a plurality of seismic waves 10 originating from an explosive energy source reflect off a horizon 12 in an earth formation. The seismic waves 10 will propagate through a cubic volume of earth 17 (hereinafter, called a &#34;cube 17&#34;) during its travel toward the Earth&#39;s surface. At the Earth&#39;s surface, the seismic waves 10 are received, in the form of seismic traces 31. However, each of the seismic traces 31 actually consist of a sequential series of seismic data samples. In FIG. 1b, the seismic traces 31 propagating through the cube 17 is illustrated. Each of the traces 31 include a series of interconnected seismic data samples 15. Therefore, in FIG. 1b, the cube 17 (representing the cubic volume of earth 17 in FIG. 1a) contains a plurality of seismic data samples 15 representing a plurality of seismic traces 31 propagating through the cube 17. 
     In FIG. 2, the cube 17 of FIG. 1b is again illustrated; however, in FIG. 2, a slice (called a time slice) passes through each of the corresponding seismic data samples. For example, in FIG. 2, each of the seismic traces 10 include three (3) seismic data samples, a top sample, a middle sample, and a bottom sample. A time slice 19 passes through each of the top seismic data samples, a time slice 21 passes through each of the middle seismic data samples, and a time slice 23 passes through each of the bottom seismic data samples. The resultant cube of FIG. 2 is illustrated again in FIG. 3. 
     In FIG. 3, a plurality of cells enclosed corresponding seismic data samples on the time slices of the cube. For example, in FIG. 3, a first cell 25a encloses a first seismic data sample 15a1 on time slice 19, a second cell 25b encloses a corresponding first seismic data sample 15a2 on time slice 21, and a third cell 25c encloses a corresponding first seismic data sample 15a3 on time slice 23. A mathematical operation takes place in each cell 15a1, 15a2, 15a3, and a value or result &#34;A&#34; is determined for sample 15a1, a value or result &#34;B&#34; is determined for sample 15a2, and a value or result &#34;C&#34; is determined for sample 15a3. The cells 25a, 25b, and 25c &#34;sequentially progress&#34; to the next adjacent samples 15b1, 15b2, 15b3. In FIG. 4, note that &#34;A&#34; is assigned to sample 15a1, &#34;B&#34; is assigned to sample 15a2, and &#34;C&#34; is assigned to sample 15a3. 
     In FIG. 4, the first cell 25a encloses a second seismic data sample 15b1 on time slice 19, the second cell 25b encloses a corresponding second seismic data sample 15b2 on time slice 21, and the third cell 25c encloses a corresponding second seismic data sample 15b3 on time slice 23. The mathematical operation takes place in each cell 15b1, 15b2, 15b3, and a value or result &#34;D&#34; is determined for sample 15b1, a value or result &#34;E&#34; is determined for sample 15b2, and a value or result &#34;F&#34; is determined for sample 15b3. The cells 25a, 25b, and 25c &#34;sequentially progress&#34; to the next adjacent samples 15c1, 15c2, 15c3. In FIG. 5, note that value &#34;D&#34; is assigned to sample 15b1, value &#34;E&#34; is assigned to sample 15b2, and value &#34;F&#34; is assigned to sample 15b3. In FIG. 5, the first, second, and third cells 25a, 25b, and 25c enclose the third and corresponding seismic data samples 15c1, 15c2, 15c3, the mathematical operation is performed in the cells 25a, 25b, 25c and a value or result &#34;G&#34;, &#34;H&#34;, and &#34;I&#34; is determined for samples 15c1, 15c2, and 15c3, respectively. The cells 25a-25c sequentially progress to the next adjacent samples 15d1, 15d2, 15d3 and note, in FIG. 6, that values G, H, and I have been assigned to samples 15c1, 15c2, and 15c3, respectively. In FIG. 6, the first, second, and third cells 25a, 25b, and 25c enclose the fourth and corresponding seismic data samples 15d1, 15d2, 15d3, the mathematical operation is performed in the cells 25a, 25b, 25c and a value or result &#34;J&#34;, &#34;K&#34;, and &#34;L&#34; is determined for samples 15d1, 15d2, and 15d3, respectively. The cells 25a-25c sequentially progress to the next adjacent samples 15c1, 15c2, 15c3 and note, in FIG. 7, that values J, K, and L have been assigned to samples 15d1, 15d2, and 15d3, respectively. In FIG. 7, the first, second, and third cells 25a, 25b, and 25c enclose the fifth and corresponding seismic data samples 15e1, 15e2, 15e3, the mathematical operation is performed in the cells 25a, 25b, 25c and a value or result &#34;M&#34;, &#34;M&#34;, and &#34;O&#34; is determined for samples 15e1, 15e2, and 15e3, respectively. The cells 25a-25c sequentially progress to the next adjacent samples 15f1, 15f2, 15f3 and note, in FIG. 8, that values M, N, and O have been assigned to samples 15e1, 15e2, and 15e3, respectively. 
     In FIG. 8, the first, second, and third cells 25a, 25b, and 25c enclose the sixth and corresponding seismic data samples 15f1, 15f2, 15f3, the mathematical operation is performed in the cells 25a, 25b, 25c and a value or result &#34;P&#34;, &#34;Q&#34;, and &#34;R&#34; is determined for samples 15f1, 15f2, and 15f3, respectively. The cells 25a-25c sequentially progress to the next adjacent samples 15g1, 15g2, 15g3 and note, in FIG. 9, that values P, Q, and R have been assigned to samples 15f1, 15f2, and 15f3, respectively. In FIG. 9, the first, second, and third cells 25a, 25b, and 25c enclose the seventh and corresponding seismic data samples 15g1, 15g2, 15g3, the mathematical operation is performed in the cells 25a, 25b, 25c and a value or result &#34;S&#34;, &#34;T&#34;, and &#34;U&#34; is determined for samples 15g1, 15g2, and 15g3, respectively. The cells 25a-25c sequentially progress to the next adjacent samples 15h1, 15h2, 15h3 and note, in FIG. 10, that values S, T, and U have been assigned to samples 15g1, 15g2, and 15g3, respectively. 
     In FIG. 10, the first, second, and third cells 25a, 25b, and 25c enclose the eighth and corresponding seismic data samples 15h1, 15h2, 15h3, the mathematical operation is performed in the cells 25a, 25b, 25c and a value or result &#34;V&#34;, &#34;W&#34;, and &#34;X&#34; is determined for samples 15h1, 15h2, and 15h3, respectively. The cells 25a-25c sequentially progress to the next adjacent samples 15i1, 15i2, 15i3 and note, in FIG. 11, that values V, W, and X have been assigned to samples 15h1, 15h2, and 15h3, respectively. 
     In FIG. 11, the first, second, and third cells 25a, 25b, and 25c enclose the ninth and corresponding seismic data samples 15i1, 15i2, 15i3, the mathematical operation is performed in the cells 25a, 25b, 25c and a value or result &#34;Y&#34;, &#34;Z&#34;, and &#34;AB&#34; is determined for samples 15i1, 15i2, and 15i3, respectively. The sequential progression of the cells 25a-25c stops at this point, since values or results have been assigned to each and all of the seismic data samples in the cube 17. Note, in FIG. 12, that values Y, Z, and AB have been assigned to samples 15i1, 15i2, and 15i3, respectively. 
     In FIG. 12, as a result of the above &#34;sequential progression&#34; movement of the cells 25a, 25b, and 25c which was discussed above with reference to FIGS. 3 through 11, wherein the mathematical operation was performed in each of the cells 25a and 25b and 25c, all of the seismic data samples &#34;x&#34; on each of the time slices 19, 21, and 23 of the cube 17 have a &#34;value or result&#34; assigned thereto. Recall that a unique color is determined for each such unique value or result. 
     In FIGS. 13 through 15, a simple time slice map 19a is illustrated corresponding to time slice 19 of FIG. 12, a simple time slice map 23a is illustrated corresponding to time slice 21 of FIG. 12, and a simple time slice map 23a is illustrated corresponding to time slice 23 of FIG. 12. However, see FIGS. 35 through 39 for more realistic time slice (and vertical slice) maps which are generated in accordance with the present invention. 
     Referring to FIGS. 16 through 22, recall that, in U.S. Pat. No. 5,563,949 to Bahorich et al, a &#34;first mathematical operation&#34; is performed in each of the cells 25a, 25b, and 25c of FIGS. 3 through 12 for the purpose of determining a value or result to assign to each seismic data sample in the cube. That &#34;first mathematical operation&#34;, performed in each of the cells of each time slice in the cube of the Bahorich et al patent, is discussed below with reference to FIGS. 16 through 22 of the drawings. 
     In FIG. 16, the time slice 19 of FIG. 3 is illustrated. The time slice 19 includes the sequentially progressing cell 25a of FIG. 3. Each cell 25a contains four seismic data samples &#34;x&#34;, three of the seismic data samples &#34;x&#34; being used during &#34;cross correlation&#34;. 
     For example, when &#34;cross correlation #1&#34; is complete, &#34;cross correlation #2&#34; takes place, followed by &#34;cross correlation #3&#34;, &#34;cross correlation #4&#34;, and &#34;cross correlation #5&#34; in &#34;sequential progression&#34; order. In FIG. 16, when &#34;cross correlation #1&#34; is complete, a &#34;Geometric Mean&#34; 20 is assigned to the seismic data sample &#34;x&#34; 20 (which is the corner sample). Similarly, in FIG. 16, when cross correlations 2, 3, 4, and 5 are completed, a separate Geometric mean is assigned to each of their corner seismic data samples &#34;x&#34; as indicated in FIG. 16. This concept is explained more fully below with reference to FIG. 4. 
     In FIG. 17, one of the cells 25a of FIG. 16 is illustrated. The cell 25a contains three seismic data samples &#34;x&#34;: seismic sample 22, seismic sample 24, and seismic sample 26. An &#34;in-line&#34; cross correlation 28 takes place between samples 24 and 26 thereby producing a &#34;coherency&#34; value along the x-direction: &#34;Px(t, tlagx)&#34;. Then, a &#34;cross-line&#34; cross correlation 30 takes place between samples 22 and 24 thereby producing a &#34;coherency&#34; value along the y-direction: &#34;Py(t, tlagy)&#34;. The &#34;Geometric mean&#34; of the two coherency values &#34;Px(t, tlagx)&#34; and &#34;Py(t, tlagy)&#34; is determined. The &#34;Geometric mean&#34; for two (2) values is defined to be the square-root of the product of the two values. Therefore, since there are two coherency values &#34;Px(t, tlagx)&#34; and &#34;Py(t, tlagy)&#34;, the Geometric mean of the two coherency values &#34;Px(t, tlagx)&#34; and &#34;Py(t, tlagy)&#34; is defined as follows: 
     
         Geometric mean=√([Px(t, tlagx)][Py(t, tlagy)] 
    
     The above referenced &#34;Geometric mean&#34; is assigned to the corner sample 24 in FIG. 17. Ultimately, a color is associated with the corner sample 24, that color being indicative of the above referenced &#34;Geometric mean&#34; value. 
     The &#34;in-line&#34; cross correlation 28 and the &#34;cross-line&#34; cross correlation 30 of FIGS. 16 and 17 will be discussed in greater detail below with reference to FIGS. 18 and 19. 
     In FIGS. 18 and 19, the method for performing the &#34;in-line&#34; cross correlation 28 and the &#34;cross-line&#34; cross correlation 30 of FIG. 17 is illustrated. In FIG. 18, &#34;seismic trace 1&#34; 32 is &#34;cross correlated&#34; with &#34;seismic trace 2&#34; 34. &#34;Seismic trace 1&#34; 32 in FIG. 18 can be seismic trace 24 in FIG. 17 and &#34;seismic trace 2&#34; 34 in FIG. 18 can be either seismic trace 22 or seismic trace 26 in FIG. 17. The &#34;seismic trace 1&#34; 32 has a &#34;zero mean&#34; and it includes a plurality of seismic samples 36. The &#34;seismic trace 2&#34; 34 also has a &#34;zero mean&#34; and it is successively shifted or &#34;lagged&#34; downwardly in FIG. 18 by an amount equal to the distance between the seismic samples 36. For example, &#34;seismic trace 2&#34; 34a has a &#34;zero mean&#34; and it is not shifted or lagged downwardly; &#34;seismic trace 2&#34; 34b has a &#34;zero mean&#34; and it is shifted or lagged downwardly by one seismic sample 36; &#34;seismic trace 2&#34; 34c has a &#34;zero mean&#34; and it is shifted or lagged downwardly by two seismic samples 36; and &#34;seismic trace 2&#34; 34d has a &#34;zero mean&#34; and it is shifted or lagged downwardly by three seismic samples 36. In FIG. 18, in order to perform the cross correlation operation, a &#34;shift and cross multiply and add&#34; operation is performed, and, when the &#34;seismic trace 1&#34; 32 (which has a &#34;zero mean&#34;) is successively cross correlated with each of the &#34;seismic traces 2&#34; 34a through 34d (each of which have a &#34;zero mean&#34; and are successively &#34;lagged&#34; downwardly in FIG. 18), a &#34;Zero Mean Lagged Cross Correlation (ZMLCC)&#34; function 38 is produced. 
     For example, in FIG. 18, &#34;seismic trace 1&#34; 32 and &#34;seismic trace 2&#34; 34a are cross correlated by cross multiplying and adding (no shifting required here) thereby producing a first zero mean lagged cross correlation value 38a, &#34;seismic trace 1&#34; 32 and &#34;seismic trace 2&#34; 34b are cross correlated by shifting and cross multiplying and adding thereby producing a second zero mean lagged cross correlation value 38b, &#34;seismic trace 1&#34; 32 and &#34;seismic trace 2&#34; 34c are cross correlated by shifting and cross multiplying and adding thereby producing a third zero mean lagged cross correlation value 38c, and &#34;seismic trace 1&#34; 32 and &#34;seismic trace 2&#34; 34d are cross correlated by shifting and cross multiplying and adding thereby producing a fourth zero mean lagged cross correlation value 38d. By applying a curve to each of the peaks of the first, second, third, and fourth zero mean lagged cross correlation values 38a-38d in FIG. 18, a &#34;zero mean lagged cross correlation (ZMLCC) function&#34; 38 is produced. In FIG. 18, note that the &#34;second zero mean lagged cross correlation&#34; value 38b is the &#34;Most Positive&#34; Zero Mean Lagged Cross Correlation, the &#34;Most Positive Zero Mean Lagged Cross Correlation&#34; being hereinafter denoted by the term: &#34;(ZMLCC)max&#34;. 
     In FIG. 19, another &#34;Zero Mean Lagged Cross Correlation (ZMLCC) function 38 is illustrated. The &#34;most positive zero mean lagged cross correlation&#34; or &#34;(ZMLCC)max&#34; is the highest or greatest amplitude of the ZMLCC function 38. The term &#34;t lag&#34; is the time-distance between the &#34;zero point&#34; and the &#34;most positive zero mean lagged cross correlation&#34;. 
     In FIG. 20, the &#34;seismic trace 1&#34; 32 is cross correlated with &#34;seismic trace 2&#34; 34 in the manner discussed above with respect to FIGS. 18 and 19 to produce the (ZMLCC) function 38. However, for the purpose of defining terms, the &#34;autocorrelation of seismic trace 1&#34; 32 is &#34;(AC1)&#34;, and the &#34;autocorrelation of seismic trace 2&#34; 34 is &#34;(AC2)&#34;. In FIG. 20, an &#34;autocorrelation&#34; of a seismic trace is defined. That is, taking &#34;seismic trace 1&#34; 32 as an example, &#34;seismic trace 1&#34; undergoes &#34;autocorrelation&#34; when &#34;seismic trace 1&#34; undergoes a mathematical operation consisting of &#34;cross multiply and add (no shifting)&#34; with &#34;seismic trace 1&#34; to thereby produce the &#34;autocorrelation function of seismic trace 1&#34;, which we have defined to be &#34;(AC1)&#34;. The &#34;Geometric mean&#34; of &#34;(AC1)&#34; and &#34;(AC2)&#34; has been defined to be √(AC1)(AC2). 
     In FIG. 20, therefore, the term &#34;coherency&#34;, otherwise known as the &#34;coherency-similarity&#34;, between &#34;seismic trace 1&#34; 32 and &#34;seismic trace 2&#34; 34 is defined as follows: ##EQU1## By definition, the term &#34;Px(t, tlagx)&#34; is defined to be the &#34;coherency or coherency/similarity in the x-direction&#34;, and the term &#34;Py(t, tlagy)&#34; is defined to be the &#34;coherency or coherency/similarity in the y-direction&#34;. 
     In FIG. 21, utilizing the above concepts, a cell 25a is illustrated. A cross correlation is performed between seismic trace 1 (27) and seismic trace 2 (29) to produce a &#34;coherency value in the y-direction&#34; which is defined to be the term &#34;Py(t, tlagy)&#34;. Then, a cross correlation is performed between seismic trace 2 (29) and seismic trace 3 (31) to produce a &#34;coherency value in the x-direction&#34; which is defined to be the term &#34;Px(t, tlagx)&#34;. A &#34;Geometric Mean&#34; is then calculated which is defined to be the square root of the coherency value in the x-direction &#34;Px(t, tlagx)&#34; multiplied by the coherency value in the y-direction &#34;Py(t, tlagy)&#34;. That &#34;Geometric mean&#34; is then assigned to the corner seismic data sample &#34;x&#34; for seismic trace 2 (29). 
     In FIG. 22, when the &#34;Geometric mean&#34; associated with all the cells 25a of FIGS. 3 through 11 have been determined in the manner described above with reference to FIGS. 16 through 22, those &#34;geometric mean&#34; values are plotted on a &#34;horizontal time slice map of 3-D seismic data&#34;, and a representation of that horizontal time slice &#34;map&#34; is shown in FIG. 22. 
     Referring to FIGS. 23 through 39, in accordance with the present invention, another &#34;second mathematical operation&#34; is performed in each of the cells 25a, 25b, and 25c of FIGS. 3 through 12 for the purpose of determining a value or result to assign to each seismic data sample &#34;x&#34; in the cube. That &#34;second mathematical operation&#34;, performed in each of the cells 25 of each time slice in the cube of FIG. 3 in accordance with the present invention, is discussed below with reference to FIGS. 23 through 39 of the drawings. 
     The following paragraphs with reference to FIGS. 23 through 39 will discuss the structure and the functional operation of the &#34;variance cube&#34; software in accordance with the present invention when the variance cube software is executed by a processor of a computer workstation. 
     In FIG. 23, an explosive energy source 40 produces a sound vibration 42 which reflects off a horizon 46 of an earth formation 44 which is separated by a fault 48. The sound vibrations 42 are received by geophone receivers 50 thereby producing an electrical signal representing data received 52. The data received signal 52 is received by a computer 54 of a recording truck, that computer 54 generating a seismic data output record 56. The seismic data output record 56 undergoes a data reduction operation 58 in a mainframe computer thereby producing a reduced seismic data output record 60. 
     In FIG. 24, a workstation computer 62 is illustrated in FIG. 24. The workstation computer 62 includes a processor 62a, a memory 62b which stores a &#34;Variance Cube software&#34; 64 in accordance with the present invention, and a recorder or display device 62c. The reduced seismic data output record 60 is received by a system bus of the workstation 62 and that record 60 is made available to the workstation processor 62a during the processor&#39;s execution of the Variance Cube software 64 of the present invention. The Variance Cube software 64 is initially stored on program storage device, such as a CD-Rom. That program storage device, having the Variance Cube software stored thereon, is inserted into the workstation 62 and the Variance Cube software is then loaded from the program storage device into the memory 62b of the workstation 62 for subsequent execution by the processor 62a. When the &#34;Variance Cube software&#34; 64 is executed by the processor 62a, the recorder or display device 62c can print or display a map, such as a time slice map, which reflects the geologic characteristics of the slice (such as time slice 19 of FIG. 2). These maps, such as the time slice maps, which are generated by the &#34;Variance Cube software&#34; of the present invention are illustrated in FIGS. 35 through 39. The &#34;Variance Cube&#34; software 64 will be discussed below in connection with the &#34;second mathematical relation&#34; and a plurality of seismic traces which intersect a time slice at a particular reflection time &#34;j&#34;. 
     In accordance with the present invention, a set of values or results are computed by a second mathematical relation and such values or results are assigned to each seismic data sample &#34;x&#34; in each `cell` on each time slice of a cube (such as cells 25a and 25b and 25c on time slices 19 and 21 and 23 of cube 17 of FIGS. 3 through 12). Such values or results are computed using the following &#34;second mathematical relation&#34;: ##EQU2## Such values or results, that are assigned to each seismic data sample &#34;x&#34; in each cell on each time slice of a cube (such as cells 25a and 25b and 25c on time slices 19 and 21 and 23 of cube 17 of FIGS. 3 through 12), can also be calculated by using the following slightly modified version of the &#34;second mathematical relation&#34;: ##EQU3## The following example with reference to FIG. 25 will demonstrate how the above &#34;second mathematical relation&#34; in accordance with the present invention is used to calculate the values or results that are assigned to each seismic data sample &#34;x&#34; of each cell 25a-25c in the cube 17 of FIGS. 3 through 12. 
     In FIG. 25, nine seismic data samples &#34;x&#34; are enclosed by the cell 25a (or the cells 25b and 25c) of time slice 19 (or time slice 21 or 23) of FIGS. 3 through 12. An amplitude of a particular seismic data sample is denoted generically by the notation &#34;X ij  &#34;, where &#34;x&#34; is an amplitude, the &#34;i&#34; denotes a particular seismic trace having that amplitude &#34;x&#34;, and the &#34;j&#34; denotes a particular reflection time along that particular seismic trace &#34;i&#34; (e.g., the &#34;j&#34; would be a reflection time for a seismic data sample along seismic trace &#34;i&#34;). In FIG. 25, the amplitude X ij  of seismic data sample 1 &#34;x&#34; on the time slice 19 is &#34;x(1)&#34;. In addition, in FIG. 25, the amplitude X ij , of seismic data sample 2 &#34;x&#34; on time slice 19 is &#34;x(2)&#34;, the amplitude X ij  of seismic data sample 3 &#34;x&#34; on time slice 19 is &#34;x(3)&#34;, . . . , and the amplitude X ij  of seismic trace 9 &#34;x&#34; on time slice 19 is &#34;x(9)&#34;. In FIG. 25, the following table summarizes the amplitudes X ij  of each of the seismic data samples 1 through 9 in the cell 25a of time slice 19 in FIG. 25: 
     
         ______________________________________         Amplitude of   the sample for  Seismic data trace &#34;i&#34; and  sample time &#34;j&#34;______________________________________1             χ.sub.ij = X(1)  2 χ.sub.ij = X(2)  3 χ.sub.ij = X(3)  4 χ.sub.ij = X(4)  5 χ.sub.ij = X(5)  6 χ.sub.ij = X(6)  7 χ.sub.ij = X(7)  8 χ.sub.ij = X(8)  9 χ.sub.ij = X(9)______________________________________ 
    
     In FIG. 25, the average of each of these amplitudes is defined to be X j , where the &#34;j&#34; refers to the particular time slice (recall, in a cube, a plurality of time slices pass through a plurality of corresponding seismic data samples at time &#34;j&#34;). Therefore, in our example of FIG. 25, the average &#34;X j  &#34; of each of these amplitudes is defined as follows: 
     
         X.sub.j =[x(1)+x(2)+x(3)+x(4)+x(5)+x(6)+x(7)+x(8)+x(9)]/9 
    
     Next, in FIG. 25, the average X j  is subtracted from each amplitude in the above table. Therefore, for seismic data sample 1, the following `subtraction` takes place: 
     
         (X(1)-X.sub.j) 
    
     Similarly, for seismic data samples 2 through 9, the following `subtractions` take place: 
     
         (X(2)-X.sub.j), (X(3)-X.sub.j), (X(4)-X.sub.j), (X(5)-X.sub.j), (X(6)-X.sub.j), (X(7)-X.sub.j), (X(8)-X.sub.j), and (X(9)-X.sub.j) 
    
     Next, in FIG. 25, the sum of the squares of each `subtraction` is calculated; that is: ##EQU4## Next, in FIG. 25, the sum of the squares of the amplitudes of the seismic data samples &#34;x&#34; is calculated, as follows: ##EQU5## Finally, the value or result (which is hereinafter known as the &#34;variance value&#34; and is denoted by the symbol &#34;σ t   2  &#34; that is assigned to the center sample 72 of the nine seismic data samples &#34;x&#34; in the cell 25a of FIG. 25 is calculated as follows: ##EQU6## In FIG. 25, using our simple example, the variance value &#34;σ t   2  &#34; is assigned to the center seismic data sample 72 which is associated with seismic trace 5 and has the amplitude of &#34;x(5)&#34;. 
     Note the above equation ##EQU7## Recall the &#34;second mathematical relation&#34;: ##EQU8## which has been used to calculate the &#34;variance value&#34; that is assigned to the center seismic data sample 72 in FIG. 25. Comparing the above equation with the &#34;second mathematical relation&#34;, the only difference is the term &#34;W j-t  &#34;. That term &#34;W j-t  &#34; is a &#34;triangular weighting function&#34;. The function of the triangular weighting function will be discussed below with reference to FIG. 28. 
     In FIG. 26, the variance value &#34;V&#34; which is equal to &#34;σ t   2  &#34; is assigned to the center seismic data sample 72 of the nine seismic data samples enclosed by the cell 25a in FIG. 25. Recall from FIGS. 3 through 12 that a plurality of cells 25a, 25b, 25c are sequentially moving or progressing in rows along a plurality of time slices and a corresponding plurality of variance values &#34;V&#34; are calculated for each center seismic data sample &#34;x&#34; in each cell (25a, 25b, 25c). 
     In FIG. 27, therefore, for a particular time slice, such at time slice 19, when a variance value (V) is calculated for each of the plurality of center seismic data samples &#34;x&#34; 72 for the plurality of sequentially progressing cells 25a on the time slice 19 (that sequential progression being illustrated in FIGS. 3 through 12), the result is a &#34;map&#34; of the time slice 19 through the cube 17 of FIG. 3. That &#34;map&#34; of time slice 19 is illustrated generically in FIG. 27. 
     The discussion set forth above in connection with FIGS. 25 through 27 described how a &#34;variance value&#34; (V) is assigned to each of the seismic data samples &#34;x&#34; in a cube (i.e., a cubic volume of earth), and how a map of each slice through that cube can be generated. However, when the above identified &#34;second mathematical relation&#34; calculation takes place, the triangular weighting function &#34;W j-t  &#34; is included in that calculation. The following discussion with reference to FIG. 28 will discuss the involvement of the triangular weighting function &#34;W j-t  &#34; in that calculation. 
     In FIG. 28, a cubic volume of earth 74 (a cube 74) is divided into five time slices 76, 78, 80, 82, and 84. As noted earlier, plurality of cells (25a, 25b, 25c of FIGS. 3 through 12) sequentially progress along a time slice (19, 21, 23) and, during that sequential progression, a corresponding plurality of variance values &#34;V&#34; are calculated for each of the center seismic data samples &#34;x&#34; (72 of FIG. 25) associated with each of the cells. In FIG. 28, a plurality of cells 76a, 78a, 80a, 82a, and 84a, associated with the plurality of time slices 76, 78, 80, 82, and 84 in the cube 74 begin their sequential progression, the cells 76a-84a moving, in synchronism, from left to right, in their respective time slices 76-84, as denoted by the arrows 76b-84b. In FIG. 28, the &#34;center seismic data samples&#34; (72 of FIG. 25) in the cells 76a-84a are denoted by &#34;X1&#34; through &#34;X5&#34;. Recall the &#34;second mathematical relation&#34;: ##EQU9## where the &#34;smoothing&#34; variance value σ t   2  is assigned to the center seismic data sample 72 of FIG. 25. In FIG. 28, the &#34;smoothing&#34; variance value σ t   2  is a function of two parts: (1) a triangular weighting part 86, and (2) a variance part 88, that is: 
     Smoothing variance value &#34;V&#34;=σ t   2  =(triangular weighting part 86)(variance part 88) 
     where 
     the triangular weighting part 86=W j-t  ; and ##EQU10## 
     In FIG. 28, the triangular weighting part 86 and the variance part 88 for each of the &#34;center seismic data samples&#34; X1 through X5 is illustrated. For example, in FIG. 28, locate the center seismic data sample X1 (identified by element numeral 90), center seismic data sample X2 (element numeral 92), center seismic data sample X3 (numeral 94), center seismic data sample X4 (numeral 96), and center seismic data sample X5 (numeral 98). Associated with center seismic data sample X1 (90), locate its corresponding triangular weighting part 90a and its variance part 90b; then, for center seismic data sample X2 (92), locate its corresponding triangular weighting part 92a and its variance part 92b; and for center seismic data sample X3 (94), locate its corresponding triangular weighting part 94a and its variance part 94b; and for center seismic data sample X4 (96), locate its corresponding triangular weighting part 96a and its variance part 96b; and for center seismic data sample X5 (98), locate its corresponding triangular weighting part 98a and its variance part 98b. Each of the variance parts 90b through 98b undergo a &#34;cross multiply and add&#34; operation 100 with its corresponding triangular weighting parts 90a through 98a to thereby yield the &#34;smoothing&#34; variance values &#34;V1&#34; through &#34;V5&#34;. For example, variance part 90b undergoes the cross multiply and add operation 100 with the triangular weighting part 90a to yield the &#34;smoothing&#34; variance value &#34;V1&#34;. Similarly, variance part 92b undergoes the cross multiply and add operation 100 with the triangular weighting part 92a to yield the &#34;smoothing&#34; variance value &#34;V2&#34;. Variance part 94b undergoes the cross multiply and add operation 100 with the triangular weighting part 94a to yield the &#34;smoothing&#34; variance value &#34;V3&#34;. Variance part 96b undergoes the cross multiply and add operation 100 with the triangular weighting part 96a to yield the &#34;smoothing&#34; variance value &#34;V4&#34;. Variance part 98b undergoes the cross multiply and add operation 100 with the triangular weighting part 98a to yield the &#34;smoothing&#34; variance value &#34;V5&#34;. Smoothing variance value V1 is assigned to the center seismic data sample X1 of cell 76a and a unique color is assigned to the variance value V1. Similarly, smoothing variance value V2 is assigned to the center seismic data sample X2 of cell 78a and another unique color is assigned to the variance value V2. 
     Smoothing variance value V3 is assigned to the center seismic data sample X3 of cell 80a and another unique color is assigned to the variance value V3. Smoothing variance value V4 is assigned to the center seismic data sample X4 of cell 82a and another unique color is assigned to the variance value V4. Smoothing variance value V5 is assigned to the center seismic data sample X5 of cell 84a and another unique color is assigned to the variance value V5. 
     In FIGS. 35 through 39, realistic examples of slices, such as time slices, through the cube 17 of FIG. 12 are illustrated. 
     In FIGS. 29 through 31, a plurality of user interface dialogs which are presented to the operator of workstation 62 via the recorder or display device 62c of FIG. 24 are illustrated. 
     In FIGS. 29 through 31, the parameter requirements for the Variance Cube software 64 of FIG. 24 are: Area of Interest (AOI), Variance Window length, and Output Volume Name. These parameter selections are illustrated in FIGS. 29, 30, and 31. In FIG. 29, the user/operator has the option to select the Area of Interest (AOI) as the entire survey or from a subset of the survey. The &#34;Entire Survey&#34; button in FIG. 29, when selected or &#34;clicked on&#34;, will bring up the dialog of FIG. 30, the dialog of FIG. 30 allowing the user operator to select any available 3D seismic survey and, additionally, to set a restrictive time range over which to compute the variance cube values. In FIG. 29, if the user wishes to process only a portion of a 3D seismic survey, they may press the &#34;Select Path&#34; button from the main dialog of FIG. 29. This selection will invoke the dialog box of FIG. 30. The dialog box of FIG. 31 also allows the selection of a previously defined rectangular path, restricting the inline and crossline ranges, in addition to the time range restriction which is still allowed. In FIG. 29, with the input data and the data range defined, the user can now select the processing parameters for the variance cube calculation. The right side of FIG. 29 shows the operator controls. The icons on the right side of FIG. 29 illustrate the user&#39;s options to select the specific input seismic traces to use in the calculation of variance. The three options shown are: 3×3, 5+5, and 5×5. The variance cube calculation outputs the results for one trace at a time, but it uses the `surround traces` in the computation of the variance value. For example, as illustrated in FIG. 25, using the 3×3 operator, the `variance cube` algorithm will use the sample values from the eight traces which surround the center trace (or operator trace), as the icon illustrates. As we process from one trace to the next adjacent trace, the original input seismic data is used for the eight traces which surround the new trace, etc. In FIG. 29, the other parameter setting at the user&#39;s control is labelled &#34;vertical average&#34; on the main dialog. This parameter is used in the algorithm to set the number of samples (such as eight in FIG. 25), which are located above and below the sample at which the calculation is currently being performed, to use in the variance calculation. Finally, the user must name the output variance volume. 
     In FIG. 32, before beginning to discuss the flowcharts of FIGS. 33 and 34 which depict the structure of the &#34;variance cube&#34; software 64 of FIG. 24 of the present invention, FIG. 32 explains the two-part structure of the flowcharts, namely, the first flowchart of FIG. 33 and the second flowchart of FIG. 34. In FIG. 32, the triangular weighting part 86 and the variance part 88 of FIG. 28 is again illustrated; however, in FIG. 32, only the one triangular weighting part 90a and its one corresponding variance part 90b is illustrated for purposes of this discussion. Still referring to FIG. 32, recall from FIG. 28 that the variance part 90b undergoes a &#34;cross multiply and add&#34; operation 100 with respect to the triangular weighting part 90a to yield a &#34;smoothing&#34; variance &#34;V1&#34; which is assigned to the center seismic data sample &#34;X1&#34; of cell 76a of FIG. 28. Refer now to FIGS. 33 and 34 and note that this flowchart comprises a first flowchart of FIG. 33 and a second flowchart of FIG. 34. Referring back to FIG. 32, when the first flowchart of FIG. 33 is executed, the top half of the variance part 90b undergoes the cross multiply and add operation 100 with respect to the top half of the triangular weighting part 90a; and, when the flowchart of FIG. 34 is executed, the bottom half of the variance part 90b undergoes the cross multiply and add operation 100 with respect to the bottom half of the triangular weighting part 90a. 
     In addition, before beginning to discuss the flowcharts of FIGS. 33 and 34, recall again the following &#34;second mathematical relation&#34; in accordance with the present invention which was used to calculate the &#34;smoothing variance values&#34; σ t   2  that are assigned to the center seismic data samples &#34;X1-X5&#34; of the cells (76a-84a in FIG. 28) on the time slices (76-84 of FIG. 28) for the purpose of generating the cube of FIG. 12 and the time slice maps of FIGS. 13-15, as follows: ##EQU11## where: σ t   2  is a variance value, 
     W j-t  is a triangular weighting function, where the sum of said weighting functions is unity: ##EQU12## is the sum of the squares of each subtraction or the sum of the squares of a plurality of differences, ##EQU13## is a sum of the squares of a plurality of amplitudes of a corresponding plurality of seismic data samples in each cell (i.e., cells 25a, 25b, 25c of FIGS. 3-11), 
     X ij  is the amplitude of each seismic data sample in a cell (25a-25c), and 
     X j  is the average of the amplitudes of all the seismic data samples in a cell. 
     The above &#34;second mathematical relation&#34; can also be expressed or set forth in a slightly different form (hereinafter called an &#34;additional second mathematical relation&#34;) which can also be used to calculate the &#34;smoothing variance values&#34; σ t   2  that are assigned to the center seismic data samples &#34;X1-X5&#34; of the cells (76a-84a in FIG. 28) on the time slices (76-84 in FIG. 28) for generating the time slice maps of FIGS. 13-15, the &#34;additional second mathematical relation&#34; being set forth below, as follows: ##EQU14## where: σ t   2  is the variance value, 
     W j-t  is the triangular weighting function, ##EQU15## is a sum of the squares of each subtraction or the sum of the squares of a plurality of differences, ##EQU16## is a sum of the squares of a plurality of amplitudes of a corresponding plurality of seismic data samples in each cell (i.e., cells 25a, 25b, 25c of FIGS. 3-11), 
     X ij  is the seismic amplitude at time &#34;j&#34; for trace &#34;i&#34;; and 
     X j  is the average amplitude at time &#34;j&#34; for all traces &#34;i&#34;. 
     Refer now to FIGS. 33 and 34 wherein a flowchart 64 of the &#34;variance cube&#34; software 64 of FIG. 24 of the present invention is illustrated. The flowcharts of FIGS. 33 and 34 are divided into two parts, the first flowchart 64a of FIG. 33 and the second flowchart 64b of FIG. 34. The flowcharts of FIGS. 33 and 34 utilize the above referenced &#34;additional second mathematical relation&#34; which is set forth again below, as follows: ##EQU17## In FIG. 33, in the first flowchart 64a, the top half of the variance part 90b in FIG. 32 will undergo the &#34;cross multiply and add operation&#34; 100 with respect to the top half of the triangular weighting part 90a in FIG. 32. In FIG. 33, start by reading the first three inlines, block 64a1 and initialize &#34;Sumsqx, Sumsqy, and Weight=0.0&#34;, block 64a2. Then, find the sample value average &#34;X j  &#34;, block 64a3, as follows, ##EQU18## Recall from FIG. 25 that the average of each of the amplitudes of the seismic traces &#34;x(1)&#34; through &#34;x(9)&#34; is defined to be X j , where the &#34;j&#34; is a time value which refers to the particular time slice, and that the average &#34;X j  &#34; of each of these amplitudes is defined as follows: 
     
         X.sub.j =[x(1)+x(2)+x(3)+x(4)+x(5)+x(6)+x(7)+x(8)+x(9)]/9 
    
     In FIG. 33, find the squared difference from the mean, block 64a4, as follows: ##EQU19## Recall from FIG. 25 that the sum of the squares of each `subtraction` is calculated as follows: ##EQU20## In FIG. 33, find the sum of the squared sample value, block 64a5, as follows: ##EQU21## Recall from FIG. 25 that the sum of the squares of each amplitude (of each seismic trace at the intersection) is calculated, as follows: ##EQU22## In FIG. 33, scale by weighting function, block 64a6, as follows: Weight=Weight+(1.0/(L/2)) 
     Sumsqx=Sumsqx*Weight 
     Sumsqy=Sumsqy*Weight 
     In connection with the &#34;scale by weighting function&#34; step, block 64a6, recall that the &#34;weighting function&#34; term ##EQU23## is multiplied by both the &#34;normalized squared difference from the mean&#34; term ##EQU24## and the sum of the squared sample value term ##EQU25## which appears in the &#34;additional second mathematical relation&#34;, as follows: ##EQU26## 
     In FIG. 33, accumulate Sumsqx, Sumsqy for this reflection time &#34;j&#34;, block 64a7. 
     In FIG. 34, in the second flowchart 64b, the bottom half of the variance part 90b in FIG. 32 will undergo the &#34;cross multiply and add operation&#34; 100 with respect to the bottom half of the triangular weighting part 90a in FIG. 32. In FIG. 34, start by reinitializing the weight to be equal to 1.0, block 64b1. Then, in FIG. 34, repeat blocks 64a3, 64a4, 64a5, 64a6, and 64a7 of FIG. 34, as follows: 
     1. Find the sample value average &#34;X j  &#34;, block 64b2, as follows: ##EQU27## 2. Find the squared difference from the mean, block 64b3, as follows: ##EQU28## 3. Find the sum of the squared sample value, block 64b4, as follows: ##EQU29## 4. Scale by weighting function, block 64b5, as follows: Weight=Weight+(1.0/(L/2)) 
     Sumsqx=Sumsqx*Weight 
     Sumsqy=Sumsqy*Weight 
     5. Accumulate Sumsqx, Sumsqy for this reflection time &#34;j&#34;, block 64b6 
     6. Output variance value for the reflection time &#34;t&#34;, block 64b7, as follows: 
     Variance(t)=Sumsqx/Sumsqy 
     7. Drop the first of three inlines and pick up the next inline, repeat the process until all the inlines are finished, block 64c. 
     A &#34;program listing&#34; representing the execution portion of the Variance Cube software 64 of the present invention of FIG. 24 is set forth in the following pages. The &#34;program listing&#34; utilizes the &#34;additional second mathematical relation&#34; set forth above. 
     
         __________________________________________________________________________Program Listing  This listing is for the execution portion of the code, not the userinterface etc. Function calls are  used which are components of the IESX application programming environment. private int.sub.-- t coherency.sub.-- execute (sp, status.sub.-- ptr) struct wav.sub.-- extract.sub.-- s * sp;status.sub.-- t  *status.sub.-- ptr;  structfield.sub.-- criteria.sub.-- s search.sub.-- criteria [3];struct db.sub.-- seis.sub.-- tracehead.sub.-- s header;  struct db.sub.-- seis.sub.-- tracehead.sub.-- s *header.sub.-- ptr;  int.sub.-- t  n.sub.-- found;  int.sub.-- t nbytes;  real.sub.-- t inline.sub.-- first, inline.sub.-- last;  real.sub.-- t xline.sub.-- first, xline.sub.-- last;  int.sub.-- t nsamps;db.sub.-- token.sub.-- t   * token.sub.-- list.sub.-- ptr = NULL;  db.sub.-- token.sub.-- t path.sub.-- token.sub.-- ptr;  db.sub.-- token.sub.-- t io.sub.-- connection;  db.sub.-- token.sub.-- t io.sub.-- write.sub.-- connect;  lcs.sub.-- coord.sub.-- t nodes[2];  lcs.sub.-- coord.sub.-- t points[25];real.sub.-- t  * trace.sub.-- ptr = NULL;  real.sub.-- t * out.sub.-- trace.sub.-- ptr = NULL;  real.sub.-- t * operator.sub.-- ptr = NULL;  real.sub.-- t sumx;  real.sub.-- t sumsqx;  real.sub.-- t sumsqy;  real.sub.-- t quotient;  real.sub.-- t max.sub.-- quotient;  real.sub.-- t min.sub.-- quotient;  real.sub.-- t big.sub.-- quotient;  real.sub.-- t sample.sub.-- rate;  real.sub.-- t * sorted;  real.sub.-- t b.sub.-- 0;  real.sub.-- t b.sub.-- 1;  real.sub.-- t time[9];  real.sub.-- t ampl[9];  real.sub.-- t time.sub.-- 1[9];  real.sub.-- t ampl.sub.-- 1[9];  real.sub.-- t time.sub.-- 2[9];  real.sub.-- t ampl.sub.-- 2[9];  real.sub.-- t t1, t2, t3;  real.sub.-- t x0, x1, y0, y1, a;  real.sub.-- t told, varmin, dipmax;  real.sub.-- t variance;  real.sub.-- t corcoef;  real.sub.-- t thres;  real.sub.-- t round.sub.-- off;  real.sub.-- t xo.sub.-- i.sub.-- min, xo.sub.-- i.sub.-- max, xo.sub.--  j.sub.-- min, xo.sub.-- j.sub.-- max;  real.sub.-- t path.sub.-- i.sub.-- min, path.sub.-- i.sub.-- max,   real.sub.-- t path.sub.-- j.sub.-- min, path.sub.-- j.sub.-- max,  real.sub.-- t * i.sub.-- ptr;  real.sub.-- t tb, te;  bool.sub.-- t op.sub.-- value;  int.sub.-- t loop.sub.-- start;  int.sub.-- t loop.sub.-- end;  int.sub.-- t num.sub.-- pts;  int.sub.-- t index;  int.sub.-- t index1;  int.sub.-- t method;  int.sub.-- t inc;  int.sub.-- t i.sub.-- x, ibest;  int.sub.-- t num.sub.-- i;  int.sub.-- t num.sub.-- j;  int.sub.-- t i, j, i1, j1, ix, il;  int.sub.-- t im;  int.sub.-- t max.sub.-- dip;  int.sub.-- t ntrc;  int.sub.-- t start.sub.-- time, end.sub.-- time;  int.sub.-- t time.sub.-- window.sub.-- length;  int.sub.-- t fft.sub.-- length;  int.sub.-- t power.sub.-- 2;  int.sub.-- t fft.sub.-- power.sub.-- 2;  int.sub.-- t data.sub.-- format;  real.sub.-- t weight;  int.sub.-- t correlation.sub.-- length;  int.sub.-- t line.sub.-- name;  int.sub.-- t process.sub.-- codes[20];  int.sub.-- t exponent;  int.sub.-- t vert.sub.-- smooth;  int.sub.-- t operator;  int.sub.-- t good.sub.-- one;  int.sub.-- t offset;  int.sub.-- t adj;  units.sub.-- t  sample.sub.-- units;  uns.sub.-- t  temp.sub.-- cursor;db.sub.-- token.sub.-- t     cur.sub.-- sclass.sub.-- token ={ 0, 0, 0};  db.sub.-- token.sub.-- t cur.sub.-- seis.sub.-- rep.sub.-- token ={ 0,     0, 0};rational.sub.-- t  rcs.sub.-- line;rational.sub.-- t  rcs.sub.-- trace;OPT.sub.-- DECLARE(opt.sub.-- list1,2);  char.sub.-- t  sc.sub.-- name[DB.sub.-- SCLASS.sub.-- NAME.sub.-- LEN+1];   char.sub.-- t sc.sub.-- desc[DB.sub.-- SCLASS.sub.-- DESC.sub.--  LEN+1];string.sub.-- t sclass.sub.-- name;  string.sub.-- t sclass.sub.-- desc;  STRING.sub.-- CONSTANT (format, format.sub.-- buf,, &#34;%s&#34;);  static struct field.sub.-- criteria.sub.-- s lc.sub.-- criteria[]=   {   {DB.sub.-- FID.sub.-- LCLASS.sub.-- NAME, FIELD.sub.-- EQ, NULL, 1},    {FIELD.sub.-- END, 0, NULL, 0 }  };  static struct db.sub.-- item.sub.-- list.sub.-- s path.sub.-- items[] =  {      { DB.sub.-- FID.sub.-- P.sub.-- I.sub.-- START, 0, 1, 0,      NULL},  { DB.sub.-- FID.sub.-- P.sub.-- J.sub.-- START, 0, 1, 0, NULL},       { DB.sub.-- FID.sub.-- P.sub.-- I.sub.-- END, 0, 1, 0, NULL},  { DB.sub.-- FID.sub.-- P.sub.-- J.sub.-- END, 0, 1, 0, NULL},  { DB.sub.-- NULL.sub.-- ITEM, 0, 0, 0, NULL });static struct db.sub.-- item.sub.-- list.sub.-- s xo.sub.-- item.sub.--list[] =    {  { DB.sub.-- FID.sub.-- XO.sub.-- I.sub.-- MIN, 0, 1, 0, NULL },   { DB.sub.-- FID.sub.-- XO.sub.-- I.sub.-- MAX, 0, 1, 0, NULL },   { DB.sub.-- FID.sub.-- XO.sub.-- J.sub.-- MIN, 0, 1, 0, NULL },   { DB.sub.-- FID.sub.-- XO.sub.-- J.sub.-- MAX, 0, 1, 0, NULL },   { DB.sub.-- NULL.sub.-- ITEM, 0, 1, 0, NULL }};  STRING.sub.-- CONSTANT ( newname, namebuf, &#34;onight&#34;);  STRING.sub.-- MAKE( sclass.sub.-- name, sc.sub.-- name, DB.sub.--  SCLASS.sub.-- NAME.sub.-- LEN);  STRING.sub.-- MAKE( sclass.sub.-- desc, sc.sub.-- desc, DB.sub.--  SCLASS.sub.-- DESC.sub.-- LEN);/* the above needs to be cleaned up, not everything used */  err.sub.-- debug.sub.-- time.sub.-- delay (-1.);  *status.sub.-- ptr = IES.sub.-- E.sub.-- OK;  printf (&#34;I&#39;m inside the calculation portion\n&#34;);  data.sub.-- format = TYPE.sub.-- REAL;  OPT.sub.-- INIT( opt.sub.-- list1);  OPT.sub.-- PUT.sub.-- INT( opt.sub.-- list1,DB.sub.-- FID.sub.-- SEIS.sub.-- DATA.sub.-- FORMAT,data.sub.-- format);  /* pick up the user parameter settings */  ui.sub.-- scale.sub.-- get.sub.-- value ( sp-&gt;dialog.sub.-- token,  COH.sub.-- VERT.sub.-- AVERAGE, &amp;thres, status.sub.-- ptr);  IF.sub.-- ERROR.sub.-- WRAP (*status.sub.-- ptr);  vert.sub.-- smooth = thres;  num.sub.-- pts = 9;  operator = 0;  ui.sub.-- toggle.sub.-- get.sub.-- value (sp-&gt;dialog.sub.-- token,  COH.sub.-- CROSS.sub.-- BUTTON, &amp;op.sub.-- value, status.sub.-- ptr);  IF.sub.-- ERROR.sub.-- WRAP (*status.sub.-- ptr);  if(op.sub.-- value) operator = 1;  ui.sub.-- toggle.sub.-- get.sub.-- value ( sp-&gt;dialog.sub.-- token,  COH.sub.-- FIVE.sub.-- BUTTON, &amp;op.sub.-- value, status.sub.-- ptr);  IF.sub.-- ERROR.sub.-- WRAP (*status.sub.-- ptr);  if(op.sub.-- value)  {   operator = 2;   num.sub.-- pts = 25;  }  tb = sp-&gt;time.sub.-- begin * 1000.;  te = sp-&gt;time.sub.-- end * 1000.;  sp-&gt;seisrep.sub.-- token = db.sub.-- null.sub.-- token;  trace.sub.-- ptr = NULL;  if (sp-&gt;work.sub.-- path.sub.-- token.id == 0)  {   path.sub.-- i.sub.-- min = path.sub.-- i.sub.-- max = path.sub.--  j.sub.-- min = path.sub.-- j.sub.-- max = 0;   db.sub.-- xo.sub.-- get.sub.-- range ( &amp;sp-&gt;database.sub.-- connect,     &amp;sp-&gt;xobj.sub.-- token,    &amp;path.sub.-- i.sub.-- min, &amp;path.sub.-- i.sub.-- max,    &amp;path.sub.-- j.sub.-- min, &amp;path.sub.-- j.sub.-- max, status.sub.  -- ptr);  IF.sub.-- ERROR.sub.-- WRAP(*status.sub.-- ptr);  DB.sub.-- LCS.sub.-- I(nodes[0]) = path.sub.-- i.sub.-- min;  DB.sub.-- LCS.sub.-- I(nodes[1]) = path.sub.-- i.sub.-- max;  DB.sub.-- LCS.sub.-- J(nodes[0]) = path.sub.-- j.sub.-- min;  DB.sub.-- LCS.sub.-- J(nodes[1]) = path.sub.-- j.sub.-- max;  db.sub.-- path.sub.-- create( &amp;sp-&gt;database.sub.-- connect,    DB.sub.-- P.sub.-- TYPE.sub.-- RECT,    &amp;sp-&gt;xobj.sub.-- token,    2, nodes,    DB.sub.-- DOMAIN.sub.-- BOTH,    NULL, &amp;sp-&gt;work.sub.-- path.sub.-- token,    status.sub.-- ptr);  IF.sub.-- ERROR.sub.-- WRAP(*status.sub.-- ptr);  db.sub.-- put.sub.-- numeric(&amp;sp-&gt;database.sub.-- connect,&amp;sp-&gt;work.sub.-- path.sub.-- token,DB.sub.-- FID.sub.-- P.sub.-- VERT.sub.-- RANGE.sub.-- MIN,(gptr.sub.-- t)&amp;sp-&gt;time.sub.-- begin,status.sub.-- ptr);  IF.sub.-- ERROR(*status.sub.-- ptr) goto WRAP;db.sub.-- put.sub.-- numeric(&amp;sp-&gt;database.sub.-- connect,  &amp;sp-&gt;work.sub.-- path.sub.-- token,  DB.sub.-- FID.sub.-- P.sub.-- VERT.sub.-- RANGE.sub.-- MAX,  (gptr.sub.-- t)&amp;sp-&gt;time.sub.-- end,  status.sub.-- ptr);  IF.sub.-- ERROR(*status.sub.-- ptr) goto WRAP;}  if (DB.sub.-- TOKENS EQUAL(sp-&gt;work.sub.-- path.sub.-- token , db.sub.--   null.sub.-- token))    ERR.sub.-- SET.sub.-- AND.sub.-- WRAP ( *status.sub.-- ptr, COH.sub.--   E.sub.-- NO.sub.-- SEISMIC);  printf (&#34;I&#39;m before cursor change\n&#34;);  /* change cursor to inform user to take a break */  ui.sub.-- task.sub.-- get.sub.-- cursor ( sp-&gt;task.sub.-- token, &amp;temp.sub.-- cursor,status.sub.-- ptr);  IF.sub.-- ERROR(*status.sub.-- ptr ) goto WRAP,  ui.sub.-- task.sub.-- put.sub.-- cursor (sp-&gt;task.sub.-- token, XC.sub.-- watch,status.sub.-- ptr);  IF.sub.-- ERROR(*status.sub.-- ptr ) goto WRAP;  /* get xo if a path is selected. The other&#39;s come with an xo */   db.sub.-- get.sub.-- numeric( &amp;sp-&gt;database.sub.-- connect,&amp;sp-&gt;work.sub.-- path.sub.-- token,DB.sub.-- FID.sub.-- P.sub.-- XOBJ,(gptr.sub.-- t)&amp;sp-&gt;xobj.sub.-- token,status.sub.-- ptr);  IF.sub.-- ERROR(*status.sub.-- ptr) goto WRAP;  n.sub.-- found = 0;  if (!DB.sub.-- TOKENS.sub.-- EQUAL (sp-&gt;xobj.sub.-- token, db.sub.--  null.sub.-- token) )  {   search.sub.-- criteria [0].item.sub.-- code = DB.sub.-- FID.sub.--  SEIS.sub.-- XO.sub.-- TOKEN;   search.sub.-- criteria [0].operator = FIELD.sub.-- EQ;   search.sub.-- criteria [0].operand.sub.-- ptr= &amp;sp-&gt;xobj.sub.-- token;   search.sub.-- criteria [0].n.sub.-- operand = 0;   search.sub.-- criteria [1].item.sub.-- code = DB.sub.-- FID.sub.--  SEIS.sub.-- CLASS.sub.-- TOKEN;   search.sub.-- criteria [1].operator = FIELD.sub.-- EQ;   search.sub.-- criteria [1].operand.sub.-- ptr= &amp;sp-&gt;class.sub.--  token;   search.sub.-- criteria [1].n.sub.-- operand = 0;   search.sub.-- criteria [2].item.sub.-- code = FIELD.sub.-- END;    db.sub.-- list (&amp;sp-&gt;database.sub.-- connect, DB.sub.-- CAT.sub.--  SEIS.sub.-- REP, search.sub.-- criteria,NULL, NULL, 0, NULL,&amp;token.sub.-- list.sub.-- ptr, &amp;n.sub.-- found,  status.sub.-- ptr);   IF.sub.-- ERROR.sub.-- WRAP ( *status.sub.-- ptr);  }  if (n.sub.-- found &gt; 0)  {   sp-&gt;seisrep.sub.-- token = token.sub.-- list.sub.-- ptr[0];   db.sub.-- list.sub.-- dealloc ( NULL, token.sub.-- list.sub.-- ptr,  status.sub.-- ptr );  }  else  {   ERR.sub.-- SET.sub.-- AND.sub.-- WRAP ( *status.sub.-- ptr, COH.sub.--  E.sub.-- NO.sub.-- SEISMIC);  }  /*   * Get the sample rate for the seismic data   */  db.sub.-- get.sub.-- numeric( &amp;sp-&gt;(database.sub.-- connect,&amp;sp-&gt;seisrep.sub.-- token,DB.sub.-- FID.sub.-- SEIS.sub.-- NSAMPS,(gptr.sub.-- t)&amp;nsamps,status.sub.-- ptr);  IF.sub.-- ERROR(*status.sub.-- ptr ) goto WRAP;  db.sub.-- get.sub.-- numeric( &amp;sp-&gt;(database.sub.-- connect,&amp;sp-&gt;seisrep.sub.-- token,DB.sub.-- HD.sub.-- SEIS.sub.-- SI,(gptr.sub.-- t)&amp;sample.sub.-- rate,status.sub.-- ptr);  IF.sub.-- ERROR( *status.sub.-- ptr) goto WRAP;  db.sub.-- get.sub.-- numeric( &amp;sp-&gt;(database.sub.-- connect,&amp;sp-&gt;seisrep.sub.-- token,DB.sub.-- FID.sub.-- SEIS.sub.-- SI.sub.-- UNITS,(gptr.sub.-- t)&amp;sample.sub.-- units,status.sub.-- ptr);  IF.sub.-- ERROR( *status.sub.-- ptr ) goto WRAP;  db.sub.-- get.sub.-- numeric( &amp;sp-&gt;(database.sub.-- connect,  &amp;sp-&gt;work.sub.-- path.sub.-- token,  DB.sub.-- FID.sub.-- P.sub.-- TYPE,  (gptr.sub.-- t)&amp;sp-&gt;path.sub.-- type,  status.sub.-- ptr);  IF.sub.-- ERROR(*status.sub.-- ptr) goto WRAP;  db.sub.-- get.sub.-- numeric( &amp;sp-&gt;(database.sub.-- connect,&amp;sp-&gt;work.sub.-- path.sub.-- token,DB.sub.-- FID.sub.-- P.sub.-- VERT.sub.-- RANGE.sub.-- MIN,(gptr.sub.-- t)&amp;sp-&gt;time.sub.-- begin,status.sub.-- ptr);  IF.sub.-- ERROR(*status.sub.-- ptr ) goto WRAP;  db.sub.-- get.sub.-- numeric( &amp;sp-&gt;(database.sub.-- connect,&amp;sp-&gt;work.sub.-- path.sub.-- token,DB.sub.-- FID.sub.-- P.sub.-- VERT.sub.-- RANGE.sub.-- MAX,(gptr.sub.-- t)&amp;sp-&gt;time.sub.-- end,status.sub.-- ptr);  IF.sub.-- ERROR(*status.sub.-- ptr ) goto WRAP;  /* if it is a 3D path, get nodes and define multiple paths */  /* get the limits of the exploration object (survey) */  xo.sub.-- item.sub.-- list[0].data.sub.-- ptr = &amp;xo.sub.-- i.sub.--  min;  xo.sub.-- item.sub.-- list[1].data.sub.-- ptr = &amp;xo.sub.-- i.sub.--  max;  xo.sub.-- item.sub.-- list[2].data.sub.-- ptr = &amp;xo.sub.-- j.sub.--  min;  xo.sub.-- item.sub.-- list[3].data.sub.-- ptr = &amp;xo.sub.-- j.sub.--  max;  db.sub.-- get.sub.-- items( &amp;sp-&gt;database.sub.-- connect,&amp;sp-&gt;xobj.sub.-- token,xo.sub.-- item.sub.-- list,status.sub.-- ptr );  IF.sub.-- ERROR.sub.-- WRAP ( *status.sub.-- ptr);    /* get the limits of the selected path */  path.sub.-- items[0].data.sub.-- ptr = &amp;path.sub.-- i.sub.-- min;   path.sub.-- items[1].data.sub.-- ptr = &amp;path.sub.-- i.sub.-- min;   path.sub.-- items[2].data.sub.-- ptr = &amp;path.sub.-- j.sub.-- max;   path.sub.-- items[3].data.sub.-- ptr = &amp;path.sub.-- j.sub.-- max;   db.sub.-- get.sub.-- items ( &amp;sp-&gt;database.sub.-- connect,&amp;sp-&gt;work.sub.-- path.sub.-- token,path.sub.-- items,status.sub.-- ptr );  IF.sub.-- ERROR.sub.-- WRAP ( *status.sub.-- ptr);   /*    * Make sure incoming path is within survey bounds    */  sp-&gt;xline.sub.-- begin = CLIP (path.sub.-- i.sub.-- min, xo.sub.--  i.sub.-- min, xo.sub.-- i.sub.-- max);  sp-&gt;xline.sub.-- end = CLIP (path.sub.-- i.sub.-- max, xo.sub.--  i.sub.-- min, xo.sub.-- i.sub.-- max);  sp-&gt;inline.sub.-- begin = CLIP (path.sub.-- j.sub.-- min, xo.sub.--  j.sub.-- min, xo.sub.-- j.sub.-- max);  sp-&gt;inline.sub.-- end = CLIP (path.sub.-- j.sub.-- max, xo.sub.--  j.sub.-- min, xo.sub.-- j.sub.-- max);   /*    * see if the size of the rectangle is within acceptable limits*/  if (ABS(sp-&gt;inline.sub.-- end - sp-&gt;inline begin) &lt;= 0.0 &amp;&amp;ABS(sp-&gt;xline.sub.-- end - sp-&gt;xline.sub.-- begin) &lt;= 0.0)  {IF.sub.-- ERROR.sub.-- WRAP ( *status.sub.-- ptr);  }  xline.sub.-- first = sp-&gt;xline.sub.-- begin;  xline.sub.-- last = sp-&gt;xline.sub.-- end;  if (sp-&gt;path.sub.-- type == DB.sub.-- P.sub.-- TYPE.sub.-- RECT)   {    num.sub.-- i = path.sub.-- i.sub.-- max - path.sub.-- i.sub.-- min +  1;    num.sub.-- j = path.sub.-- j.sub.-- max - path.sub.-- j.sub.-- min +  1;  }/* we now have our geometry for the seismic volume defined */  /*   * do some validity checking of values to make sure they&#39;re ok   */  if ( sp-&gt;time.sub.-- begin &lt; 0.0 ) sp-&gt;time.sub.-- begin = 0.0;   if ( sp-&gt;time.sub.-- end &gt; sample.sub.-- rate * nsamps)  {  sp-&gt;time.sub.-- end = sample.sub.-- rate * nsamps  db.sub.-- put.sub.-- numeric(&amp;sp-&gt;database.sub.-- connect,&amp;sp-&gt;work.sub.-- path.sub.-- token,DB.sub.-- FID.sub.-- P.sub.-- VERT.sub.-- RANGE.sub.-- MAX,(gptr.sub.-- t)&amp;sp-&gt;time.sub.-- end,status.sub.-- ptr);  IF.sub.-- ERROR(*status.sub.-- ptr) goto WRAP;  }  /*   * Set up necessary variables for the main trace loop   */  sp-&gt;time.sub.-- begin = sp-&gt;time.sub.-- begin * 1000.  sp-&gt;time.sub.-- end = sp-&gt;time.sub.-- end * 1000.;  /* compute the length in samples for 5% of the trace time range */   round.sub.-- off = sample.sub.-- rate/2;  time.sub.-- window.sub.-- length = ((sp-&gt;time.sub.-- end - sp-&gt;time.sub.  -- begin) * 0.001 + round.sub.-- off)/sample.sub.-- rate;/*  start.sub.-- time  = (sp-&gt;time.sub.-- begin *0.001+round.sub.-- off)/sample.sub.--  rate;  end.sub.-- time = (sp-&gt;time.sub.-- end *0.001+round.sub.-- off)/sample.s  ub.-- rate;*/  nbytes = nsamps * sizeof(real.sub.-- t);  correlation.sub.-- length = end.sub.-- time  fft.sub.-- length = power.sub.-- of.sub.-- 2 (correlation.sub.--  length);  power.sub.-- 2 = what.sub.-- power.sub.-- of.sub.-- 2 ( fft.sub.--  length);  if(nbytes &lt; fft.sub.-- length) nbytes = fft.sub.-- length;  mem.sub.-- alloc (num.sub.-- pts*nbytes*sizeof(real.sub.-- t),(gptr.sub.  -- t *)&amp;trace.sub.-- ptr,status.sub.-- ptr);  IF.sub.-- ERROR( *status.sub.-- ptr) goto WRAP;  mem.sub.-- set( NULL, trace.sub.-- ptr,    nbytes * sizeof ( real.sub.-- t),    status.sub.-- ptr );  IF.sub.-- ERROR.sub.-- WRAP(*status.sub.-- ptr);  mem.sub.-- alloc (num.sub.-- i*sizeof(struct db.sub.-- seis.sub.--  tracehead.sub.-- s),  (gptr.sub.-- t *)&amp;header.sub.-- ptr,status.sub.-- ptr);  IF.sub.-- ERROR( *status.sub.-- ptr) goto WRAP;  mem.sub.-- alloc (num.sub.-- pts * sizeof(real.sub.-- t), (gptr.sub.--  t *)&amp;sorted, status.sub.-- ptr);  IF.sub.-- ERROR( *status.sub.-- ptr ) goto WRAP;  mem.sub.-- alloc (nbytes * sizeof(real.sub.-- t), (gptr.sub.-- t  *)&amp;operator.sub.-- ptr, status.sub.-- ptr);  IF.sub.-- ERROR( *status.sub.-- ptr) goto WRAP;  mem.sub.-- alloc (nbytes * sizeof(real.sub.-- t), (gptr.sub.-- t  *)&amp;out.sub.-- trace.sub.-- ptr, status.sub.-- ptr);  IF.sub.-- ERROR( *status.sub.-- ptr ) goto WRAP;  mem.sub.-- set( NULL, out.sub.-- trace.sub.-- ptr,nbytes * sizeof ( real.sub.-- t),status.sub.-- ptr )  IF.sub.-- ERROR.sub.-- WRAP(*status.sub.-- ptr);  mem.sub.-- alloc (num.sub.-- pts * sizeof(real.sub.-- t), (gptr.sub.--  t *)&amp;i.sub.-- ptr, status.sub.-- ptr);  IF.sub.-- ERROR( *status.sub.-- ptr) goto WRAP;  /*   *  create output all class and seisrep definitions   */  ui.sub.-- text.sub.-- get ( sp-&gt;dialog.sub.-- token,COH.sub.-- CLASS.sub.-- NAME,&amp;sclass.sub.-- name,status.sub.-- ptr);  IF.sub.-- ERROR.sub.-- WRAP (*status.sub.-- ptr);  ui.sub.-- text.sub.-- get ( sp-&gt;dialog.sub.-- token,COH.sub.-- CLASS.sub.-- DESC,&amp;sclass.sub.-- desc,status.sub.-- ptr)  IF.sub.-- ERROR.sub.-- WRAP (*status.sub.-- ptr);  process.sub.-- codes[0] = 39;  db.sub.-- sclass.sub.-- create( &amp;sp-&gt;database.sub.-- connect, &amp;sclass.sub.-- name, &amp;sclass.sub.-- desc, 39, &amp;sp-&gt;class.sub.-- token, process.sub.-- codes, &amp;db.sub.-- null.sub.-- token, &amp;opt.sub.-- list1 &amp;cur.sub.-- sclass.sub.-- token, status.sub.-- ptr );  IF.sub.-- ERROR.sub.-- WRAP (*status.sub.-- ptr);  db.sub.-- seis.sub.-- create(&amp;sp-&gt;database.sub.-- connect,&amp;sp-&gt;xobj.sub.-- token,&amp;cur.sub.-- sclass.sub.-- token,nsamps,sample.sub.-- rate,&amp;sample.sub.-- units,DB.sub.-- DOMAIN.sub.-- TIME,&amp;opt.sub.-- list1,&amp;cur.sub.-- seis.sub.-- rep.sub.-- token,status.sub.-- ptr);  IF.sub.-- ERROR.sub.-- WRAP (*status.sub.-- ptr);  for (i=1; i&lt;num.sub.-- pts; i++)   i.sub.-- ptr[i-1] = i;  printf (&#34;Inline/Crossline ranges\n&#34;);  printf (&#34;first inline: %f\n&#34;, sp-&gt;inline.sub.-- begin);   printf (&#34;last inline: %f\n&#34;, sp-&gt;inline.sub.-- end);   printf (&#34;first xline: %f\n&#34;, sp-&gt;xline.sub.-- begin);   printf (&#34;last xline: %f\n&#34;, sp-&gt;xline.sub.-- end);  /*   * top of seismic loop   */  offset = 2;  if(operator == 0) offset = 1;  for ( inline.sub.-- first = sp-&gt;inline.sub.-- begin+offset;    inline.sub.-- first &lt; sp-&gt;inline.sub.-- end-offset;    inline.sub.-- first++)  {    inline.sub.-- last = inline.sub.-- first;  /* operator path specific to user selection */  loop.sub.-- start = xline.sub.-- first + 1;  loop.sub.-- end = xline.sub.-- last - 2;  }  if (operator != 0)  {    loop.sub.-- start = xline.sub.-- first + 2;    loop.sub.-- end = xline.sub.-- last - 2;  }  for (i.sub.-- x = loop.sub.-- start; i.sub.-- x &lt;= loop.sub.-- end;  i.sub.-- x++)  {    if (operator = 0)  {    DB.sub.-- LCS.sub.-- I ( points[0]) = i.sub.-- x-1;    DB.sub.-- LCS.sub.-- J ( points[0]) = inline.sub.-- first-1;    DB.sub.-- LCS.sub.-- I ( points[1]) = i.sub.-- x;    DB.sub.-- LCS.sub.-- J ( points[1]) = inline.sub.-- first-1;    DB.sub.-- LCS.sub.-- I ( points[2]) = i.sub.-- x+1;    DB.sub.-- LCS.sub.-- J ( points[2]) = inline.sub.-- first-1;    DB.sub.-- LCS.sub.-- I ( points[3]) = i.sub.-- x-1;    DB.sub.-- LCS.sub.-- J ( points[3]) = inline.sub.-- first;    DB.sub.-- LCS.sub.-- I ( points[4]) = i.sub.-- x;    DB.sub.-- LCS.sub.-- J ( points[4]) = inline.sub.-- first;    DB.sub.-- LCS.sub.-- I ( points[5]) = i.sub.-- x+1;    DB.sub.-- LCS.sub.-- J ( points[5]) = inline.sub.-- first;    DB.sub.-- LCS.sub.-- I ( points[6]) = i.sub.-- x-1;    DB.sub.-- LCS.sub.-- J ( points[6]) = inline.sub.-- first+1;    DB.sub.-- LCS.sub.-- I ( points[7]) = i.sub.-- x;    DB.sub.-- LCS.sub.-- J ( points[7]) = inline.sub.-- first+1;    DB.sub.-- LCS.sub.-- I ( points[8]) = i.sub.-- x+1;    DB.sub.-- LCS.sub.-- J ( points[8]) = inline.sub.-- first+1;    good.sub.-- one = 4;  }  if (operator == 1 )  {    DB.sub.-- LCS.sub.-- I ( points[0]) = i.sub.-- x-2;    DB.sub.-- LCS.sub.-- J ( points[0]) = inline.sub.-- first;    DB.sub.-- LCS.sub.-- I ( points[1]) = i.sub.-- x-1;    DB.sub.-- LCS.sub.-- J ( points[1]) = inline.sub.-- first;    DB.sub.-- LCS.sub.-- I ( points[2]) = i.sub.-- x;    DB.sub.-- LCS.sub.-- J ( points[2]) = inline.sub.-- first;    DB.sub.-- LCS.sub.-- I ( points[3]) = i.sub.-- x+1;    DB.sub.-- LCS.sub.-- J ( points[3]) = inline.sub.-- first;    DB.sub.-- LCS.sub.-- I ( points[4]) = i.sub.-- x+2;    DB.sub.-- LCS.sub.-- J ( points[4]) = inline.sub.-- first;    DB.sub.-- LCS.sub.-- I ( points[5]) = i.sub.-- x;    DB.sub.-- LCS.sub.-- J ( points[5]) = inline.sub.-- first-2;    DB.sub.-- LCS.sub.-- I ( points[6]) = i.sub.-- x;    DB.sub.-- LCS.sub.-- J ( points[6]) = inline.sub.-- first-1;    DB.sub.-- LCS.sub.-- I ( points[7]) = i.sub.-- x;    DB.sub.-- LCS.sub.-- J ( points[7]) = inline.sub.-- first+1;    DB.sub.-- LCS.sub.-- I ( points[8]) = i.sub.-- x;    DB.sub.-- LCS.sub.-- J ( points[8]) = inline.sub.-- first+2;    good.sub.-- one = 2;  }  if (operator == 2)  {    DB.sub.-- LCS.sub.-- I ( points[0]) = i.sub.-- x-2;    DB.sub.-- LCS.sub.-- J ( points[0]) = inline.sub.-- first-2;    DB.sub.-- LCS.sub.-- I ( points[1]) = i.sub.-- x-1;    DB.sub.-- LCS.sub.-- J ( points[1]) = inline.sub.-- first-2;    DB.sub.-- LCS.sub.-- I ( points[2]) = i.sub.-- x;    DB.sub.-- LCS.sub.-- J ( points[2]) = inline.sub.-- first-2;    DB.sub.-- LCS.sub.-- I ( points[3]) = i.sub.-- x+1;    DB.sub.-- LCS.sub.-- J ( points[3]) = inline.sub.-- first-2;    DB.sub.-- LCS.sub.-- I ( points[4]) = i.sub.-- x+2;    DB.sub.-- LCS.sub.-- J ( points[4]) = inline.sub.-- first-2;    DB.sub.-- LCS.sub.-- I ( points[5]) = i.sub.-- x-2;    DB.sub.-- LCS.sub.-- J ( points[5]) = inline.sub.-- first-1;    DB.sub.-- LCS.sub.-- I ( points[6]) = i.sub.-- x-1;    DB.sub.-- LCS.sub.-- J ( points[6]) = inline.sub.-- first-1;    DB.sub.-- LCS.sub.-- I ( points[7]) = i.sub.-- x;    DB.sub.-- LCS.sub.-- J ( points[7]) = inline.sub.-- first-1;    DB.sub.-- LCS.sub.-- I ( points[8]) = i.sub.-- x+1;    DB.sub.-- LCS.sub.-- J ( points[8]) = inline.sub.-- first-1;    DB.sub.-- LCS.sub.-- I ( points[9]) = i.sub.-- x+2;    DB.sub.-- LCS.sub.-- J ( points[9]) = inline.sub.-- first-1;    DB.sub.-- LCS.sub.-- I ( points[10]) = i.sub.-- x-2;    DB.sub.-- LCS.sub.-- J ( points[10]) = inline.sub.-- first;    DB.sub.-- LCS.sub.-- I ( points[11]) = i.sub.-- x-1;    DB.sub.-- LCS.sub.-- J ( points[11]) = inline.sub.-- first;    DB.sub.-- LCS.sub.-- I ( points[12]) = i.sub.-- x;    DB.sub.-- LCS.sub.-- J ( points[12]) = inline.sub.-- first;    DB.sub.-- LCS.sub.-- I ( points[13]) = i.sub.-- x+1;    DB.sub.-- LCS.sub.-- J ( points[13]) = inline.sub.-- first;    DB.sub.-- LCS.sub.-- I ( points[14]) = i.sub.-- x+2;    DB.sub.-- LCS.sub.-- J ( points[14]) = inline.sub.-- first;    DB.sub.-- LCS.sub.-- I ( points[15]) = i.sub.-- x-2;    DB.sub.-- LCS.sub.-- J ( points[15]) = inline.sub.-- first+1;DB.sub.-- LCS.sub.-- I ( points[16]) = i.sub.-- x-1;    DB.sub.-- LCS.sub.-- J ( points[16]) = inline.sub.-- first+1;DB.sub.-- LCS.sub.-- I ( points[17]) = i.sub.-- x;    DB.sub.-- LCS.sub.-- J ( points[17]) = inline.sub.-- first+1;DB.sub.-- LCS.sub.-- I ( points[18]) = i.sub.-- x+1;    DB.sub.-- LCS.sub.-- J ( points[18]) = inline.sub.-- first+1;DB.sub.-- LCS.sub.-- I ( points[19]) = i.sub.-- x+2;    DB.sub.-- LCS.sub.-- J ( points[19]) = inline.sub.-- first+1;DB.sub.-- LCS.sub.-- I ( points[20]) = i.sub.-- x-2;    DB.sub.-- LCS.sub.-- J ( points[20]) = inline.sub.-- first+2;DB.sub.-- LCS.sub.-- I ( points[21]) = i.sub.-- x-1;    DB.sub.-- LCS.sub.-- J ( points[21]) = inline.sub.-- first+2;DB.sub.-- LCS.sub.-- I ( points[22]) = i.sub.-- x;    DB.sub.-- LCS.sub.-- J ( points[22]) = inline.sub.-- first+2    DB.sub.-- LCS.sub.-- I ( points[23]) = i.sub.-- x+1;    DB.sub.-- LCS.sub.-- J ( points[23]) = inline.sub.-- first+2;DB.sub.-- LCS.sub.-- I ( points[24]) = i.sub.-- x+2;    DB.sub.-- LCS.sub.-- J ( points[24]) = inline.sub.-- first+2;good.sub.-- one = 12;  }    db.sub.-- path.sub.-- create (&amp;sp-&gt;database.sub.-- connect,DB.sub.-- P.sub.-- TYPE.sub.-- LIST,&amp;sp-&gt;xobj.sub.-- token,num.sub.-- pts,points,DB.sub.-- DOMAIN.sub.-- BOTH,NULL,&amp;path.sub.-- token.sub.-- ptr,status.sub.-- ptr );    IF.sub.-- ERROR.sub.-- WRAP ( *status.sub.-- ptr);/*    sp-&gt;time.sub.-- end = s.sub.-- &gt;time.sub.-- end / 1000.;    */    db.sub.-- put.sub.-- numeric (&amp;sp-&gt;database connect,&amp;path.sub.-- token.sub.-- ptr,DB.sub.-- FID.sub.-- P.sub.-- VERT.sub.-- RANGE.sub.-- MAX,(gptr.sub.-- t)&amp;sp-&gt;time.sub.-- end,status.sub.-- ptr);    IF.sub.-- ERROR(*status.sub.-- ptr) goto WRAP;/*    sp-&gt;time.sub.-- end = sp-&gt;time.sub.-- end * 1000.;    */    /* check to make sure there is a valid path.sub.-- token */    db.sub.-- seis.sub.-- read.sub.-- init (&amp;sp-&lt;database.sub.-- connect,&amp;sp-&gt;seisrep.sub.-- token,&amp;path.sub.-- token.sub.-- ptr,NULL,&amp;io.sub.-- connection,status.sub.-- ptr);    if ( IS.sub.-- ERROR(*status.sub.-- ptr) &amp;&amp;*status.sub.-- ptr != DB.sub.-- I.sub.-- SC.sub.-- NO.sub.-- DATA){io.sub.-- connection = db.sub.-- null.sub.-- token;goto WRAP;    }    db.sub.-- seis.sub.-- write.sub.-- init (&amp;sp-&gt;database.sub.--  connect,&amp;cur.sub.-- seis.sub.-- rep.sub.-- token,&amp;opt.sub.-- list1,&amp;io.sub.-- write.sub.-- connect,status.sub.-- ptr );    if ( IS.sub.-- ERROR(*status.sub.-- ptr) &amp;&amp;*status.sub.-- ptr != DB.sub.-- I.sub.-- SC.sub.-- NO.sub.-- DATA){io.sub.-- connection = db.sub.-- null.sub.-- token;goto WRAP;    }    /** Trace read loop for each path*/    ntrc = -1    do  {ntrc += 1;db.sub.-- seis.sub.-- read.sub.-- data ( &amp;sp-&gt;database.sub.--  connect,&amp;io.sub.-- connection,NULL,&amp;header,out.sub.-- trace.sub.-- ptr,status.sub.-- ptr );    if (IS.sub.-- ERROR(*status.sub.-- ptr) &amp;&amp;*status ptr != DB.sub.-- SC.sub.-- NO.sub.-- DATA ) continue;/* check for a non-zero extraction window */    if ( header.n.sub.-- live == 0 ) continue;    if(ntrc == good.sub.-- one)    {header.sub.-- ptr[0] = header;    } index = nsamps*ntrc; for (i=0; i&lt;nsamps; i++) {trace.sub.-- ptr[index+i] = out.sub.-- trace.sub.-- ptr[i]; }    } while ( !IS.sub.-- ERROR(*status.sub.-- ptr));    if (!IS.sub.-- ERROR(*status.sub.-- ptr) ∥*status.sub.-- ptr = DB.sub.-- I.sub.-- SC.sub.-- READ.sub.-- ALL){NO.sub.-- ERROR(*status.sub.-- ptr);    }  db.sub.-- seis.sub.-- read.sub.-- term (&amp;sp-&gt;database.sub.-- connect, &amp;io.sub.-- connection,status.sub.-- ptr)  IF.sub.-- ERROR.sub.-- WRAP(*status.sub.-- ptr);  db.sub.-- object.sub.-- delete ( &amp;sp-&gt;database.sub.-- connect,&amp;path.sub.-- token.sub.-- ptr,status.sub.-- ptr);  IF.sub.-- ERROR.sub.-- WRAP ( *status.sub.-- ptr);  /*   * Ok. We got the traces. Do stuff here.   */  for (i=0; i&lt;=nsamps; i++) out.sub.-- trace.sub.-- ptr[i]=0.0;   start.sub.-- time        = (tb *0.001+round.sub.-- off) / sample.sub.-- rate;         end.sub.-- time = (te *0.001+round.sub.-- off) / sample.sub.        -- rate;  told = 0.0;   max.sub.-- dip = 4;/* Weighted variance computation method */  for (i=start.sub.-- time; i&lt; end.sub.-- time i++) /* for all samples */   sumsqx = 0.0;    sumsqy = 0.0;  weight = 0.0;  for(im=-vert.sub.-- smooth/2; im&lt;i; im++) {    sumx = trace.sub.-- ptr[0*nsamps +i +im]     + trace.sub.-- ptr[1 *nsamps +i +im]  + trace.sub.-- ptr[2*nsamps +i +im]  + trace.sub.-- ptr[3*nsamps +i +im]    + trace.sub.-- ptr[4*nsamps +i +im]  + trace.sub.-- ptr[5*nsamps +i +im]  + trace.sub.-- ptr[6*nsamps +i +im]  + trace.sub.-- ptr[7*nsamps +i +im]  + trace.sub.-- ptr[8*nsamps +i +im];  sumx /= 9.0;  max.sub.-- quotient = (trace.sub.-- ptr[0*nsamps +i +im]-sumx)*(trace.su   b.-- ptr[0*nsamps +i +im]-sumx)  + (trace.sub.-- ptr[1*nsamps +i +im]-sumx)*(trace.sub.-- ptr[1*nsamps   +i +im]-sumx)  + (trace.sub.-- ptr[2*nsamps +i +im]-sumx)*(trace.sub.-- ptr[2*nsamps   +i +im]-sumx)  + (trace.sub.-- ptr[3*nsamps +i +im]-sumx)*(trace.sub.-- ptr[3*nsamps   +i +im]-sumx)  + (trace.sub.-- ptr[4*nsamps +i +im]-sumx)*(trace.sub.-- ptr[4*nsamps   +i +im]-sumx)  + (trace.sub.-- ptr[5*nsamps +i +im]-sumx)*(trace.sub.-- ptr[5*nsamps   +i +im]-sumx)  + (trace.sub.-- ptr[6*nsamps +i +im]-sumx)*(trace.sub.-- ptr[6*nsamps   +i +im]-sumx)  + (trace.sub.-- ptr[7*nsamps +i +im]-sumx)*(trace.sub.-- ptr[7*nsamps   +i +im]-sumx)  + (trace.sub.-- ptr[8*nsamps +i +im]-sumx)*(trace.sub.-- ptr[8*nsamps   +i +im]-sumx);  max.sub.-- quotient *= weight;  sumsqx += max.sub.-- quotient;  max.sub.-- quotient = trace.sub.-- ptr[0*nsamps +i +im] * trace.sub.--ptr[0*nsamps +i +im]     + trace.sub.-- ptr[1*nsamps +i +im] * trace.sub.-- ptr[1*nsamps   +i +im]  + trace.sub.-- ptr[2*nsamps +i +im] * trace.sub.-- ptr[2*nsamps +i +im]  + trace.sub.-- ptr[3*nsamps +i +im] * trace.sub.-- ptr[3*nsamps +i +im]  + trace.sub.-- ptr[4*nsamps +i +im] * trace.sub.-- ptr[4*nsamps +i +im]  + trace.sub.-- ptr[5*nsamps +i +im] * trace.sub.-- ptr[5*nsamps +i +im]  + trace.sub.-- ptr[6*nsamps +i +im] * trace.sub.-- ptr[6*nsamps +i +im]  + trace.sub.-- ptr[7*nsamps +i +im] * trace.sub.-- ptr[7*nsamps +i +im]  + trace.sub.-- ptr[8*nsamps +i +im] * trace.sub.-- ptr[8*nsamps +i   +im];  max.sub.-- quotient *= weight;  sumsqy += max.sub.-- quotient;  weight += 1.0/(vert.sub.-- smooth/2);  }  weight= 1.0;  for(im= 1; im&lt;vert.sub.-- smooth/2+1; im++){   sumx = trace.sub.-- ptr[0*nsamps +i +im]     + trace.sub.-- ptr[1*nsamps +i +im]  + trace.sub.-- ptr[2*nsamps +i +im]  + trace.sub.-- ptr[3*nsamps +i +im]  + trace.sub.-- ptr[4*nsamps +i +im]  + trace.sub.-- ptr[5*nsamps +i +im]  + trace.sub.-- ptr[6*nsamps +i +im]  + trace.sub.-- ptr[7*nsamps +i +im]  + trace.sub.-- ptr[8*nsamps +i +im];  sumx /= 9.0;  max.sub.-- quotient = (trace.sub.-- ptr[0*nsamps +i +im]-sumx)*(trace.su   b.-- ptr[0*nsamps +i *im]-sumx)     + (trace.sub.-- ptr[1 *nsamps +i +im]-sumx)*(trace.sub.--   ptr[1*nsamps +i +im]-sumx)  + (trace.sub.-- ptr[2*nsamps +i +im]-sumx)*(trace.sub.-- ptr[2*nsamps   +i +im]-sumx)  + (trace.sub.-- ptr[3*nsamps +i +im]-sumx)*(trace.sub.-- ptr[3*nsamps   +i +im]-sumx)  + (trace.sub.-- ptr[4*nsamps +i +im]-sumx)*(trace.sub.-- ptr[4*nsamps   +i +im]-sumx)  + (trace.sub.-- ptr[5*nsamps +i +im]-sumx)*(trace.sub.-- ptr[5*nsamps   +i +im]-sumx)  + (trace.sub.-- ptr[6*nsamps +i +im]-sumx)*(trace.sub.-- ptr[6*nsamps   +i +im]-sumx)  + (trace.sub.-- ptr[7*nsamps +i +im]-sumx)*(trace.sub.-- ptr[7*nsamps   +i +im]-sumx)  + (trace.sub.-- ptr[8*nsamps +i +im]-sumx)*(trace.sub.-- ptr[8*nsamps   +i +im]-sumx);  max.sub.-- quotient *= weight;  sumsqx += max.sub.-- quotient;max.sub.-- quotient = trace.sub.-- ptr[0*nsamps +i +im] * trace.sub.--ptr[0*nsamps +i +im]     + trace.sub.-- ptr[1 *nsamps +i +im] * trace.sub.-- ptr[1   *nsamps +i +im]  + trace.sub.-- ptr[2*nsamps +i +im] * trace.sub.-- ptr[2*nsamps +i +im]  + trace.sub.-- ptr[3*nsamps +i +im] * trace.sub.-- ptr[3*nsamps +i +im]  + trace.sub.-- ptr[4*nsamps +i +im] * trace.sub.-- ptr[4*nsamps +i +im]  + trace.sub.-- ptr[5*nsamps +i +im] * trace.sub.-- ptr[5*nsamps +i +im]  + trace.sub.-- ptr[6*nsamps +i +im] * trace.sub.-- ptr[6*nsamps +i +im]    + trace.sub.-- ptr[7*nsamps +i +im] * trace.sub.-- ptr[7*nsamps +i   +im]  + trace.sub.-- ptr[8*nsamps +i +im] * trace.sub.-- ptr[8*nsamps +i   +im];  max.sub.-- quotient *= weight;  sumsqy += max.sub.-- quotient;  weight -= 1.O/(vert.sub.-- smooth/2);  }  out.sub.-- trace.sub.-- ptr[i] = sumsqx/sumsqy;}  /* output results for either method */  db.sub.-- seis.sub.-- write.sub.-- trace( &amp;sp-&gt;database.sub.-- connect,    &amp;io.sub.-- write.sub.-- connect,    NULL,    &amp;header.sub.-- ptr[0],    out.sub.-- trace.sub.-- ptr,    status.sub.-- ptr); IF.sub.-- ERROR(*status.sub.-- ptr); db.sub.-- seis.sub.-- write.sub.-- term (&amp;sp-&gt;database.sub.-- connect,    &amp;io.sub.-- write.sub.-- connect,    status.sub.-- ptr); IF.sub.-- ERROR.sub.-- WRAP(*status.sub.-- ptr); } printf( &#34;SEISMIC line %f finished.\n&#34;, inline.sub.-- first);}  db.sub.-- seis.sub.-- update.sub.-- statistics (&amp;sp-&gt;database.sub.--  connect,&amp;cur.sub.-- seis.sub.-- rep.sub.-- token,status.sub.-- ptr);WRAP:  /* clean up memory */  if ( trace.sub.-- ptr != NULL)    mem.sub.-- dealloc ( (gptr.sub.-- t)trace.sub.-- ptr, status.sub.--  ptr);  ui.sub.-- task.sub.-- put.sub.-- cursor ( sp-&gt;task.sub.-- token, temp.sub.-- cursor,status.sub.-- ptr)  ERR.sub.-- WRAPUP ( *status.sub.-- ptr, COH.sub.-- EXECUTION.sub.--  FAILED);}__________________________________________________________________________ 
    
     The invention being thus described, it will be obvious that the same may be varied in many ways. Such variations are not to be regarded as a departure from the spirit and scope of the invention, and all such modifications as would be obvious to one skilled in the art are intended to be included within the scope of the following claims.