-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Hi,
I was wondering if there would be interest in having a extension of DimensionalData
for AbstractFFT
with the aim of using the additional information providing by the lookups.
My idea would be something like this:
function fft(dd::AbstractDimVector)
dx = step(lookup(dd, 1))
fx = fftfreq(length(dd), 1 / dx)
fft_dd = fft(parent(dd))
D = DimensionalData.basetypeof(dims(dd, 1))
fft_dd .*= dx
DimVector(fft_dd, D(fx))
end
fft(rand(X(1:100)))
┌ 100-element DimArray{ComplexF64, 1} ┐
├─────────────────────────────────────┴─────────────────────── dims ┐
↓ X Sampled{Float64} [0.0, …, -0.01] Unordered Irregular Points
└───────────────────────────────────────────────────────────────────┘
⋮ ⋱
Ideally, the implementation would support fft_plan
, mul!
and N-dimensional arrays.
Happy to create a PR if there is interest in adding something like this as an extension.
rafaqz
Metadata
Metadata
Assignees
Labels
No labels