pylops.signalprocessing.NonStationaryConvolve3D

class pylops.signalprocessing.NonStationaryConvolve3D(dims, hs, ihx, ihy, ihz, engine='numpy', num_threads_per_blocks=(2, 16, 16), dtype='float64', name='C')[source]

3D non-stationary convolution operator.

Apply non-stationary three-dimensional convolution. A varying compact filter is provided on a coarser grid and on-the-fly interpolation is applied in forward and adjoint modes. Both input and output have size \(n_x \times n_y \times n_z\).

Parameters:
dimslist or int

Number of samples for each dimension (which we refer to as \(n_x \times n_y \times n_z\)).

hsnumpy.ndarray

Bank of 3d compact filters of size \(n_{\text{filts},x} \times n_{\text{filts},y} \times n_{\text{filts},z} \times n_{h,x} \times n_{h,y} \times n_{h,z}\). Filters must have odd number of samples and are assumed to be centered in the middle of the filter support.

ihxtuple

Indices of the x locations of the filters hs in the model (and data). Note that the filters must be regularly sampled, i.e. \(dh_x=\text{diff}(ihx)=\text{const.}\)

ihytuple

Indices of the y locations of the filters hs in the model (and data). Note that the filters must be regularly sampled, i.e. \(dh_y=\text{diff}(ihy)=\text{const.}\)

ihztuple

Indices of the z locations of the filters hs in the model (and data). Note that the filters must be regularly sampled, i.e. \(dh_z=\text{diff}(ihz)=\text{const.}\)

enginestr, optional

Engine used for spread computation (numpy, numba, or cuda)

num_threads_per_blockstuple, optional

Number of threads in each block (only when engine=cuda)

dtypestr, optional

Type of elements in input array.

namestr, optional

Name of operator (to be used by pylops.utils.describe.describe)

Attributes:
hshapetuple

Shape of each 2d filter (last two dimensions of hs).

ohxint

Origin of filter indices ihx.

dhxint

Step of filter indices ihx.

nhxint

Number of filters provided alond x direction (first dimension of hs).

ehxint

End of filter indices ihx.

ohyint

Origin of filter indices ihy.

dhyint

Step of filter indices ihy.

nhyint

Number of filters provided alond y direction (second dimension of hs).

ehyint

End of filter indices ihy.

ohzint

Origin of filter indices ihz.

dhzint

Step of filter indices ihz.

nhzint

Number of filters provided alond z direction (third dimension of hs).

ehzint

End of filter indices ihz.

hsinterpnumpy.ndarray

Interpolated filters at all locations along axis.

kwargs_cudadict

Additional arguments to be passed to the CUDA kernel (only when engine=cuda).

dimstuple

Shape of the array after the adjoint, but before flattening.

For example, x_reshaped = (Op.H * y.ravel()).reshape(Op.dims).

dimsdtuple

Shape of the array after the forward, but before flattening. In this case, same as dims.

shapetuple

Operator shape.

Raises:
ValueError

If filters hs have even size

ValueError

If ihx, ihy or ihz is not regularly sampled

NotImplementedError

If engine is neither numpy, fftw, nor scipy.

Notes

See pylops.signalprocessing.NonStationaryConvolve2D.

Methods

__init__(dims, hs, ihx, ihy, ihz[, engine, ...])

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()