Skip to content

Commit

Permalink
minor: changed np.pi/np.exp into pi/exp
Browse files Browse the repository at this point in the history
  • Loading branch information
mrava87 committed Oct 3, 2024
1 parent 3b56783 commit 7e2cec1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 4 additions & 6 deletions pylops/signalprocessing/_fourierradon2d_numba.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import os
from cmath import exp
from math import pi

import numpy as np
from numba import jit, prange
Expand All @@ -13,9 +15,7 @@ def _radon_inner_2d(X, Y, f, px, h, flim0, flim1, npx, nh):
for ih in prange(nh):
for ifr in range(flim0, flim1):
for ipx in range(npx):
Y[ih, ifr] += X[ipx, ifr] * np.exp(
-1j * 2 * np.pi * f[ifr] * px[ipx] * h[ih]
)
Y[ih, ifr] += X[ipx, ifr] * exp(-1j * 2 * pi * f[ifr] * px[ipx] * h[ih])
return Y


Expand All @@ -24,7 +24,5 @@ def _aradon_inner_2d(X, Y, f, px, h, flim0, flim1, npx, nh):
for ipx in prange(npx):
for ifr in range(flim0, flim1):
for ih in range(nh):
X[ipx, ifr] += Y[ih, ifr] * np.exp(
1j * 2 * np.pi * f[ifr] * px[ipx] * h[ih]
)
X[ipx, ifr] += Y[ih, ifr] * exp(1j * 2 * pi * f[ifr] * px[ipx] * h[ih])
return X
10 changes: 6 additions & 4 deletions pylops/signalprocessing/_fourierradon3d_numba.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import os
from cmath import exp
from math import pi

import numpy as np
from numba import jit, prange
Expand All @@ -15,10 +17,10 @@ def _radon_inner_3d(X, Y, f, py, px, hy, hx, flim0, flim1, npy, npx, nhy, nhx):
for ifr in range(flim0, flim1):
for ipy in range(npy):
for ipx in range(npx):
Y[ihy, ihx, ifr] += X[ipy, ipx, ifr] * np.exp(
Y[ihy, ihx, ifr] += X[ipy, ipx, ifr] * exp(
-1j
* 2
* np.pi
* pi
* f[ifr]
* (py[ipy] * hy[ihy] + px[ipx] * hx[ihx])
)
Expand All @@ -32,10 +34,10 @@ def _aradon_inner_3d(X, Y, f, py, px, hy, hx, flim0, flim1, npy, npx, nhy, nhx):
for ifr in range(flim0, flim1):
for ihy in range(nhy):
for ihx in range(nhx):
X[ipy, ipx, ifr] += Y[ihy, ihx, ifr] * np.exp(
X[ipy, ipx, ifr] += Y[ihy, ihx, ifr] * exp(
1j
* 2
* np.pi
* pi
* f[ifr]
* (py[ipy] * hy[ihy] + px[ipx] * hx[ihx])
)
Expand Down

0 comments on commit 7e2cec1

Please sign in to comment.