11import logging
2- import warnings
32import numpy as np
43
54from mpi4py import MPI
6- from pylops import Identity , Transpose
5+ from pylops import Identity
76from pylops .signalprocessing import FFT , Fredholm1
8- from pylops .waveeqprocessing .mdd import _MDC
97
10- from pylops_mpi import (
11- DistributedArray ,
12- MPILinearOperator ,
13- Partition
14- )
8+ from pylops_mpi import MPILinearOperator
159from pylops_mpi .signalprocessing .Fredholm1 import MPIFredholm1
1610
1711
1812def _MDC (G , nt , nv , nfmax , dt = 1. , dr = 1. , twosided = True ,
1913 saveGt = True , conj = False , prescaled = False ,
2014 base_comm = MPI .COMM_WORLD ,
21- _Identity = Identity , _Transpose = Transpose , _FFT = FFT ,
22- _Fredholm1 = Fredholm1 , args_Identity = {}, args_Transpose = {},
23- args_FFT = {}, args_Identity1 = {}, args_Transpose1 = {},
15+ _Identity = Identity , _FFT = FFT ,
16+ _Fredholm1 = Fredholm1 , args_Identity = {},
17+ args_FFT = {}, args_Identity1 = {},
2418 args_FFT1 = {}, args_Fredholm1 = {}):
2519 r"""Multi-dimensional convolution.
2620
@@ -40,11 +34,11 @@ def _MDC(G, nt, nv, nfmax, dt=1., dr=1., twosided=True,
4034
4135 # create Fredholm operator
4236 if prescaled :
43- Frop = _Fredholm1 (G , nv , saveGt = saveGt ,
37+ Frop = _Fredholm1 (G , nv , saveGt = saveGt ,
4438 base_comm = base_comm ,
4539 dtype = dtype , ** args_Fredholm1 )
4640 else :
47- Frop = _Fredholm1 (dr * dt * np .sqrt (nt ) * G , nv ,
41+ Frop = _Fredholm1 (dr * dt * np .sqrt (nt ) * G , nv ,
4842 saveGt = saveGt , base_comm = base_comm ,
4943 dtype = dtype , ** args_Fredholm1 )
5044 if conj :
@@ -73,7 +67,7 @@ def _MDC(G, nt, nv, nfmax, dt=1., dr=1., twosided=True,
7367
7468 # create MDC operator
7569 MDCop = F1opH * I1opH * Frop * Iop * Fop
76-
70+
7771 # force dtype to be real (as FFT operators assume real inputs and outputs)
7872 MDCop .dtype = rdtype
7973
@@ -82,7 +76,7 @@ def _MDC(G, nt, nv, nfmax, dt=1., dr=1., twosided=True,
8276
8377def MPIMDC (G , nt , nv , nfreq , dt = 1. , dr = 1. , twosided = True ,
8478 fftengine = 'numpy' ,
85- saveGt = True , conj = False ,
79+ saveGt = True , conj = False ,
8680 usematmul = False , prescaled = False ,
8781 base_comm : MPI .Comm = MPI .COMM_WORLD ):
8882 r"""Multi-dimensional convolution.
@@ -92,11 +86,11 @@ def MPIMDC(G, nt, nv, nfreq, dt=1., dr=1., twosided=True,
9286 :math:`[n_t \times n_r (\times n_{vs})]` and
9387 :math:`[n_t \times n_s (\times n_{vs})]` (or :math:`2*n_t-1` for
9488 ``twosided=True``), respectively.
95-
89+
9690 Parameters
9791 ----------
9892 G : :obj:`numpy.ndarray`
99- Multi-dimensional convolution kernel in frequency domain of size
93+ Multi-dimensional convolution kernel in frequency domain of size
10094 :math:`[n_{fmax} \times n_s \times n_r]`
10195 nt : :obj:`int`
10296 Number of samples along time axis for model and data (note that this
@@ -180,4 +174,4 @@ def MPIMDC(G, nt, nv, nfreq, dt=1., dr=1., twosided=True,
180174 base_comm = base_comm ,
181175 _Fredholm1 = MPIFredholm1 ,
182176 args_FFT = {'engine' : fftengine },
183- args_Fredholm1 = {'usematmul' : usematmul })
177+ args_Fredholm1 = {'usematmul' : usematmul })
0 commit comments