Skip to content

Commit

Permalink
move to next prod based on JOSS Review #143
Browse files Browse the repository at this point in the history
  • Loading branch information
ptiede committed Jun 21, 2022
1 parent 77ca455 commit 6dbb60d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/models/modelimage/fft_alg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ end
function padimage(img, alg::FFTAlg)
padfac = alg.padfac
ny,nx = size(img)
nnx = nextpow(2, padfac*nx)
nny = nextpow(2, padfac*ny)
nnx = nextprod((2,3,5,7), padfac*nx)
nny = nextprod((2,3,5,7), padfac*ny)
PaddedView(zero(eltype(img)), img, (nny, nnx))
end

Expand Down
4 changes: 2 additions & 2 deletions src/models/modelimage/nfft_alg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ function padimage(alg::NFFTAlg, img)
(padfac == 1) && return img

ny,nx = size(img)
nnx = nextpow(2, padfac*nx)
nny = nextpow(2, padfac*ny)
nnx = nextprod((2,3,5,7), padfac*nx)
nny = nextprod((2,3,5,7), padfac*ny)
nsx = nnx÷2-nx÷2
nsy = nny÷2-ny÷2
return PaddedView(zero(eltype(img)), img,
Expand Down

0 comments on commit 6dbb60d

Please sign in to comment.