Algorithmadvanced
Split-step Fourier migration
Also called SSF migration.
Extrapolate a wavefield in depth by a phase shift with a reference velocity in the wavenumber domain and a lateral velocity correction in space.
- Solves
- Seismic migration
- Time
- O(z t x log x + x t log t) totalO(x log x) per_step
- Space
- O(t x + z x) extra
- Where
- t = the number of time samples; x = the number of traces; z = the number of depth steps
- Model
- Real RAM
- Properties
- deterministiclateral velocityunconditionally stable
- Evidence
- Proof sketchCode in 1 languages
- Origin
- Paul L. Stoffa, Jacob T. Fokkema, Rui M. de Luna Freire, William P. Kessinger, 1990
Split-step Fourier migration extends phase-shift migration to a velocity that changes along . For each frequency and each depth step it does two things. First it applies the phase shift of one reference slowness , the mean over the layer, in the wavenumber domain. Then it goes back to the space domain and multiplies every point by , a thin-lens correction for the local slowness. When the velocity does not change along the correction is 1 and the method is exactly phase shift (a theorem). Otherwise it has a phase error that is zero for vertical waves and grows with the square of the propagation angle and with the velocity contrast (a theorem for one plane wave; how the errors add up in a general medium is a heuristic).
In plain words
Phase-shift migration moves the recorded wave down into the ground one step at a time, but it needs the same speed everywhere across each step. Split-step Fourier migration allows the speed to change from left to right. At each step it first moves the whole wave down as if the layer had its average speed. Then it fixes each point: where the ground is slower than average, the wave should arrive later, so the method turns the phase at that point a little more, and where the ground is faster, a little less. The fix is exact for waves that go straight up and down, and it gets worse for waves that travel at a steep angle through strong speed changes. Each step costs two fast Fourier transforms.
The problem
Given a zero-offset section and a velocity on the image grid (the value for the layer at ), find the image . This is seismic migration in the exploding reflector model, so the method uses the slowness of the half velocity.
The algorithm
The time transform is and the space transform uses . For a real section the negative frequencies are complex conjugates of the positive ones, so the method continues only and takes twice the real part.
SPLIT-STEP-FOURIER-MIGRATION(d, Δt, Δx, Δz, v) ▷ v[i][j]: velocity of layer i at x_j- 1
P_k ← DFT in time of every trace, for every frequency index k - 2
for every frequency ω = ω_k with 0 < ω_k < the Nyquist frequency do ▷ p ← P_k - 3
for i ← 0 to n_z - 1 do - 4
image[i] ← image[i] + (2 / n_t) Re p - 5
s[j] ← 2 / v[i][j] for every j; s_0 ← mean of s - 6
q ← DFT(p) - 7
q[j] ← q[j] · exp(i sqrt(ω² s_0² - k_x,j²) Δz) for every j, or 0 where the root is not real - 8
p ← IDFT(q) - 9
p[j] ← p[j] · exp(i ω (s[j] - s_0) Δz) for every j - 10
return image
Line L1 transforms every trace in time once. For one frequency, the vector holds the field at the current depth along . Line L4 adds the contribution of this frequency to the image row: the field at is the sum over all frequencies divided by , and the positive and negative frequencies together give twice the real part. Line L5 computes the slowness of the half velocity and its mean. Lines L6 to L8 are the phase shift of phase-shift migration with the reference slowness , applied in the wavenumber domain; the evanescent waves are removed. Line L9 is the split step: a phase correction in the space domain for the difference between the local and the reference slowness.
Example
One plane wave by hand. Take rad/s, m, a reference half velocity of 1500 m/s ( s/m) and a local half velocity of 1250 m/s ( s/m), and the wavenumber rad/m, which is a wave at 30 degrees in the local medium. The exact phase over one step is rad. The split step gives rad. The error is rad per step. The leading term of the error formula below gives rad. For a vertical wave () the error is zero.
Tests. For a velocity that changes only with depth (2500 m/s over 3000 m/s), the image equals the phase-shift image computed from the same positive frequencies within . For a velocity m/s that changes along and a flat reflector at 240 m, every column of the image peaks at the right depth row (a measurement on this case).
Correctness
The full proof is in proofs/correctness.md.
- What the code computes (theorem). Line L10 returns , where is the trace spectrum at index after split steps. Because the step for is the complex conjugate of the step for , this is the field at of the continued data without the zero and Nyquist frequencies.
- Exact for (theorem). If the velocity does not change along in any layer, then , line L9 does nothing, and the method is phase-shift migration.
- Phase error for one plane wave (theorem). In a layer of slowness treated with the reference , the error of one step is . It is zero for or , and its leading term is .
- Stability (theorem). Every factor has modulus at most 1, so no step increases the energy, for any .
That the local plane-wave errors stay small in a smooth medium with moderate contrast is a heuristic, supported by the cosine test above.
Proof: Correctness of split-step Fourier migrationfull
Setting. The model is the exploding reflector model with the slowness of the half velocity. The velocity is constant in depth inside each layer , with the values at , and is the reference slowness of line L5. The time transform is , and . For a frequency and a layer , one step of the method is the linear map of lines L6 to L9:
where multiplies entry by if the root is real and by 0 otherwise, and multiplies entry by .
Theorem 1 (what the code computes). Let , where is the DFT of trace at index (line L1). Then line L10 returns
Proof. Line L2 runs over , which is the set . Fix . By induction on , at the start of pass of line L3 the array is : it is before pass 0, and lines L6 to L9 apply once (line L7 is , line L9 is ). Line L4 adds to row before the step. The loops have a fixed number of passes, so the algorithm stops.
Lemma 1 (the positive frequencies are enough). Let be any family of continued fields with (the symmetry of the DFT of real traces). Then the inverse DFT in time at is
where the term in brackets is present only for even .
Proof. Pair the index with for ; each pair adds . The indices and are their own partners.
The continuation keeps the symmetry: the step for uses and the factor , and both factors depend on only through , so . So by Lemma 1, Theorem 1 gives the field at of the continued data after the frequency and (for even ) the Nyquist frequency are removed. The image is real.
Theorem 2 (exact when the velocity does not change along ). If for all in every layer, the output is the phase-shift image of the same data without the frequency 0 and the Nyquist frequency. In particular, for a velocity the method is exact in the sense of the proof of phase-shift migration.
Proof. Then , so , and is the inverse DFT of the phase shift with , the evanescent parts set to zero. For and this is with : the factor of the phase-shift loop invariant, applied in the domain. Apply Lemma 1 to both methods.
Theorem 3 (the phase error for a plane wave). Suppose a layer has the constant slowness but the step uses a reference (as happens locally where differs from its mean). For a propagating plane wave with both roots real, the step gives the phase , while the exact phase is . The error
is 0 when or , and
Proof. For the two roots are and , and the sum cancels. For the correction is 0 and the roots agree. For the expansion use for and ; the terms , and cancel.
So the error grows with the square of the propagation angle () and with the slowness contrast . Vertical waves are always continued exactly. How these local errors add up in a medium with a smooth is not proved here; the statement that the method is accurate for moderate contrasts and angles is a heuristic, supported by the test with a lateral cosine velocity (every column focuses at the true depth).
Energy. multiplies the propagating coefficients by numbers of modulus 1 and removes the others, and has modulus 1 everywhere. So each step does not increase the energy , and the method is unconditionally stable for every .
Complexity
- Real-ram, with FFTs. Line L1 costs . Each depth step for one frequency costs two FFTs of length and phase factors, . With about frequencies and steps the total is .
- Against phase shift. Phase shift costs per step and frequency once the data are in the wavenumber domain, so the split step costs a factor more for its two transforms.
- Space. One complex vector per frequency during its loop, and the image.
Properties
- Lateral velocity. The correction uses the local slowness at every point, so the image follows lateral velocity changes, with an error that depends on the angle and the contrast.
- Exact vertical propagation. Waves that travel straight up are continued exactly in any .
- Unconditionally stable. All factors have modulus at most 1.
- Frequencies are independent. Each frequency is continued alone, so the loop at line L2 runs in parallel without communication.
- Periodic in . The DFT in line L6 makes the field periodic along the line; pad with zeros or taper the edges.
Variants and improvements
- Several reference velocities. Phase shift plus interpolation (Gazdag and Sguazzero 1984) runs the phase shift with a few reference velocities and interpolates at each ; this reduces the error for large contrasts.
- Fourier finite difference. Add a finite-difference correction term to the split step to reduce the angle error, in the spirit of finite-difference migration.
- Generalized screen methods. Higher-order terms in the expansion of the square root about the reference slowness improve wide-angle accuracy.
- Prestack migration. The same step continues the source and the receiver wavefields separately in shot-profile migration, followed by the imaging condition.
- The angular spectrum method. The reference step alone is the angular spectrum propagator of optics, and the split step is the beam propagation method used for optical fibers and turbulence.
When to use it
Use split-step Fourier migration when the velocity changes along but not too strongly, and when one-way migration is enough (no turning waves). It costs little more than phase shift and handles lateral changes that phase shift and Stolt migration cannot. For strong contrasts, such as salt bodies, use several reference velocities, a Fourier finite-difference correction, or reverse-time migration.
Pitfalls
- A reference far from the local velocity. Taking in line L5 from one corner of the layer instead of its mean makes large and the angle error large everywhere. Use the mean (or several references), as in line L5.
- The correction in the wrong domain. Applying the factor of line L9 in the wavenumber domain, before line L8, multiplies wavenumbers by a function of , which has no meaning. Apply it after the inverse transform of line L8.
- The full velocity. Using in line L5 doubles every depth. Zero-offset data need .
- Dropping the factor 2. Line L4 continues only the positive frequencies; without the factor the image has half its amplitude.
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.
# SPDX-License-Identifier: MIT
# Shared helper of the imaging and inverse problems pages of https://algorithm.tamnd.com/. The authors are listed in prov/.
"""Small images and signals for the imaging and inverse problems pages.
Conventions:
- A signal is a list of numbers. An image is a list of rows, img[i][j], with
row i from the top and column j from the left.
- An n x n image covers the square [-1, 1]^2. The center of pixel (i, j) is
x_j = -1 + (2 j + 1) / n and y_i = 1 - (2 i + 1) / n, so y goes up.
- DFT: X_k = sum_j x_j exp(-2 pi i j k / n), unnormalized; the inverse has
the factor 1 / n. Index k stands for frequency k for k < n / 2 and k - n
otherwise. fftshift moves the zero frequency to position n // 2.
- Periodic convolution kernels are stored with their center at index 0
(wrapped around), so a delta kernel gives the identity and no shift.
"""
import cmath
import math
# ------------------------------------------------------------------ images
def new_image(n1, n2, value=0.0):
"""An n1 x n2 image (n1 rows, n2 columns) filled with value."""
return [[value] * n2 for _ in range(n1)]
def img_add(a, b):
"""The pixelwise sum a + b."""
return [[x + y for x, y in zip(ra, rb)] for ra, rb in zip(a, b)]
def img_scale(a, c):
"""The image c a."""
return [[c * x for x in row] for row in a]
def img_dot(a, b):
"""<a, b> = sum conj(a_ij) b_ij."""
return sum(x.conjugate() * y for ra, rb in zip(a, b) for x, y in zip(ra, rb))
def img_norm(a):
"""The Euclidean (Frobenius) norm of an image."""
return math.sqrt(sum(abs(x) ** 2 for row in a for x in row))
def flatten(img):
"""Row-major vector of an image."""
return [x for row in img for x in row]
def unflatten(v, n1, n2):
"""The n1 x n2 image of a row-major vector."""
return [list(v[i * n2:(i + 1) * n2]) for i in range(n1)]
# ------------------------------------------------------------------ DFT
def _is_pow2(n):
return n > 0 and n & (n - 1) == 0
def _fft_pow2(x):
"""Iterative radix-2 FFT, unnormalized forward transform."""
n = len(x)
a = [complex(v) for v in x]
j = 0
for i in range(1, n):
bit = n >> 1
while j & bit:
j ^= bit
bit >>= 1
j |= bit
if i < j:
a[i], a[j] = a[j], a[i]
size = 2
while size <= n:
half = size // 2
tw = [cmath.exp(-2j * math.pi * k / size) for k in range(half)]
for start in range(0, n, size):
for k in range(half):
u = a[start + k]
v = a[start + k + half] * tw[k]
a[start + k] = u + v
a[start + k + half] = u - v
size *= 2
return a
def dft(x):
"""X_k = sum_j x_j exp(-2 pi i j k / n). Radix-2 FFT when n is a power of 2."""
n = len(x)
if n == 0:
return []
if _is_pow2(n):
return _fft_pow2(x)
w = [cmath.exp(-2j * math.pi * t / n) for t in range(n)]
return [sum(x[j] * w[(j * k) % n] for j in range(n)) for k in range(n)]
def idft(xf):
"""x_j = (1/n) sum_k X_k exp(2 pi i j k / n)."""
n = len(xf)
if n == 0:
return []
y = dft([complex(v).conjugate() for v in xf])
return [v.conjugate() / n for v in y]
def _rows_then_cols(img, f):
rows = [f(row) for row in img]
cols = [f(list(col)) for col in zip(*rows)]
return [list(r) for r in zip(*cols)]
def dft2(img):
"""2D DFT: X_kl = sum_jq x_jq exp(-2 pi i (j k / n1 + q l / n2))."""
return _rows_then_cols(img, dft)
def idft2(img):
"""Inverse 2D DFT, with the factor 1 / (n1 n2)."""
return _rows_then_cols(img, idft)
def _shift1(x, s):
return list(x[s:]) + list(x[:s])
def fftshift(x):
"""Move the zero frequency to position n // 2 (1D, or both axes of an image)."""
if x and isinstance(x[0], (list, tuple)):
rows = [fftshift(r) for r in x]
return _shift1(rows, (len(rows) + 1) // 2)
return _shift1(x, (len(x) + 1) // 2)
def ifftshift(x):
"""The inverse of fftshift (1D, or both axes of an image)."""
if x and isinstance(x[0], (list, tuple)):
rows = [ifftshift(r) for r in x]
return _shift1(rows, len(rows) // 2)
return _shift1(x, len(x) // 2)
def circ_conv(x, h):
"""Periodic convolution y_i = sum_j h_j x_{(i - j) mod n}, kernel centered at index 0."""
n = len(x)
nz = [(j, hj) for j, hj in enumerate(h) if hj != 0]
return [sum(hj * x[(i - j) % n] for j, hj in nz) for i in range(n)]
def circ_conv2(img, h):
"""Periodic 2D convolution with the kernel h centered at index (0, 0)."""
n1, n2 = len(img), len(img[0])
nz = [(p, q, h[p][q]) for p in range(len(h)) for q in range(len(h[0])) if h[p][q] != 0]
out = new_image(n1, n2)
for i in range(n1):
for j in range(n2):
out[i][j] = sum(v * img[(i - p) % n1][(j - q) % n2] for p, q, v in nz)
return out
# ------------------------------------------------------------------ phantoms
def pixel_centers(n):
"""(xs, ys): xs[j] = -1 + (2 j + 1) / n and ys[i] = 1 - (2 i + 1) / n."""
xs = [-1.0 + (2 * j + 1) / n for j in range(n)]
ys = [1.0 - (2 * i + 1) / n for i in range(n)]
return xs, ys
# Rows: rho, A, B, x0, y0, phi (degrees). A is the semi-axis along the
# direction phi (counterclockwise from the x axis), B the other semi-axis.
# Geometry and densities of Shepp and Logan (1974), as reproduced in Kak and
# Slaney, Principles of Computerized Tomographic Imaging, Table 3.1. The value
# at the center (0, 0) is 2 - 0.98 = 1.02.
SHEPP_LOGAN = [
(2.0, 0.92, 0.69, 0.0, 0.0, 90.0),
(-0.98, 0.874, 0.6624, 0.0, -0.0184, 90.0),
(-0.02, 0.31, 0.11, 0.22, 0.0, 72.0),
(-0.02, 0.41, 0.16, -0.22, 0.0, 108.0),
(0.01, 0.25, 0.21, 0.0, 0.35, 90.0),
(0.01, 0.046, 0.046, 0.0, 0.1, 0.0),
(0.01, 0.046, 0.046, 0.0, -0.1, 0.0),
(0.01, 0.046, 0.023, -0.08, -0.605, 0.0),
(0.01, 0.023, 0.023, 0.0, -0.605, 0.0),
(0.01, 0.046, 0.023, 0.06, -0.605, 90.0),
]
# The same ellipses with the gray levels of Toft (1996), which give more
# contrast. The value at the center is 1 - 0.8 = 0.2.
MODIFIED_SHEPP_LOGAN = [
(rho, a, b, x0, y0, phi)
for rho, (_, a, b, x0, y0, phi) in zip(
(1.0, -0.8, -0.2, -0.2, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1), SHEPP_LOGAN
)
]
def ellipse_value(x, y, table):
"""The phantom value at the point (x, y): the sum of rho over the ellipses that hold it."""
total = 0.0
for rho, a, b, x0, y0, phi in table:
c, s = math.cos(math.radians(phi)), math.sin(math.radians(phi))
dx, dy = x - x0, y - y0
u = dx * c + dy * s
v = -dx * s + dy * c
if (u / a) ** 2 + (v / b) ** 2 <= 1.0:
total += rho
return total
def ellipse_phantom(n, table):
"""The n x n image of an ellipse table, sampled at the pixel centers."""
xs, ys = pixel_centers(n)
return [[ellipse_value(x, y, table) for x in xs] for y in ys]
def disk_phantom(n, radius):
"""1 at pixel centers with x^2 + y^2 <= radius^2, 0 elsewhere."""
xs, ys = pixel_centers(n)
r2 = radius * radius
return [[1.0 if x * x + y * y <= r2 else 0.0 for x in xs] for y in ys]
def spikes_1d(n, positions, amplitudes):
"""A signal of length n with the given amplitudes at the given positions."""
out = [0.0] * n
for p, a in zip(positions, amplitudes):
out[p] += a
return out
# ------------------------------------------------------------------ projector
def parallel_beam_matrix(n, angles, nbins):
"""Pixel-driven discrete Radon transform of an n x n image on [-1, 1]^2.
Each pixel center (x, y) projects to s = x cos(theta) + y sin(theta). Its
value times the pixel area over the bin width is split linearly between
the two nearest bin centers. The bins cover [-sqrt(2), sqrt(2)]. Row
a * nbins + b holds angle a and bin b; column i * n + j holds pixel (i, j).
Returns the sparse rows, each a list of (column, weight) pairs.
Pixel-driven projection has a ripple: with a bin width close to the pixel
size, a disk projection is off by up to about 10 percent in some bins. A
bin of about twice the pixel size (nbins = 23 for n = 32) keeps it near
1 percent.
"""
xs, ys = pixel_centers(n)
smax = math.sqrt(2.0)
width = 2.0 * smax / nbins
scale = (2.0 / n) ** 2 / width
rows = []
for theta in angles:
c, s = math.cos(theta), math.sin(theta)
acc = [dict() for _ in range(nbins)]
for i, y in enumerate(ys):
for j, x in enumerate(xs):
t = (x * c + y * s + smax) / width - 0.5
b0 = math.floor(t)
frac = t - b0
col = i * n + j
for b, w in ((b0, 1.0 - frac), (b0 + 1, frac)):
if 0 <= b < nbins and w > 0.0:
acc[b][col] = acc[b].get(col, 0.0) + w * scale
rows.extend(sorted(d.items()) for d in acc)
return rows
def sp_matvec(rows, x):
"""y = A x for sparse rows of (column, weight) pairs."""
return [sum(w * x[c] for c, w in row) for row in rows]
def sp_rmatvec(rows, y, ncols):
"""x = A^H y for sparse rows of (column, weight) pairs and ncols columns."""
out = [0.0] * ncols
for row, yi in zip(rows, y):
if yi == 0:
continue
for c, w in row:
out[c] += w.conjugate() * yi
return out
# ------------------------------------------------------------------ noise
def gauss_noise(rng, shape, sigma):
"""Independent N(0, sigma^2) values: a list for an int shape, an image for (n1, n2)."""
if isinstance(shape, int):
return [rng.gauss(0.0, sigma) for _ in range(shape)]
n1, n2 = shape
return [[rng.gauss(0.0, sigma) for _ in range(n2)] for _ in range(n1)]
def _poisson_small(rng, lam):
"""Knuth's product method, exact for a mean lam <= 30."""
limit = math.exp(-lam)
k, p = 0, rng.random()
while p > limit:
k += 1
p *= rng.random()
return k
def poisson_sample(rng, lam):
"""An exact Poisson(lam) sample: a sum of Knuth samples with means at most 30."""
if lam < 0:
raise ValueError("negative mean")
total = 0
while lam > 30.0:
total += _poisson_small(rng, 30.0)
lam -= 30.0
if lam > 0.0:
total += _poisson_small(rng, lam)
return total
split_step_fourier_migration.py 71 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/split-step-fourier-migration/. The authors are listed in prov/C572NA.jsonl.
"""Split-step Fourier migration of a zero-offset section for a velocity v(x, z).
Conventions (the imaging and inverse problems pages):
- data[k][j] is the zero-offset sample at the two-way time t = k * dt and the
surface position x = j * dx. vel[i][j] is the velocity (m/s) between the
depths i dz and (i + 1) dz at x = j dx. image[i][j] is the image at depth i dz.
- U(omega) = sum u(t) exp(-i omega t); the x transform uses exp(-i kx x).
- Exploding reflector model: the slowness used is s = 2 / v (the slowness of
the half velocity v / 2). Downward continuation by dz multiplies by
exp(+i kz dz), kz = sgn(omega) sqrt(omega^2 s0^2 - kx^2).
- One step: a phase shift with the reference slowness s0 (the mean of s over
x in the layer) in the (omega, kx) domain, then the correction
exp(i omega (s(x) - s0) dz) in the (omega, x) domain.
- Only the frequencies 0 < omega < the Nyquist frequency are continued. The
data are real, so the image is (2 / nt) Re sum over these frequencies.
Cost per frequency and depth step: two FFTs of length nx and O(nx) phase
factors, so O(nz * nt * nx log nx) in total with radix-2 FFTs.
"""
import cmath
import math
from imgkit import dft, idft
def kx_values(nx, dx):
"""The angular wavenumbers of the DFT indices 0 .. nx - 1."""
return [2.0 * math.pi * (j if 2 * j < nx else j - nx) / (nx * dx) for j in range(nx)]
def split_step_fourier_migration(data, dt, dx, dz, vel):
"""Migrate a zero-offset section with the split-step Fourier method.
data: nt x nx real samples; vel: nz x nx velocities. Returns the nz x nx
image. Precondition: dt, dx, dz > 0 and every velocity > 0.
"""
nt, nx = len(data), len(data[0])
nz = len(vel)
kxs = kx_values(nx, dx)
spectra = [dft([data[k][j] for k in range(nt)]) for j in range(nx)] # @line L1
image = [[0.0] * nx for _ in range(nz)]
for k in range(1, (nt + 1) // 2): # @line L2
omega = 2.0 * math.pi * k / (nt * dt)
p = [spectra[j][k] for j in range(nx)]
for i in range(nz): # @line L3
for j in range(nx):
image[i][j] += 2.0 * p[j].real / nt # @line L4
s = [2.0 / v for v in vel[i]]
s0 = sum(s) / nx # @line L5
q = dft(p) # @line L6
for j in range(nx):
arg = (omega * s0) ** 2 - kxs[j] ** 2
q[j] = q[j] * cmath.exp(1j * math.sqrt(arg) * dz) if arg > 0.0 else 0j # @line L7
p = idft(q) # @line L8
for j in range(nx):
p[j] *= cmath.exp(1j * omega * (s[j] - s0) * dz) # @line L9
return image # @line L10
def phase_error(omega, s, s0, kx, dz):
"""The phase error of one split step for a plane wave in a medium of slowness s.
The exact phase is dz sqrt(omega^2 s^2 - kx^2); the split step gives
dz (sqrt(omega^2 s0^2 - kx^2) + omega (s - s0)). Both roots must be real.
"""
exact = math.sqrt((omega * s) ** 2 - kx * kx)
approx = math.sqrt((omega * s0) ** 2 - kx * kx) + omega * (s - s0)
return dz * (approx - exact)
test_split_step_fourier_migration.py 82 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/split-step-fourier-migration/. The authors are listed in prov/C572NA.jsonl.
import cmath
import math
import unittest
from imgkit import dft, idft
from split_step_fourier_migration import kx_values, phase_error, split_step_fourier_migration
NT, DT = 64, 0.004
def ricker(t, f0):
a = (math.pi * f0 * t) ** 2
return (1.0 - 2.0 * a) * math.exp(-a)
def phase_shift_oracle(data, dt, dx, dz, vz):
"""Phase shift over the positive frequencies for a velocity v(z) only."""
nt, nx = len(data), len(data[0])
kxs = kx_values(nx, dx)
spectra = [dft([data[k][j] for k in range(nt)]) for j in range(nx)]
image = [[0.0] * nx for _ in vz]
for k in range(1, (nt + 1) // 2):
w = 2.0 * math.pi * k / (nt * dt)
q = dft([spectra[j][k] for j in range(nx)])
for i, v in enumerate(vz):
p = idft(q)
for j in range(nx):
image[i][j] += 2.0 * p[j].real / nt
s = 2.0 / v
for j in range(nx):
a = (w * s) ** 2 - kxs[j] ** 2
q[j] = q[j] * cmath.exp(1j * math.sqrt(a) * dz) if a > 0.0 else 0j
return image
class TestSplitStepFourierMigration(unittest.TestCase):
def test_equals_phase_shift_when_v_depends_on_z_only(self):
nx, dx, dz = 16, 10.0, 6.0
data = [[0.0] * nx for _ in range(NT)]
for j in range(nx):
t0 = 2.0 * math.hypot(150.0, j * dx - 80.0) / 3000.0
for k in range(NT):
data[k][j] = ricker(k * DT - t0, 25.0)
vz = [2500.0] * 10 + [3000.0] * 20
a = split_step_fourier_migration(data, DT, dx, dz, [[v] * nx for v in vz])
b = phase_shift_oracle(data, DT, dx, dz, vz)
for i in range(len(vz)):
for j in range(nx):
self.assertAlmostEqual(a[i][j], b[i][j], delta=1e-9)
def test_lateral_velocity_flat_reflector(self):
# A flat reflector at z0 = 240 m under v(x) = 3000 + 300 cos(2 pi x / L):
# the times 2 z0 / v(x) vary with x, and the split-step correction
# brings every column back to row z0 / dz = 40.
nx, dx, dz, nz = 32, 20.0, 6.0, 48
vx = [3000.0 + 300.0 * math.cos(2.0 * math.pi * j / nx) for j in range(nx)]
data = [[ricker(k * DT - 480.0 / vx[j], 25.0) for j in range(nx)] for k in range(NT)]
img = split_step_fourier_migration(data, DT, dx, dz, [vx[:] for _ in range(nz)])
for j in range(nx):
self.assertEqual(max(range(nz), key=lambda i: img[i][j]), 40)
def test_phase_error(self):
w, dz = 2.0 * math.pi * 20.0, 6.0
# Exact for vertical waves and for the reference slowness.
self.assertAlmostEqual(phase_error(w, 1e-3, 8e-4, 0.0, dz), 0.0, places=12)
self.assertAlmostEqual(phase_error(w, 1e-3, 1e-3, 0.05, dz), 0.0, places=12)
# The error grows with the angle and with the slowness contrast.
e1 = abs(phase_error(w, 1e-3, 9e-4, 0.03, dz))
e2 = abs(phase_error(w, 1e-3, 9e-4, 0.06, dz))
e3 = abs(phase_error(w, 1e-3, 8e-4, 0.06, dz))
self.assertLess(e1, e2)
self.assertLess(e2, e3)
def test_kx_values(self):
ks = kx_values(4, 1.0)
self.assertEqual([round(k / (math.pi / 2.0)) for k in ks], [0, 1, -2, -1])
if __name__ == "__main__":
unittest.main()
History
The split-step Fourier method was used to solve parabolic wave equations in underwater acoustics and optics in the 1970s, where it propagates a field by alternating a free-space step in the wavenumber domain with a phase screen in space. Stoffa, Fokkema, de Luna Freire and Kessinger (1990) brought it to seismic migration as a cheap way to handle lateral velocity changes in phase-shift migration. Later work added finite-difference corrections and higher-order screens for wider angles.
References
- P. L. Stoffa, J. T. Fokkema, R. M. de Luna Freire and W. P. Kessinger, Split-step Fourier migration, Geophysics 55(4), 1990, 410 to 421, the split-step downward continuation with a reference slowness and a space-domain correction
- Jeno Gazdag, Wave equation migration with the phase-shift method, Geophysics 43(7), 1978, 1342 to 1351, the phase shift that the method uses for the reference slowness
- Oz Yilmaz, Seismic Data Analysis, Society of Exploration Geophysicists, 2001, Chapter 4 (migration), frequency-space and frequency-wavenumber methods for lateral velocity changes
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.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H1 sketch |
|
| Lean | L0 no Lean part |
|
| Code (python) | I0 not checked yet |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag C572NA Edit this page History Report an error Markdown