Skip to content

Commit 29afcd0

Browse files
committed
chore: prepare for merge with upstream
1 parent f7beca8 commit 29afcd0

6 files changed

Lines changed: 27 additions & 27 deletions

File tree

examples/plot_symmetrize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575

7676

7777
x = np.outer(np.ones(nt), np.arange(nx))
78-
Sop = pylops.Symmetrize(dims=(nt, nx), axis=1)
78+
Sop = pylops.Symmetrize((nt, nx), axis=1)
7979

8080
y = Sop * x.ravel()
8181
xadj = Sop.H * y.ravel()

examples/plot_tvreg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@
148148

149149
Dop = [
150150
pylops.FirstDerivative(
151-
dims=(ny, nx), axis=0, edge=False, kind="backward", dtype=np.complex128
151+
(ny, nx), axis=0, edge=False, kind="backward", dtype=np.complex128
152152
),
153153
pylops.FirstDerivative(
154-
dims=(ny, nx), axis=1, edge=False, kind="backward", dtype=np.complex128
154+
(ny, nx), axis=1, edge=False, kind="backward", dtype=np.complex128
155155
),
156156
]
157157

pylops/signalprocessing/FFT2D.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ def FFT2D(
237237
the adjoint is multiplied by :math:`1 / \sqrt{2}` for the same frequencies.
238238
239239
For a real valued input signal, it is advised to use the flag ``real=True``
240-
as it stores the values of the Fourier transform of the last direction at positive
240+
as it stores the values of the Fourier transform of the last axis in ``axes`` at positive
241241
frequencies only as values at negative frequencies are simply their complex conjugates.
242242
243243
Parameters
@@ -255,15 +255,15 @@ def FFT2D(
255255
instead of (0, 1) which was the default for ``dirs``.
256256
257257
nffts : :obj:`tuple` or :obj:`int`, optional
258-
Number of samples in Fourier Transform for each direction. In case only one
258+
Number of samples in Fourier Transform for each axis in ``axes``. In case only one
259259
dimension needs to be specified, use ``None`` for the other dimension in the
260-
tuple. The direction with None will use ``(dims[axes[0]], dims[axes[1]])``
261-
as ``nffts``. When supplying a tuple, the order must agree with that
262-
of ``axes``. When a single value is passed, it will be used for both
263-
directions. As such the default is equivalent to ``nffts=(None, None)``.
260+
tuple. An axis with ``None`` will use ``dims[axis]`` as ``nfft``.
261+
When supplying a tuple, the length must be 2.
262+
When a single value is passed, it will be used for both
263+
axes. As such the default is equivalent to ``nffts=(None, None)``.
264264
sampling : :obj:`tuple` or :obj:`float`, optional
265-
Sampling steps for each direction. When supplied a single value, it is used
266-
for both directions. Unlike ``nffts``, any ``None`` will not be converted to the
265+
Sampling steps for each axis in ``axes``. When supplied a single value, it is used
266+
for both axes. Unlike ``nffts``, any ``None`` will not be converted to the
267267
default value.
268268
norm : `{"ortho", "none", "1/n"}`, optional
269269
.. versionadded:: 1.17.0
@@ -293,15 +293,15 @@ def FFT2D(
293293
coincide with the zero index sample. With such an arrangement, FFT will not
294294
introduce a sample-dependent phase-shift when compared to the continuous Fourier
295295
Transform.
296-
When passing a single value, the shift will the same for every direction. Pass
296+
When passing a single value, the shift will the same for every axis in ``axes``. Pass
297297
a tuple to specify which dimensions are shifted.
298298
fftshift_after : :obj:`tuple` or :obj:`bool`, optional
299299
Apply fftshift (``True``) or not (``False``) to data vector (after FFT).
300300
Consider using this option when you require frequencies to be arranged
301301
naturally, from negative to positive. When not applying fftshift after FFT,
302302
frequencies are arranged from zero to largest positive, and then from negative
303303
Nyquist to the frequency bin before zero.
304-
When passing a single value, the shift will the same for every direction. Pass
304+
When passing a single value, the shift will the same for every axis in ``axes``. Pass
305305
a tuple to specify which dimensions are shifted.
306306
engine : :obj:`str`, optional
307307
.. versionadded:: 1.17.0

pylops/signalprocessing/FFTND.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ def _rmatvec(self, x):
8484
y = np.fft.ifftn(x, s=self.nffts, axes=self.axes, **self._norm_kwargs)
8585
if self.norm is _FFTNorms.NONE:
8686
y *= self._scale
87-
for direction, nfft in zip(self.axes, self.nffts):
88-
if nfft > self.dims[direction]:
89-
y = np.take(y, range(self.dims[direction]), axis=direction)
87+
for ax, nfft in zip(self.axes, self.nffts):
88+
if nfft > self.dims[ax]:
89+
y = np.take(y, range(self.dims[ax]), axis=ax)
9090
if self.doifftpad:
9191
y = np.pad(y, self.ifftpad)
9292
if not self.clinear:
@@ -172,9 +172,9 @@ def _rmatvec(self, x):
172172
y = scipy.fft.ifftn(x, s=self.nffts, axes=self.axes, **self._norm_kwargs)
173173
if self.norm is _FFTNorms.NONE:
174174
y *= self._scale
175-
for direction, nfft in zip(self.axes, self.nffts):
176-
if nfft > self.dims[direction]:
177-
y = np.take(y, range(self.dims[direction]), axis=direction)
175+
for ax, nfft in zip(self.axes, self.nffts):
176+
if nfft > self.dims[ax]:
177+
y = np.take(y, range(self.dims[ax]), axis=ax)
178178
if self.doifftpad:
179179
y = np.pad(y, self.ifftpad)
180180
if not self.clinear:
@@ -222,7 +222,7 @@ def FFTND(
222222
:math:`1 / \sqrt{2}` for the same frequencies.
223223
224224
For a real valued input signal, it is advised to use the flag ``real=True``
225-
as it stores the values of the Fourier transform of the last direction at positive
225+
as it stores the values of the Fourier transform of the last axis in ``axes`` at positive
226226
frequencies only as values at negative frequencies are simply their complex conjugates.
227227
228228
Parameters
@@ -240,12 +240,12 @@ def FFTND(
240240
instead of (0, 1, 2) which was the default for ``dirs``.
241241
242242
nffts : :obj:`tuple` or :obj:`int`, optional
243-
Number of samples in Fourier Transform for each direction. In case only one
243+
Number of samples in Fourier Transform for each axis in ``axes``. In case only one
244244
dimension needs to be specified, use ``None`` for the other dimension in the
245-
tuple. The direction with None will use ``dims[axis]`` for each ``axis`` in
246-
``axes`` as ``nffts``. When supplying a tuple, the order must agree with that
247-
of ``axes``. When a single value is passed, it will be used for both
248-
directions. As such the default is equivalent to ``nffts=(None, ..., None)``.
245+
tuple. An axis with ``None`` will use ``dims[axis]`` as ``nfft``.
246+
When supplying a tuple, the length must agree with that
247+
of ``axes``. When a single value is passed, it will be used for all
248+
``axes`. As such the default is equivalent to ``nffts=(None, ..., None)``.
249249
sampling : :obj:`tuple` or :obj:`float`, optional
250250
Sampling steps for each direction. When supplied a single value, it is used
251251
for all directions. Unlike ``nffts``, any ``None`` will not be converted to the

pylops/utils/describe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def _describe(Op):
235235

236236

237237
def describe(Op):
238-
r"""Describe a PyLops operator
238+
"""Describe a PyLops operator
239239
240240
.. versionadded:: 1.17.0
241241

pylops/waveeqprocessing/marchenko.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ def __init__(
245245
"even when R is provided in frequency domain. It is "
246246
"recommended to start using the operator without the R1 "
247247
"input as this behaviour will become default in "
248-
"version v2.0 and R1 will be removed from the inputs.",
248+
"version v2.0.0 and R1 will be removed from the inputs.",
249249
FutureWarning,
250250
)
251251
# Save inputs into class

0 commit comments

Comments
 (0)