pylops.CausalIntegration¶
-
class
pylops.CausalIntegration(N, dims=None, dir=-1, sampling=1, halfcurrent=True, dtype='float64')[source]¶ Causal integration.
Apply causal integration to a multi-dimensional array along
diraxis.Parameters: - N :
int Number of samples in model.
- dims :
list, optional Number of samples for each dimension (
Noneif only one dimension is available)- dir :
int, optional Direction along which smoothing is applied.
- sampling :
float, optional Sampling step
dx.- halfcurrent :
float, optional Add half of current value (
True) or the entire value (False)- dtype :
str, optional Type of elements in input array.
Notes
The CausalIntegration operator applies a causal integration to any chosen direction of a multi-dimensional array.
For simplicity, given a one dimensional array, the causal integration is:
\[y(t) = \int x(t) dt\]which can be discretised as :
\[y[i] = \sum_{j=0}^i x[j] dt\]or
\[y[i] = (\sum_{j=0}^{i-1} x[j] + 0.5x[i]) dt\]where \(dt\) is the
samplinginterval. In our implementation, the choice to add \(x[i]\) or just \(0.5x[i]\) is made by selecting thehalfcurrentparameter.Note that the integral of a signal has no unique solution, as any constant \(c\) can be added to \(y\), for example if \(x(t)=t^2\) the resulting integration is:
\[y(t) = \int t^2 dt = \frac{t^3}{3} + c\]If we apply a first derivative to \(y\) we in fact obtain:
\[x(t) = \frac{dy}{dt} = t^2\]no matter the choice of \(c\).
Attributes: Methods
__init__(N[, dims, dir, sampling, …])Initialize this LinearOperator. adjoint()Hermitian adjoint. apply_columns(cols)Apply subset of columns of operator cond([uselobpcg])Condition number of linear operator. conj()Complex conjugate operator div(y[, niter])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. 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. transpose()Transpose this linear operator. - N :