PyLops Utilities

Alongside with its Linear Operators and Solvers, PyLops contains also a number of auxiliary routines performing universal tasks that are used by several operators or simply within one or more Tutorials for the preparation of input data and subsequent visualization of results.

Dot-test

dottest(Op[, nr, nc, rtol, atol, ...])

Dot test.

Decorators

add_ndarray_support_to_solver(func)

Decorator which converts a solver-type function that only supports a 1d-array into one that supports one (dimsd-shaped) ndarray.

disable_ndarray_multiplication(func)

Decorator which disables ndarray multiplication.

reshaped([func, forward, swapaxis])

Decorator for the common reshape/flatten pattern used in many operators.

Describe

describe(Op)

Describe a PyLops operator

Estimators

trace_hutchinson(Op[, neval, batch_size, ...])

Trace of linear operator using the Hutchinson method.

trace_hutchpp(Op[, neval, sampler, backend])

Trace of linear operator using the Hutch++ method.

trace_nahutchpp(Op[, neval, sampler, c1, ...])

Trace of linear operator using the NA-Hutch++ method.

Metrics

mae(xref, xcmp)

Mean Absolute Error (MAE)

mse(xref, xcmp)

Mean Square Error (MSE)

snr(xref, xcmp)

Signal to Noise Ratio (SNR)

psnr(xref, xcmp[, xmax])

Peak Signal to Noise Ratio (PSNR)

Geophysical Reservoir characterization

avo.zoeppritz_scattering(vp1, vs1, rho1, ...)

Zoeppritz solution.

avo.zoeppritz_element(vp1, vs1, rho1, vp0, ...)

Single element of Zoeppritz solution.

avo.zoeppritz_pp(vp1, vs1, rho1, vp0, vs0, ...)

PP reflection coefficient from the Zoeppritz scattering matrix.

avo.approx_zoeppritz_pp(vp1, vs1, rho1, vp0, ...)

PP reflection coefficient from the approximate Zoeppritz equation.

avo.akirichards(theta, vsvp[, n])

Three terms Aki-Richards approximation.

avo.fatti(theta, vsvp[, n])

Three terms Fatti approximation.

avo.ps(theta, vsvp[, n])

PS reflection coefficient

Scalability test

scalability_test(Op, x[, workers, forward])

Scalability test.

Sliding and Patching

sliding1d.sliding1d_design(dimd, nwin, ...)

Design Sliding1D operator

sliding2d.sliding2d_design(dimsd, nwin, ...)

Design Sliding2D operator

sliding3d.sliding3d_design(dimsd, nwin, ...)

Design Sliding3D operator

patch2d.patch2d_design(dimsd, nwin, nover, nop)

Design Patch2D operator

patch3d.patch3d_design(dimsd, nwin, nover, nop)

Design Patch3D operator

Synthetics

seismicevents.makeaxis(par)

Create axes t, x, and y axes

seismicevents.linear2d(x, t, v, t0, theta, ...)

Linear 2D events

seismicevents.parabolic2d(x, t, t0, px, pxx, ...)

Parabolic 2D events

seismicevents.hyperbolic2d(x, t, t0, vrms, ...)

Hyperbolic 2D events

seismicevents.linear3d(x, y, t, v, t0, ...)

Linear 3D events

seismicevents.hyperbolic3d(x, y, t, t0, ...)

Hyperbolic 3D events

marchenko.directwave(wav, trav, nt, dt[, ...])

Analytical direct wave in acoustic media

Signal-processing

signalprocessing.convmtx(h, n)

Convolution matrix

signalprocessing.nonstationary_convmtx(H, n)

Convolution matrix from a bank of filters

signalprocessing.dip_estimate(d[, dz, dx, ...])

Local dip estimation

signalprocessing.slope_estimate(d[, dz, dx, ...])

Local slope estimation

Tapers

tapers.taper2d(nt, nmask, ntap[, tapertype])

2D taper

tapers.taper3d(nt, nmask, ntap[, tapertype])

3D taper

tapers.tapernd(nmask, ntap[, tapertype])

ND taper

Wavelets

wavelets.gaussian(t[, std])

Gaussian wavelet

wavelets.klauder(t[, f, taper])

Klauder wavelet

wavelets.ormsby(t[, f, taper])

Ormsby wavelet

wavelets.ricker(t[, f0, taper])

Ricker wavelet