@@ -167,6 +167,19 @@ function Base.A_mul_B!{T}(f::AbstractVector{T}, P::NUFFTPlan{3,T}, c::AbstractVe
167
167
f
168
168
end
169
169
170
+ function A_mul_B_col_J! {T} (F:: Matrix{T} , P:: NUFFTPlan{3,T} , C:: Matrix{T} , J:: Int )
171
+ U, V, p, t, temp, temp2, Ones = P. U, P. V, P. p, P. t, P. temp, P. temp2, P. Ones
172
+
173
+ broadcast_col_J! (* , temp2, C, V, J)
174
+ A_mul_B! (temp, p, temp2)
175
+ reindex_temp! (temp, t, temp2)
176
+ broadcast! (* , temp, U, temp2)
177
+ COLSHIFT = size (C, 1 )* (J- 1 )
178
+ A_mul_B! (F, temp, Ones, 1 + COLSHIFT, 1 )
179
+
180
+ F
181
+ end
182
+
170
183
function reindex_temp! {T} (temp:: Matrix{T} , t:: Vector{Int} , temp2:: Matrix{T} )
171
184
@inbounds for j = 1 : size (temp, 2 )
172
185
for i = 1 : size (temp, 1 )
@@ -227,6 +240,17 @@ immutable NUFFT2DPlan{T,P1,P2} <: Base.DFT.Plan{T}
227
240
temp:: Vector{T}
228
241
end
229
242
243
+ doc"""
244
+ Pre-computes a 2D nonuniform fast Fourier transform of type I-I.
245
+ """
246
+ function plan_nufft1 {T<:AbstractFloat} (ω:: AbstractVector{T} , π:: AbstractVector{T} , ϵ:: T )
247
+ p1 = plan_nufft1 (ω, ϵ)
248
+ p2 = plan_nufft1 (π, ϵ)
249
+ temp = zeros (Complex{T}, length (π))
250
+
251
+ NUFFT2DPlan (p1, p2, temp)
252
+ end
253
+
230
254
doc"""
231
255
Pre-computes a 2D nonuniform fast Fourier transform of type II-II.
232
256
"""
@@ -258,6 +282,15 @@ function Base.A_mul_B!{T}(F::Matrix{T}, P::NUFFT2DPlan{T}, C::Matrix{T})
258
282
F
259
283
end
260
284
285
+ doc"""
286
+ Computes a 2D nonuniform fast Fourier transform of type I-I:
287
+
288
+ ```math
289
+ f_{j_1,j_2} = \s um_{k_1=1}^M\s um_{k_2=1}^N C_{k_1,k_2} e^{-2\p i{\r m i} ((j_1-1)/M \o mega_{k_1} + (j_2-1)/N \p i_{k_2})},\q uad{\r m for}\q uad 1 \l e j_1 \l e M,\q uad 1 \l e j_2 \l e N.
290
+ ```
291
+ """
292
+ nufft1 {T<:AbstractFloat} (C:: Matrix , ω:: AbstractVector{T} , π:: AbstractVector{T} , ϵ:: T ) = plan_nufft1 (ω, π, ϵ)* C
293
+
261
294
doc"""
262
295
Computes a 2D nonuniform fast Fourier transform of type II-II:
263
296
0 commit comments