pylops.utils.signalprocessing.pwd_slope_estimate¶
- pylops.utils.signalprocessing.pwd_slope_estimate(d, niter=5, liter=20, order=2, smoothing='triangle', nsmooth=10, damp=0.0, axis=-1)[source]¶
Plane-Wave Destruction (PWD) local slope estimation.
Local slopes are estimated using the Plane-Wave Destruction (PWD) algorithm [1] [2] with optional structure-aligned smoothing preconditioning. Slopes are returned as \(\tan\theta\), defined in a RHS coordinate system with \(z\)-axis pointing downward.
This algorithm relies on kernels defined in
pylops.utils._pwd2d_numba. When Numba is available the implementation is JIT-accelerated; otherwise a pure-Python fallback is used.- Parameters:
- d
numpy.ndarray Input array of shape of size \([n_z \times n_x\,(\times n_y)]\)
- niter
int, optional Number of outer PWD iterations. Default is
5.- liter
int, optional Maximum number of inner least-squares iterations. Default is
20.- order
int, optional Order of the all-pass filters:
1(3-tap) or2(5-tap). Default is2.- smoothing
str, optional Preconditioning choice:
"triangle"(default) that applies a triangular smoother (two boxcar passes), or"boxcar"that applies a single-pass boxcar.- nsmooth
tupleorlistorint Smoothing lengths for the preconditioner. If a single scalar is provided, the same value is used across all axes. Default
10.- damp
float, optional Damping factor for the least-squares solve. Default
0.0.- axis
int, optional Spatial axis over which slopes are computed (only for 3D case)
- d
- Returns:
- sigma
numpy.ndarray Estimated slope field of size \([n_z \times n_x\,(\times n_y)]\) in samples per trace (\(\Delta z / \Delta x/y\)).
- sigma
- Raises:
- ValueError
If
orderis not1or2.- ValueError
If input array
dis not 2D or 3D.
Examples using pylops.utils.signalprocessing.pwd_slope_estimate¶
PWD-based slope estimation and structural smoothing