pylops_mpi.signalprocessing.MPINonStationaryConvolve1D#
- pylops_mpi.signalprocessing.MPINonStationaryConvolve1D(dims, hs, ih, axis=-1, base_comm=<mpi4py.MPI.Intracomm object>, dtype='float64')[source]#
1D non-stationary convolution operator.
Apply distributed non-stationary one-dimensional convolution. A varying compact filter is provided on a coarser grid and on-the-fly interpolation is applied in forward and adjoint modes.
Alongside distributing the input array across different ranks, the filters are also distributed and filters operating at the edges of the local arrays are replicated on both ranks either side of the edge.
Note
Currently the
pylops_mpi.signalprocessing.MPINonStationaryConvolve1Drequires that shape of the local arrays of the inputpylops_mpi.DistributedArrayare be the same for all ranks.- Parameters:
- dims
listorint Number of samples for each dimension of the input
pylops_mpi.DistributedArray.- hs
numpy.ndarray Bank of 1d compact filters of size \(n_\text{filts} \times n_h\). Filters must have odd number of samples and are assumed to be centered in the middle of the filter support.
- ih
tuple Indices of the locations of the filters
hsin the model (and data). Note that the filters must be regularly sampled, i.e. \(dh=\text{diff}(ih)=\text{const.}\)- axis
int, optional Axis along which convolution is applied
- base_comm
mpi4py.MPI.Comm, optional MPI Base Communicator. Defaults to
mpi4py.MPI.COMM_WORLD.- dtype
str, optional Type of elements in input array.
- dims
- Attributes:
- shape
tuple Operator shape
- shape
- Raises:
- ValueError
If filters
hshave even size- ValueError
If
ihis not regularly sampled- ValueError
If
ihis outside the bounds defined bydims[axis]
Notes
The MPINonStationaryConvolve1D operator applies non-stationary one-dimensional convolution between the input signal \(d(t)\) and a bank of compact filter kernels \(h(t; t_i)\). Assume the input signal is composed of \(N=16\) samples, and distributed across \(N=2\) ranks (with each local signal composes of \(N=8\) samples); similarly, consider \(N=4\) filters at locations \(t_2\) and \(t_6\) in the first rank and \(t_10\) and \(t_14\) in the second rank. Each rank applies an halo of \(N=4\) samples to include the following/preceding filter, and applies locally a :class:pylops.signalprocessingNonStationaryConvolve1D` operator; finally the halo is removed from each local convolved signal.