Algorithm Search⌘K

Algorithmintro

Normal moveout correction

Also called NMO correction.

Map each sample of a trace at offset x from the time t = sqrt(t0^2 + x^2/v^2) back to its zero-offset time t0, so that reflections in a gather become flat.

Time
O(m n) worst · average · best
Space
O(m n) extra
Where
m = the number of traces in the gather; n = the number of samples per trace
Properties
deterministicexact for one flat layerlinear in dataneeds velocity
Origin
C. Hewitt Dix, 1955

Normal moveout (NMO) correction removes the delay that offset adds to a reflection. In a common-midpoint gather, a flat reflector shows as a hyperbola: the farther the receiver is from the source, the later the echo comes. NMO maps every sample back to the time it would have at zero offset, so that the hyperbola becomes a flat line. It needs a velocity for each time. It is the step before common-midpoint stacking, and semblance velocity analysis is the scan that finds the velocity.

In plain words

A shot sends sound down, a flat layer reflects it, and receivers at the surface record the echo. A receiver far from the shot hears the echo later than a receiver close to the shot, because the path is longer. The extra delay grows with the distance in a known way that depends on the speed of sound in the rock. NMO correction undoes that extra delay on each trace. After it, the same echo arrives at the same time on every trace, and the traces line up. The price is that the far traces get stretched in time, most of all near the top of the record, so very stretched parts are cut away.

The problem

Input: a trace dd of nn samples dk=d(k Δt)d_k = d(k\,\Delta t), recorded at the source-receiver offset xx, and a velocity function v(t0)v(t_0) in m/s for the zero-offset two-way time t0t_0. Output: the trace uu with u(t0)=d(t(t0))u(t_0) = d(t(t_0)), where

t(t0)=t02+x2v(t0)2t(t_0) = \sqrt{t_0^2 + \frac{x^2}{v(t_0)^2}}

is the traveltime of the hyperbola through t0t_0. For one flat layer of constant velocity vv this hyperbola is the exact reflection time. For flat layers it is a second-order approximation in xx when vv is the rms velocity, and in a real earth vv is the stacking velocity, the velocity that best flattens the event. A gather of mm traces is corrected trace by trace, each with its own xx.

The algorithm

  1. NMO(d, Δt, x, v, s_max) ▷ s_max = stretch limit, or none
  2. 1for j ← 0 to n - 1 do
  3. 2t_0 ← j Δt
  4. 3t ← sqrt(t_0² + x² / v(t_0)²) ▷ input time on the hyperbola
  5. 4if s_max given and t - t_0 > s_max t_0 then u_j ← 0; continue ▷ stretch mute
  6. 5u_j ← linear interpolation of d at time t ▷ 0 past the record end
  7. 6return u

The loop runs over output samples, not input samples. Each output time t0t_0 reads the input at a later time t≥t0t \ge t_0, so the trace is pulled up toward smaller times, by more at small t0t_0 and at large xx. Because tt is rarely a sample time, line L5 interpolates; linear interpolation is the cheapest choice, and sinc or spline interpolation is more accurate. Line L4 is the stretch mute: it sets to zero the samples whose relative stretch (t−t0)/t0(t - t_0)/t_0 is above the limit. A common limit is between 0.2 and 0.5; it is a processing choice.

Example

The check value. With t0=1t_0 = 1 s, x=1000x = 1000 m and v=2000v = 2000 m/s, line L3 gives t=1+0.25=1.11803t = \sqrt{1 + 0.25} = 1.11803 s. The output sample at 1 s takes the input value at 1.11803 s, a moveout of 118 ms.

A spike that moves exactly. Take Δt=4\Delta t = 4 ms and a trace at x=800x = 800 m with one spike of amplitude 1 at sample 125 (0.5 s), and v=2000v = 2000 m/s. The output sample j=75j = 75 has t0=0.3t_0 = 0.3 s and t=0.09+0.16=0.5t = \sqrt{0.09 + 0.16} = 0.5 s, which is sample 125, so the interpolation weight is zero and u75=1u_{75} = 1 exactly. The neighbors j=74j = 74 and 7676 read times between samples 124 and 126 and pick up a part of the spike; all other output samples are zero. The spike moved up by 200 ms.

The stretch. For x=1000x = 1000 m and v=2000v = 2000 m/s, the stretch factor t/t0t/t_0 and the relative stretch (t−t0)/t0(t - t_0)/t_0 are:

t0t_0 (s) tt (s) t/t0t/t_0 (t−t0)/t0(t - t_0)/t_0
0.2 0.5385 2.693 1.693
0.5 0.7071 1.414 0.414
1.0 1.1180 1.118 0.118
2.0 2.0616 1.031 0.031

A 30 Hz wavelet at t0=0.5t_0 = 0.5 s comes out with a dominant frequency near 30/1.414=2130 / 1.414 = 21 Hz. With a stretch limit of 0.3, line L4 mutes the samples of this trace with t0t_0 below about 0.6 s and keeps the later ones.

Two layers. A layer 400 m thick with 2000 m/s lies over a layer 600 m thick with 3000 m/s. Each layer takes 0.4 s of two-way time, so t0=0.8t_0 = 0.8 s and the rms velocity is V=(0.4⋅20002+0.4⋅30002)/0.8=2549.5V = \sqrt{(0.4 \cdot 2000^2 + 0.4 \cdot 3000^2)/0.8} = 2549.5 m/s. Exact ray tracing through the two layers against the hyperbola with VV gives:

xx (m) exact tt (s) hyperbola (s) difference (ms)
500 0.82364 0.82369 -0.05
1000 0.89024 0.89098 -0.74
2000 1.11199 1.12044 -8.45

At small offsets the hyperbola is very close. At 2000 m it is 8 ms late, a quarter of a period at 30 Hz, and the event is no longer flat after NMO. This is the residual moveout of the next sections.

Correctness

For one flat layer the reflection time is t02+x2/v2\sqrt{t_0^2 + x^2/v^2} by Pythagoras. The map t0↦t(t0)t_0 \mapsto t(t_0) is strictly increasing, so an event on the hyperbola through τ\tau comes out with its peak at t0=τt_0 = \tau on every trace: the event is flat. Near t0t_0 the output is the input stretched by t/t0t/t_0, because dt/dt0=t0/tdt/dt_0 = t_0/t. Linear interpolation adds an error of at most Δt2max⁡∣d′′∣/8\Delta t^2 \max|d''|/8. For flat layers, the ray parameter gives t2=t02+x2/V2+O(x4)t^2 = t_0^2 + x^2/V^2 + O(x^4) with the rms velocity VV, and the x4x^4 term is negative unless all layer velocities are equal. The proofs are in proofs/correctness.md.

Proof: NMO correction moves a hyperbolic event to its zero-offset time, stretches it by t/t0, and the hyperbola is exact for one layer and second-order accurate for flat layersfull

Setting. A trace d(t)d(t) is recorded at offset xx and sampled at tk=k Δtt_k = k\,\Delta t, k=0,…,n−1k = 0, \ldots, n - 1. Times are two-way times. The velocity v(t0)>0v(t_0) > 0 is given for each output time t0=j Δtt_0 = j\,\Delta t. NMO (lines L1 to L6) sets the output sample jj to d~(tj∗)\tilde d(t_j^\ast), where tj∗=t02+x2/v(t0)2t_j^\ast = \sqrt{t_0^2 + x^2 / v(t_0)^2} and d~\tilde d is the linear interpolant of the samples, or to 00 when line L4 mutes it. We write T(t0)=t02+x2/v2T(t_0) = \sqrt{t_0^2 + x^2/v^2} for a constant vv.

Claim 1 (one flat layer). Let a flat reflector lie at depth zz under a layer of constant velocity vv, with the source and the receiver on the surface at offset xx, symmetric about the midpoint. Then the reflection time is t(x)=t02+x2/v2t(x) = \sqrt{t_0^2 + x^2/v^2} with t0=2z/vt_0 = 2z/v.

Proof. By the law of reflection at a flat interface, the ray goes from the source to the point under the midpoint and back up. Each leg is the hypotenuse of a right triangle with sides zz and x/2x/2, so the path length is 2z2+x2/42\sqrt{z^2 + x^2/4}. Dividing by vv gives t(x)=4z2/v2+x2/v2=t02+x2/v2t(x) = \sqrt{4z^2/v^2 + x^2/v^2} = \sqrt{t_0^2 + x^2/v^2}. □\square

Claim 2 (an event is moved to t0t_0). Let the trace hold one event d(t)=w(t−T(τ))d(t) = w(t - T(\tau)) with a wavelet ww that peaks at 00, at the time T(τ)T(\tau) of the hyperbola through the zero-offset time τ\tau, and let the velocity used in line L3 equal the vv of the event. Without the interpolation error and the mute, the output is u(t0)=w(T(t0)−T(τ))u(t_0) = w(T(t_0) - T(\tau)), and it peaks at t0=τt_0 = \tau for every offset xx.

Proof. Lines L2 and L3 compute t=T(t0)t = T(t_0), and line L5 reads the input at that time, so u(t0)=d(T(t0))=w(T(t0)−T(τ))u(t_0) = d(T(t_0)) = w(T(t_0) - T(\tau)). The map TT is strictly increasing on t0≥0t_0 \ge 0, because T′(t0)=t0/T(t0)>0T'(t_0) = t_0 / T(t_0) > 0 for t0>0t_0 > 0. So T(t0)−T(τ)=0T(t_0) - T(\tau) = 0 only at t0=τt_0 = \tau, and uu takes the peak value w(0)w(0) there. The argument holds for each xx, so all traces of the gather have the event at the same time τ\tau: the event is flat after the correction. □\square

Claim 3 (the stretch). Near t0t_0, the output is the input wavelet stretched in time by the factor T(t0)/t0≥1T(t_0)/t_0 \ge 1. For small offsets, the relative stretch is (T(t0)−t0)/t0=x2/(2v2t02)+O(x4)(T(t_0) - t_0)/t_0 = x^2 / (2 v^2 t_0^2) + O(x^4).

Proof. By Claim 2, u(t0+h)=w(T(t0+h)−T(t0)+T(t0)−T(τ))u(t_0 + h) = w(T(t_0 + h) - T(t_0) + T(t_0) - T(\tau)), and T(t0+h)−T(t0)=T′(t0) h+O(h2)T(t_0 + h) - T(t_0) = T'(t_0)\,h + O(h^2) with T′(t0)=t0/T(t0)T'(t_0) = t_0 / T(t_0). So an output interval hh reads an input interval (t0/T(t0)) h(t_0/T(t_0))\,h, and a feature of length ℓ\ell in the input has length (T(t0)/t0) ℓ(T(t_0)/t_0)\,\ell in the output. Its dominant frequency falls by the factor t0/T(t0)t_0/T(t_0). The expansion 1+s=1+s/2+O(s2)\sqrt{1 + s} = 1 + s/2 + O(s^2) with s=x2/(v2t02)s = x^2/(v^2 t_0^2) gives the small-offset form. Line L4 sets to 00 the samples with (T−t0)/t0(T - t_0)/t_0 above the chosen limit; this is a choice of the user, not part of the correction. For t0=0t_0 = 0 and x≠0x \ne 0 the stretch is infinite, so line L4 always mutes that sample when a limit is given. □\square

Claim 4 (interpolation error). If dd has a continuous second derivative, the output differs from the exact value d(T(t0))d(T(t_0)) by at most Δt2max⁡∣d′′∣/8\Delta t^2 \max |d''| / 8. If T(t0)T(t_0) falls on a sample time, the output is exact.

Proof. Line L5 evaluates the linear interpolant between the two samples around t=T(t0)t = T(t_0). The standard error formula of linear interpolation on an interval of length Δt\Delta t gives ∣d(t)−d~(t)∣=∣d′′(ξ)∣ (t−tk)(tk+1−t)/2≤Δt2max⁡∣d′′∣/8|d(t) - \tilde d(t)| = |d''(\xi)|\,(t - t_k)(t_{k+1} - t)/2 \le \Delta t^2 \max |d''| / 8. At a sample time the weight ff in the code is 00, and the interpolant returns the sample. □\square

Claim 5 (flat layers: the hyperbola is a second-order approximation). Let there be NN flat layers with velocities vkv_k and two-way vertical times Δtk\Delta t_k, with t0=∑kΔtkt_0 = \sum_k \Delta t_k and the rms velocity V2=∑kvk2Δtk/t0V^2 = \sum_k v_k^2 \Delta t_k / t_0. Then the exact reflection time from the bottom of layer NN satisfies t(x)2=t02+x2/V2+O(x4)t(x)^2 = t_0^2 + x^2/V^2 + O(x^4). It equals the hyperbola for all xx only when all vkv_k are equal.

Proof. Let pp be the ray parameter, constant along the ray by Snell's law, and ck=1−p2vk2c_k = \sqrt{1 - p^2 v_k^2}, the cosine of the angle in layer kk. In layer kk the ray travels the vertical distance vkΔtk/2v_k \Delta t_k / 2 down and again up; it covers the horizontal distance pvk2Δtk/(2ck)p v_k^2 \Delta t_k / (2 c_k) and spends the time Δtk/(2ck)\Delta t_k / (2 c_k) on each leg. Summing both legs gives

x(p)=p∑kvk2Δtkck,t(p)=∑kΔtkck.x(p) = p \sum_k \frac{v_k^2 \Delta t_k}{c_k}, \qquad t(p) = \sum_k \frac{\Delta t_k}{c_k}.

With 1/ck=1+p2vk2/2+O(p4)1/c_k = 1 + p^2 v_k^2/2 + O(p^4) this is x=p t0V2+O(p3)x = p\,t_0 V^2 + O(p^3) and t=t0+p2t0V2/2+O(p4)t = t_0 + p^2 t_0 V^2 / 2 + O(p^4). So t2=t02+p2t02V2+O(p4)t^2 = t_0^2 + p^2 t_0^2 V^2 + O(p^4) and x2/V2=p2t02V2+O(p4)x^2/V^2 = p^2 t_0^2 V^2 + O(p^4), which gives t2=t02+x2/V2+O(p4)t^2 = t_0^2 + x^2/V^2 + O(p^4). Since xx is proportional to pp for small pp, O(p4)=O(x4)O(p^4) = O(x^4). If all vk=vv_k = v, then V=vV = v and the stack of layers is one layer, so Claim 1 gives equality. If the vkv_k differ, take one more term: 1/ck=1+p2vk2/2+3p4vk4/8+O(p6)1/c_k = 1 + p^2 v_k^2/2 + 3 p^4 v_k^4/8 + O(p^6) gives t2−t02−x2/V2=−p4t02(v4‾−V4)/4+O(p6)t^2 - t_0^2 - x^2/V^2 = -p^4 t_0^2 (\overline{v^4} - V^4)/4 + O(p^6), where v4‾=∑kvk4Δtk/t0\overline{v^4} = \sum_k v_k^4 \Delta t_k / t_0. By the Cauchy-Schwarz inequality v4‾>V4\overline{v^4} > V^4 when the vkv_k are not all equal, so the term is not zero, and the true time is earlier than the hyperbola at moderate offsets. □\square

Claim 6 (cost). One trace of nn samples costs O(n)O(n) operations: lines L2 to L5 do a fixed amount of work for each jj. A gather of mm traces costs O(mn)O(m n), and the extra space is the nn output samples per trace. □\square

Complexity

Each output sample costs a square root, a test and an interpolation, so a trace costs O(n)O(n) and a gather of mm traces costs O(mn)O(m n) in the real-RAM model. The output needs O(n)O(n) space per trace. A sinc interpolator of length LL raises the cost to O(mnL)O(m n L).

Properties

  • Linear in the data: the correction of a sum of traces is the sum of the corrections.
  • Not invertible in general: the stretch mute throws samples away, and at the top of a far trace many input samples map into few output samples.
  • Exact for one flat layer of constant velocity. For flat layers it is a second-order approximation in offset (a theorem, Claim 5 of the proof). For one dipping layer of constant velocity the best fitting velocity is v/cos⁡ϕv / \cos\phi with the dip ϕ\phi, so a dipping event and a flat event at the same time need different velocities; the correction for dip is a separate step (dip moveout).
  • The stretch is t/t0t/t_0, largest at shallow times and far offsets.

Variants and improvements

  • Higher-order moveout: add a term in x4x^4 to the hyperbola, as in the series of Taner and Koehler, to correct far offsets in layered media.
  • Anisotropic moveout: a nonhyperbolic term with an anellipticity parameter for transversely isotropic layers.
  • Stretch-free NMO: methods that shift whole wavelets instead of single samples, to avoid the loss of frequency at far offsets.
  • Inverse NMO: put the hyperbolic moveout back, for example after a parabolic Radon transform removed the multiples.

When to use it

Use it on common-midpoint gathers before stacking and before velocity analysis by stacking, when the reflectors are close to flat and the velocity changes mainly with depth. For strong dips or strong lateral velocity changes, prestack seismic migration replaces NMO and stacking.

Pitfalls

  • A wrong velocity leaves residual moveout: too low a velocity over-corrects (the event curves up at far offsets), too high a velocity under-corrects.
  • Without a stretch mute, the shallow far-offset part of the stack is dominated by stretched, low-frequency noise. The mute limit is a heuristic choice.
  • Multiples have a lower stacking velocity than primaries at the same time. After NMO with the primary velocity they remain curved; this difference is what the parabolic Radon transform uses.
  • Linear interpolation of a signal close to the Nyquist frequency smooths it. Use a longer interpolator for high-frequency data.
  • The velocity vv of NMO is the stacking velocity, not the interval velocity of a layer. The Dix formula converts rms velocities to interval velocities.

Implementations

Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.

normal_moveout_correction.pyI0RawGitHub
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/normal-moveout-correction/. The authors are listed in prov/3TP2T7.jsonl.
"""Normal moveout (NMO) correction of the traces of a common-midpoint gather.

A trace is a list of samples d[k] at the two-way times k * dt, k = 0..n-1.
The offset x is in m and the velocity in m/s. The output sample j at the
zero-offset time t0 = j * dt takes the input value at the time
t = sqrt(t0^2 + x^2 / v(t0)^2), found by linear interpolation.
"""

import math


def nmo_time(t0, x, v):
    """The hyperbolic traveltime t = sqrt(t0^2 + x^2 / v^2)."""
    return math.sqrt(t0 * t0 + (x / v) ** 2)


def stretch_factor(t0, x, v):
    """The NMO stretch t / t0 for a constant velocity: an interval dt at time t becomes (t / t0) dt."""
    return nmo_time(t0, x, v) / t0


def interp_linear(trace, dt, t):
    """Linear interpolation of the trace at time t; 0 outside [0, (n - 1) dt]."""
    n = len(trace)
    u = t / dt
    if u < 0.0 or u > n - 1:
        return 0.0
    k = min(int(math.floor(u)), n - 2) if n > 1 else 0
    if n == 1:
        return trace[0] if u == 0.0 else 0.0
    f = u - k
    return (1.0 - f) * trace[k] + f * trace[k + 1]


def _velocity_at(vel, j):
    return vel[j] if isinstance(vel, (list, tuple)) else vel


def nmo_correct(trace, dt, x, vel, stretch_max=None):
    """NMO-correct one trace recorded at offset x.

    vel is a constant or a list with v(t0) for every output sample. If
    stretch_max is given, output samples with (t - t0) / t0 > stretch_max are
    muted (set to 0), and so is t0 = 0 for x != 0. Returns (out, live), where
    live[j] is 1 for a sample that was not muted and 0 otherwise.
    """
    n = len(trace)
    out = [0.0] * n
    live = [0] * n
    for j in range(n):  # @line L1
        t0 = j * dt  # @line L2
        t = nmo_time(t0, x, _velocity_at(vel, j))  # @line L3
        if stretch_max is not None and (t - t0) > stretch_max * t0:  # @line L4
            continue
        out[j] = interp_linear(trace, dt, t)  # @line L5
        live[j] = 1
    return out, live  # @line L6


def nmo_gather(gather, offsets, dt, vel, stretch_max=None):
    """NMO-correct every trace of a gather. Returns the list of corrected traces."""
    return [nmo_correct(tr, dt, x, vel, stretch_max)[0] for tr, x in zip(gather, offsets)]


def one_layer_traveltime(z, x, v):
    """The exact two-way time from a flat reflector at depth z under a constant velocity v.

    The source and the receiver are at the surface, x apart, and the ray
    reflects halfway between them (image-source construction).
    """
    return 2.0 * math.sqrt(z * z + (x / 2.0) ** 2) / v
test_normal_moveout_correction.py 143 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/normal-moveout-correction/. The authors are listed in prov/3TP2T7.jsonl.

import math
import random

from normal_moveout_correction import (
    interp_linear,
    nmo_correct,
    nmo_gather,
    nmo_time,
    one_layer_traveltime,
    stretch_factor,
)


def ricker(t, f):
    a = (math.pi * f * t) ** 2
    return (1.0 - 2.0 * a) * math.exp(-a)


def synthetic_gather(t0s, vels, amps, offsets, dt, n, f=25.0):
    """Hyperbolic events t = sqrt(t0^2 + x^2 / v^2) with a Ricker wavelet of peak frequency f."""
    gather = []
    for x in offsets:
        tr = [0.0] * n
        for t0, v, a in zip(t0s, vels, amps):
            tx = nmo_time(t0, x, v)
            for k in range(n):
                tr[k] += a * ricker(k * dt - tx, f)
        gather.append(tr)
    return gather


def argmax(v):
    return max(range(len(v)), key=lambda i: v[i])


def test_check_value():
    assert abs(nmo_time(1.0, 1000.0, 2000.0) - 1.118034) < 1e-6


def test_hyperbola_is_exact_for_one_flat_layer():
    rng = random.Random(1)
    for _ in range(50):
        z = rng.uniform(100.0, 3000.0)
        v = rng.uniform(1500.0, 5000.0)
        x = rng.uniform(0.0, 4000.0)
        t0 = 2.0 * z / v
        assert abs(one_layer_traveltime(z, x, v) - nmo_time(t0, x, v)) < 1e-12


def test_zero_offset_is_the_identity():
    rng = random.Random(2)
    tr = [rng.gauss(0.0, 1.0) for _ in range(100)]
    out, live = nmo_correct(tr, 0.004, 0.0, 2000.0)
    assert out == tr
    assert live == [1] * 100


def test_pythagorean_triple_moves_a_spike_exactly():
    # t0 = 0.3 s and x / v = 0.4 s give t = 0.5 s: sample 125 moves to sample 75.
    dt = 0.004
    tr = [0.0] * 200
    tr[125] = 1.0
    out, _ = nmo_correct(tr, dt, 800.0, 2000.0)
    assert abs(out[75] - 1.0) < 1e-9
    assert all(abs(out[j]) < 1e-9 for j in range(200) if j not in (74, 75, 76))


def test_linear_interpolation():
    tr = [0.0, 2.0, 4.0, 1.0]
    assert interp_linear(tr, 0.5, 0.25) == 1.0
    assert interp_linear(tr, 0.5, 1.5) == 1.0
    assert interp_linear(tr, 0.5, 1.25) == 2.5
    assert interp_linear(tr, 0.5, -0.1) == 0.0
    assert interp_linear(tr, 0.5, 1.6) == 0.0


def test_correct_velocity_flattens_the_event():
    dt, n = 0.004, 300
    offsets = [100.0 * i for i in range(13)]
    gather = synthetic_gather([0.6], [2200.0], [1.0], offsets, dt, n)
    flat = nmo_gather(gather, offsets, dt, 2200.0)
    peaks = [argmax(tr) for tr in flat]
    assert all(p == 150 for p in peaks)
    wrong = nmo_gather(gather, offsets, dt, 1800.0)
    assert argmax(wrong[-1]) < 150 - 5


def test_time_varying_velocity_flattens_two_events():
    dt, n = 0.004, 400
    offsets = [150.0 * i for i in range(11)]
    gather = synthetic_gather([0.5, 1.2], [1800.0, 2600.0], [1.0, -0.8], offsets, dt, n)
    vel = [1800.0 + (2600.0 - 1800.0) * min(1.0, max(0.0, (j * dt - 0.6) / 0.5)) for j in range(n)]
    flat = nmo_gather(gather, offsets, dt, vel)
    for tr in flat:
        assert argmax([abs(v) for v in tr[100:150]]) + 100 == 125
        assert argmax([-v for v in tr[275:325]]) + 275 == 300


def test_stretch_factor_matches_the_mapping():
    t0, x, v, h = 0.4, 1500.0, 2000.0, 1e-6
    t_a = nmo_time(t0, x, v)
    t_b = nmo_time(t0 + h, x, v)
    # An output interval h comes from an input interval t_b - t_a = h t0 / t.
    assert abs((t_b - t_a) / h - t0 / t_a) < 1e-5
    assert abs(stretch_factor(t0, x, v) - t_a / t0) < 1e-15


def test_stretch_mute():
    dt, n = 0.004, 250
    tr = [1.0] * n
    x, v, smax = 1000.0, 2000.0, 0.3
    out, live = nmo_correct(tr, dt, x, v, stretch_max=smax)
    for j in range(n):
        t0 = j * dt
        t = nmo_time(t0, x, v)
        if (t - t0) > smax * t0:
            assert live[j] == 0 and out[j] == 0.0
        else:
            assert live[j] == 1
    assert live[0] == 0
    assert live[-1] == 1


def test_two_layers_hyperbola_is_only_approximate():
    # Exact rays through two flat layers against the hyperbola with the rms velocity.
    h = [400.0, 600.0]
    v = [2000.0, 3000.0]
    dts = [2.0 * hk / vk for hk, vk in zip(h, v)]
    t0 = sum(dts)
    vrms = math.sqrt(sum(d * vk * vk for d, vk in zip(dts, v)) / t0)
    errors = []
    for k in range(1, 40):
        p = k * 0.0003 / 40.0 * 1.0
        c = [math.sqrt(1.0 - (p * vk) ** 2) for vk in v]
        x = sum(d * p * vk * vk / ck for d, vk, ck in zip(dts, v, c))
        t = sum(d / ck for d, ck in zip(dts, c))
        errors.append((x, abs(t - nmo_time(t0, x, vrms))))
    small = [e for x, e in errors if x < 300.0]
    assert small and max(small) < 1e-5
    assert max(e for _, e in errors) > 1e-4

History

The hyperbola of a flat reflector follows from the geometry of one layer. Dix (1955) showed that for flat layers and small offsets the reflection time fits a hyperbola whose velocity is the rms velocity of the layers above, and used it to get interval velocities. Mayne (1962) described common-depth-point stacking, in which every trace is NMO-corrected and then summed. Taner and Koehler (1969) wrote the squared reflection time as a series in the squared offset and made the scan over velocities a routine computer step.

References

  1. Oz Yilmaz, Seismic Data Analysis, Society of Exploration Geophysicists, 2001, Investigations in Geophysics 10, the chapter on velocity analysis and statics corrections (normal moveout, NMO stretch and the stretch mute)
  2. C. Hewitt Dix, Seismic velocities from surface measurements, Geophysics 20(1), 1955, 68 to 86, the hyperbolic approximation of the reflection time for flat layers and its velocity
  3. M. Turhan Taner and Fulton Koehler, Velocity spectra, digital computer derivation and applications of velocity functions, Geophysics 34(6), 1969, 859 to 881, the series of the squared reflection time in powers of the squared offset, whose second coefficient is the rms velocity
  4. Peter M. Shearer, Introduction to Seismology, 2nd edition, Cambridge University Press, 2009, Chapter 7 (reflection seismology)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH1 sketch
  • a full proof of time.average
  • a full proof of time.best
  • a full proof of time.worst
  • a full proof of space.extra
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
Code (python)I0 not checked yet
  • the tests did not run in this build
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a scene preset for the example