Skip to content

Commit

Permalink
Improve inference
Browse files Browse the repository at this point in the history
Improve OrbitalData inference
  • Loading branch information
charleskawczynski committed Sep 10, 2024
1 parent cc49082 commit 4b284c7
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/Insolation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,21 @@ end

function OrbitalData()
datapath = joinpath(artifact"laskar2004", "INSOL.LA2004.BTL.csv")
x, _ = readdlm(datapath, ',', Float64, header = true)
t_range = (x[1, 1] * 1e3):1e3:(x[end, 1] * 1e3) # array of every 1 kyr to range of years
Tx = Tuple{Matrix{Float64}, Matrix{AbstractString}}
x, _ = readdlm(datapath, ',', Float64, header = true)::Tx
T = StepRangeLen{
Float64,
Base.TwicePrecision{Float64},
Base.TwicePrecision{Float64},
Int,
}
t_range = ((x[1, 1] * 1e3):1e3:(x[end, 1] * 1e3))::T # array of every 1 kyr to range of years
e_spline_etp =
cubic_spline_interpolation(t_range, x[:, 2], extrapolation_bc = NaN)
cubic_spline_interpolation(t_range, x[:, 2]; extrapolation_bc = NaN)
γ_spline_etp =
cubic_spline_interpolation(t_range, x[:, 3], extrapolation_bc = NaN)
cubic_spline_interpolation(t_range, x[:, 3]; extrapolation_bc = NaN)
ϖ_spline_etp =
cubic_spline_interpolation(t_range, x[:, 4], extrapolation_bc = NaN)
cubic_spline_interpolation(t_range, x[:, 4]; extrapolation_bc = NaN)

E = typeof(e_spline_etp)
G = typeof(γ_spline_etp)
Expand Down

0 comments on commit 4b284c7

Please sign in to comment.