%\section{SMOOTHING DIX}
For our next example we will set up a simple interval from stacking
velocity estimation problem. 
Assuming a $v(z)$ earth with flat reflectors, we can define the
theoretical RMS velocities by 
\beq
V_{rms}(j) = {\sum_{i=0}^{i=j} V_{int}(i) * t(i) \over \sum_{i=0}^{i=j} t(i)}.
\eeq
We can rewrite this equation in matrix form as
\begin{equation}
\bold C\bold u = \bold d 
\end{equation}
where
\begin{description}
\item  [$\bold C$]
is the matrix of causal integration, a lower triangular matrix of ones.
\item [$\bold u$]
is a vector whose components range over the vertical
traveltime depth $\tau$,
and whose component values contain the interval velocity squared
$v_{\rm interval}^2 $.
\item  [$\bold d$]
is a data vector whose components range over the vertical
travel time depth $\tau$,
and whose component values contain the scaled RMS velocity squared
$\tau v_{\rm RMS}^2/\Delta \tau $
where
$\tau /\Delta \tau $ is the index on the time axis.
\end{description}


\par
Start from a CMP gather $q(t,i)$ moveout corrected with velocity $v$.
A good starting guess for our RMS velocity function
is the maximum ``instantaneous stack energy'',
\begin{equation}
{\rm stack(t,v)} = \sum_{i=0}^n q(t,i)  .
\end{equation}

We don't wish to weight all times equivilantly (some times have reflectors,
some times don't), so we add an additional diagonal weighting matrix, $\bold W$
We don't wish to weight all times equivilantly (some times have reflectors,
some times don't), so we add an additional diagonal weighting matrix, $\bold W$.
found from stack energy, at each sellected $v_{rms}(t)$.

Our data fitting goal is to minimize the residual
\begin{equation}
\bold 0
\quad\approx\quad
\bold W
\left[
\bold C\bold u
-
\bold d
\right] .
\end{equation}
Because we are multiplying our RMS function by $\tau$, we must
must make a slight change in our weighting function to give early
times approximately the same priority as later times.
\begin{equation}
\bold{W'} = {\Delta \tau \over \tau} \bold{W}
\end{equation}

Next we need to add in our regularization.  Next we add the condition that
we would like the velocity to follow dip, so we add our steering filter
operator, precondition the problem and get
\beqa
\zero &\approx& {\bold W'} ( \bold C \prec \pvar - \data ) \\ \nonumber
\zero &\approx& \epsilon \pvar  .
\eeqa

To test the method we sellected the Marmousi synthetic dataset\cite{TME00-00-00010194}.
For each CMP gather we calcuated the stackpower than selected
the maximum power at each time (Figure~\ref{fig:marm.scan}).
The selected  RMS velocity became
our data ($\data$) and the corresponding stack power 
becomes our weight $\bold W$ (Figure~\ref{fig:rms-weight}). 
To
find our steering filters we selected a near-offset section from
the data and then picked regional reflector dips  within patches
of the data and smoothed the resulting field (Figure~\ref{fig:another}).
Finally, we inverted for our interval velocity.
As you can see we did a fairly good job getting retrieving the
correct velocity structure, much better than simply performing
Dix and smoothing (Figure~\ref{fig:dix}) or using a laplacian operator.

\sideplot{marm.scan}{width=2.5 in}{Stack-power scan for CMP at 3000 m overlayed by
the picked RMS curve.}
\plot{rms-weight}{width=6.0in}{Left panel is the automatically picked rms velocities, the right panel is the stack power associated with each RMS pick.  High
amplitudes represent reflectors, low amplitude noise.}
