diff --git a/Project.toml b/Project.toml index 7bda77a..23135a2 100644 --- a/Project.toml +++ b/Project.toml @@ -6,6 +6,7 @@ version = "1.4.0" [deps] ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" BandedMatrices = "aae01518-5342-5314-be14-df237901396f" +DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0" FiniteElementHermite = "6ce10167-d368-4c0e-af34-9787cdd175e5" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" diff --git a/src/QED.jl b/src/QED.jl index 5c10f12..7e1b93c 100644 --- a/src/QED.jl +++ b/src/QED.jl @@ -4,6 +4,7 @@ module QED using FiniteElementHermite using BandedMatrices +import DataInterpolations import ForwardDiff import JSON using ArgParse diff --git a/src/build.jl b/src/build.jl index ddb98d4..441ee68 100644 --- a/src/build.jl +++ b/src/build.jl @@ -12,9 +12,9 @@ function Waveform(value::T) where {T<:Real} end # Interpolated waveform -function Waveform(ts::AbstractVector{T}, values::AbstractVector{S}; order=:cubic) where {T<:Real, S<:Real} +function Waveform(ts::AbstractVector{T}, values::AbstractVector{S}) where {T<:Real, S<:Real} TS = promote_type(T, S) - fitp = IMAS.interp1d(ts, values, order) + fitp = DataInterpolations.CubicSpline(values, ts; extrapolate=true) return Waveform{TS}(t -> fitp(t)) end