pylops.signalprocessing.Fredholm1#
- class pylops.signalprocessing.Fredholm1(G, nz=1, saveGt=True, usematmul=True, dtype='float64', name='F')[source]#
Fredholm integral of first kind.
Implement a multi-dimensional Fredholm integral of first kind. Note that if the integral is two dimensional, this can be directly implemented using
pylops.basicoperators.MatrixMult
. A multi-dimensional Fredholm integral can be performed as apylops.basicoperators.BlockDiag
operator of a series ofpylops.basicoperators.MatrixMult
. However, here we take advantage of the structure of the kernel and perform it in a more efficient manner.- Parameters
- G
numpy.ndarray
Multi-dimensional convolution kernel of size \([n_{\text{slice}} \times n_x \times n_y]\)
- nz
int
, optional Additional dimension of model
- saveGt
bool
, optional Save
G
andG.H
to speed up the computation of adjoint (True
) or createG.H
on-the-fly (False
) Note thatsaveGt=True
will double the amount of required memory- usematmul
bool
, optional Use
numpy.matmul
(True
) or for-loop withnumpy.dot
(False
). As it is not possible to define which approach is more performant (this is highly dependent on the size ofG
and input arrays as well as the hardware used in the computation), we advise users to time both methods for their specific problem prior to making a choice.- dtype
str
, optional Type of elements in input array.
- name
str
, optional New in version 2.0.0.
Name of operator (to be used by
pylops.utils.describe.describe
)
- G
Notes
A multi-dimensional Fredholm integral of first kind can be expressed as
\[d(k, x, z) = \int{G(k, x, y) m(k, y, z) \,\mathrm{d}y} \quad \forall k=1,\ldots,n_{slice}\]on the other hand its adjoint is expressed as
\[m(k, y, z) = \int{G^*(k, y, x) d(k, x, z) \,\mathrm{d}x} \quad \forall k=1,\ldots,n_{\text{slice}}\]In discrete form, this operator can be seen as a block-diagonal matrix multiplication:
\[\begin{split}\begin{bmatrix} \mathbf{G}_{k=1} & \mathbf{0} & \ldots & \mathbf{0} \\ \mathbf{0} & \mathbf{G}_{k=2} & \ldots & \mathbf{0} \\ \vdots & \vdots & \ddots & \vdots \\ \mathbf{0} & \mathbf{0} & \ldots & \mathbf{G}_{k=N} \end{bmatrix} \begin{bmatrix} \mathbf{m}_{k=1} \\ \mathbf{m}_{k=2} \\ \vdots \\ \mathbf{m}_{k=N} \end{bmatrix}\end{split}\]- Attributes
Methods
__init__
(G[, nz, saveGt, usematmul, 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
()