pylops.SmoothingND¶
- class pylops.SmoothingND(nsmooth, dims, axes=(-2, -1), dtype='float64', name='S')[source]¶
ND Smoothing.
Apply smoothing to model (and data) along the
axesof a n-dimensional array.- Parameters:
- Attributes:
- nh
tuple Length of the filter
- convolve
callable Convolution function
- correlate
callable Correlation function
- dims
tuple Shape of the array after the adjoint, but before flattening.
For example,
x_reshaped = (Op.H * y.ravel()).reshape(Op.dims).- dimsd
tuple Shape of the array after the forward, but before flattening. In this case, same as
dims.- shape
tuple Operator shape.
- nh
See also
pylops.signalprocessing.ConvolveNDND convolution
Notes
The ND Smoothing operator is a special type of convolutional operator that convolves the input model (or data) with a constant nd filter of size \(n_{\text{smooth}, 1} \times n_{\text{smooth}, 2} \times n_{\text{smooth}, 3}\):
Its application to a three dimensional input signal is:
\[y[i,j,k] = 1/(n_{\text{smooth}, 1}\cdot n_{\text{smooth}, 2}\cdot n_{\text{smooth}, 3}) \sum_{l=-(n_{\text{smooth},1}-1)/2}^{(n_{\text{smooth},1}-1)/2} \sum_{m=-(n_{\text{smooth},2}-1)/2}^{(n_{\text{smooth},2}-1)/2} \sum_{n=-(n_{\text{smooth},3}-1)/2}^{(n_{\text{smooth},3}-1)/2} x[l,m,n]\]Note that since the filter is symmetrical, the Smoothing3D operator is self-adjoint.
Methods
__init__(nsmooth, dims[, axes, dtype, name])adjoint()apply_columns(cols)Apply subset of columns of operator
cond([uselobpcg])Condition number of linear operator.
conj()Complex conjugate operator
div(y[, niter, densesolver])Solve the linear problem \(\mathbf{y}=\mathbf{A}\mathbf{x}\).
dot(x)Matrix-matrix or matrix-vector multiplication.
eigs([neigs, symmetric, niter, uselobpcg])Most significant eigenvalues of linear operator.
matmat(X)Matrix-matrix multiplication.
matvec(x)Matrix-vector multiplication.
reset_count()Reset counters
rmatmat(X)Matrix-matrix multiplication.
rmatvec(x)Adjoint matrix-vector multiplication.
todense([backend])Return dense matrix.
toimag([forw, adj])Imag operator
toreal([forw, adj])Real operator
tosparse()Return sparse matrix.
trace([neval, method, backend])Trace of linear operator.
transpose()