Skip to content

Commit

Permalink
bug fix jacobian name
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuRoule committed Mar 7, 2024
1 parent 13f91dc commit f55b815
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/OrbitalElements.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export rpra_from_ae, ae_from_rpra
export EL_from_ae, actions_from_ae
export αβ_from_ae, frequencies_from_ae
# mappings (jacobians)
export ae_to_rpra_jacobian, rpra_to_ae_jacobian
# mappings (backward)
export ae_from_EL, ae_from_actions
export ae_from_αβ, ae_from_frequencies
Expand Down
2 changes: 1 addition & 1 deletion src/mappings/peri_apocentre.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ end
Jacobian of the (a,e) ↦ (rp,ra) mapping, i.e. |∂(rp,ra)/∂(a,e)|
"""
function JacAEToRpRa(a::Float64,e::Float64)::Float64
function ae_to_rpra_jacobian(a::Float64,e::Float64)::Float64
_checkdomain_ae(a, e)
return 2a
end
6 changes: 6 additions & 0 deletions test/test_mappings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
# @IMPROVE list untested stuff

@testset "mappings" begin
@testset "model independent" begin
a, e = 1.0, 0.5
rp, ra = rpra_from_ae(a, e)
@test all(rpra_from_ae(1.0, 0.0) .≈ (1.0, 1.0))
@test rpra_to_ae_jacobian(rp, ra) * ae_to_rpra_jacobian(a, e) 1
end
# Compare analytical to numerical results in the isochrone
anapot = AnalyticIsochrone()
numpot = NumericalIsochrone()
Expand Down

0 comments on commit f55b815

Please sign in to comment.