Skip to content

Commit

Permalink
Fix compatibility with EarthOrientation.jl
Browse files Browse the repository at this point in the history
EarthOrientation.jl v0.7.3 introduces breaking change in how CSVs from
IERS are handled. The only change required in AstroTime.jl are the
EOParam files used for testing. The old ones are removed and two new
ones are added from
- https://datacenter.iers.org/data/csv/finals2000A.all.csv
- https://datacenter.iers.org/data/csv/finals.all.csv
The compatibility restriction for EarthOrientation.jl is removed.
  • Loading branch information
abhro committed Jun 9, 2024
1 parent 974cfab commit 22ff0ae
Show file tree
Hide file tree
Showing 8 changed files with 38,448 additions and 35,325 deletions.
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ Reexport = "189a3867-3050-52da-a836-e630ba90ab69"

[compat]
ERFA = "0.5, 0.6, 1.0"
EarthOrientation = "0.7 - 0.7.2"
ItemGraphs = "0.4"
LeapSeconds = "1.1"
MacroTools = "0.5"
Expand Down
4 changes: 2 additions & 2 deletions src/AstroTime.jl
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ function load_eop(files...)
end

function load_test_eop()
finals = joinpath(@__DIR__, "..", "test", "data", "finals.csv")
finals2000A = joinpath(@__DIR__, "..", "test", "data", "finals2000A.csv")
finals = joinpath(@__DIR__, "..", "test", "data", "finals.all.csv")
finals2000A = joinpath(@__DIR__, "..", "test", "data", "finals2000A.all.csv")
load_eop(finals, finals2000A)
end

Expand Down
29 changes: 29 additions & 0 deletions test/conversions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01
end

@testset "TAI<->TDB" begin
ep = TAIEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TDBEpoch(ep)
Expand All @@ -32,6 +33,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-6
end

@testset "TAI<->TCB" begin
ep = TAIEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TCBEpoch(ep)
Expand All @@ -49,6 +51,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-6
end

@testset "TAI<->TCG" begin
ep = TAIEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TCGEpoch(ep)
Expand All @@ -66,6 +69,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01
end

@testset "TAI<->UT1" begin
ep = TAIEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = UT1Epoch(ep)
Expand All @@ -83,6 +87,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-5
end

@testset "TT<->TAI" begin
ep = TTEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TAIEpoch(ep)
Expand All @@ -100,6 +105,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01
end

@testset "TT<->TDB" begin
ep = TTEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TDBEpoch(ep)
Expand All @@ -117,6 +123,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-6
end

@testset "TT<->TCB" begin
ep = TTEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TCBEpoch(ep)
Expand All @@ -134,6 +141,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-6
end

@testset "TT<->TCG" begin
ep = TTEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TCGEpoch(ep)
Expand All @@ -151,6 +159,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01
end

@testset "TT<->UT1" begin
ep = TTEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = UT1Epoch(ep)
Expand All @@ -168,6 +177,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-5
end

@testset "TDB<->TAI" begin
ep = TDBEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TAIEpoch(ep)
Expand All @@ -185,6 +195,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-6
end

@testset "TDB<->TT" begin
ep = TDBEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TTEpoch(ep)
Expand All @@ -202,6 +213,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-6
end

@testset "TDB<->TCB" begin
ep = TDBEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TCBEpoch(ep)
Expand All @@ -219,6 +231,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-6
end

@testset "TDB<->TCG" begin
ep = TDBEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TCGEpoch(ep)
Expand All @@ -236,6 +249,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-6
end

@testset "TDB<->UT1" begin
ep = TDBEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = UT1Epoch(ep)
Expand All @@ -253,6 +267,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-5
end

@testset "TCB<->TAI" begin
ep = TCBEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TAIEpoch(ep)
Expand All @@ -270,6 +285,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-6
end

@testset "TCB<->TT" begin
ep = TCBEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TTEpoch(ep)
Expand All @@ -287,6 +303,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-6
end

@testset "TCB<->TDB" begin
ep = TCBEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TDBEpoch(ep)
Expand All @@ -304,6 +321,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-6
end

@testset "TCB<->TCG" begin
ep = TCBEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TCGEpoch(ep)
Expand All @@ -321,6 +339,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-6
end

@testset "TCB<->UT1" begin
ep = TCBEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = UT1Epoch(ep)
Expand All @@ -338,6 +357,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-5
end

@testset "TCG<->TAI" begin
ep = TCGEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TAIEpoch(ep)
Expand All @@ -355,6 +375,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01
end

@testset "TCG<->TT" begin
ep = TCGEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TTEpoch(ep)
Expand All @@ -372,6 +393,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01
end

@testset "TCG<->TDB" begin
ep = TCGEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TDBEpoch(ep)
Expand All @@ -389,6 +411,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-6
end

@testset "TCG<->TCB" begin
ep = TCGEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TCBEpoch(ep)
Expand All @@ -406,6 +429,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-6
end

@testset "TCG<->UT1" begin
ep = TCGEpoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = UT1Epoch(ep)
Expand All @@ -423,6 +447,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-5
end

@testset "UT1<->TAI" begin
ep = UT1Epoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TAIEpoch(ep)
Expand All @@ -440,6 +465,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-5
end

@testset "UT1<->TT" begin
ep = UT1Epoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TTEpoch(ep)
Expand All @@ -457,6 +483,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-5
end

@testset "UT1<->TDB" begin
ep = UT1Epoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TDBEpoch(ep)
Expand All @@ -474,6 +501,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-5
end

@testset "UT1<->TCB" begin
ep = UT1Epoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TCBEpoch(ep)
Expand All @@ -491,6 +519,7 @@ end
@test minute(in_ep) == 2
@test second(Float64, in_ep) 5.1551247436378276e+01 atol=1e-5
end

@testset "UT1<->TCG" begin
ep = UT1Epoch(2018, 8, 14, 10, 2, 5.1551247436378276e+01)
out_ep = TCGEpoch(ep)
Expand Down
Loading

0 comments on commit 22ff0ae

Please sign in to comment.