Skip to content

Commit 84fef94

Browse files
committed
Re-add precompute flag and update keyword args delimter
1 parent 5157276 commit 84fef94

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

ext/LinearOperatorNFFTExt/NFFTOp.jl

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ generates a `NFFTOpImpl` which evaluates the MRI Fourier signal encoding operato
66
77
# Arguments:
88
* `shape::NTuple{D,Int64}` - size of image to encode/reconstruct
9-
* `tr` - Either a `Trajectory` object, or a `ND x Nsamples` matrix for an ND-dimenensional (e.g. 2D or 3D) NFFT with `Nsamples` k-space samples
10-
* (`nodes=nothing`) - Array containg the trajectory nodes (redundant)
11-
* (`kargs`) - additional keyword arguments for the NFFT plan
9+
* `nodes=nothing` - Array containg the trajectory nodes
10+
* `toeplitz=false` -
11+
* `oversamplingFactor=1.25`
12+
* `kernelSize=3`
13+
* `precompute = AbstractNFFTs.TENSOR` Precompute flag for the NFFT backend
14+
* (`kargs`) - additional keyword arguments for the NFFT plan,
1215
"""
1316
function LinearOperatorCollection.NFFTOp(::Type{T};
1417
shape::Tuple, nodes::AbstractMatrix{U}, toeplitz=false, oversamplingFactor=1.25,
15-
kernelSize=3, kargs...) where {U <: Number, T <: Number}
18+
kernelSize=3, precompute = AbstractNFFTs.TENSOR, kargs...) where {U <: Number, T <: Number}
1619
return NFFTOpImpl(shape, nodes; toeplitz, oversamplingFactor, kernelSize, kargs... )
1720
end
1821

@@ -38,10 +41,10 @@ end
3841

3942
LinearOperators.storage_type(op::NFFTOpImpl) = typeof(op.Mv5)
4043

41-
function NFFTOpImpl(shape::Tuple, tr::AbstractMatrix{T}; toeplitz=false, oversamplingFactor=1.25, kernelSize=3, S = Vector{Complex{T}}, kargs...) where {T}
44+
function NFFTOpImpl(shape::Tuple, tr::AbstractMatrix{T}; toeplitz, oversamplingFactor, kernelSize, S = Vector{Complex{T}}, kargs...) where {T}
4245

4346
baseArrayType = Base.typename(S).wrapper # https://github.com/JuliaLang/julia/issues/35543
44-
plan = plan_nfft(baseArrayType, tr, shape, m=kernelSize, σ=oversamplingFactor,
47+
plan = plan_nfft(baseArrayType, tr, shape; m=kernelSize, σ=oversamplingFactor,
4548
fftflags=FFTW.ESTIMATE, blocking=true, kargs...)
4649

4750
return NFFTOpImpl{eltype(S), S, typeof(plan)}(size(tr,2), prod(shape), false, false
@@ -143,7 +146,7 @@ function NFFTToeplitzNormalOp(nfft::NFFTOp{T}, W=nothing; kwargs...) where {T}
143146
shape_os = 2 .* shape
144147
baseArrayType = Base.typename(typeof(tmpVec)).wrapper # https://github.com/JuliaLang/julia/issues/35543
145148
p = plan_nfft(baseArrayType, nfft.plan.k, shape_os; m = nfft.plan.params.m, σ = nfft.plan.params.σ,
146-
precompute=NFFT.POLYNOMIAL, fftflags=FFTW.ESTIMATE, blocking=true)
149+
precompute=AbstractNFFTs.POLYNOMIAL, fftflags=FFTW.ESTIMATE, blocking=true)
147150
tmpOnes = similar(tmpVec, size(nfft.plan.k, 2))
148151
tmpOnes .= one(T)
149152

0 commit comments

Comments
 (0)