My book also shows examples of how to find missing portions of signals, both in their interior and exterior. It also shows some applications of multidimensional prediction-error filters. Additionally, the book illustrates the idea of fitting in small windows and choosing edge conditions so as to be able to merge windows fairly seamlessly. In SEP-73 I formalized and extended the ideas behind windowing as a means of coping with nonstationarity and I integrated it with prediction-error filtering in 2-D, and have since extended it to 3-D and prepared more examples Claerbout (1993b), 1993a, 1992c, 1992d, and 1992a.
Here I develop code to restore and extend a 3-D data cube by a two-stage linear least squares process. In the first stage I fit a 3-D prediction-error filter (PEF) to the given cube. Regression equations that involve unknown missing data elements are weighted to zero before solving the least-squares problem by conjugate gradients. In a second stage, I take the PEF as known and I find missing elements in (or beyond) the cube to minimize the power out of the prediction-error filter.