Skip to content

Commit

Permalink
Ensure backward compatibility with GetParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-petersen committed Jun 10, 2024
1 parent 2f27102 commit 8c8340b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Utils/IO.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,7 @@ function getparameters(basis::AB) where {AB <: AbstractAstroBasis}

# Return the dictionary of parameters
return paramsdict
end
end

# for backward compatibility
GetParameters = getparameters
2 changes: 2 additions & 0 deletions test/test_spherical.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ ltest, nradial = 2, 5
basis = AstroBasis.CB73Basis(lmax=ltest,nradial=nradial,G=G, rb=rb)
@test dimension(basis) == 3
@test getparameters(basis)["name"] == "CB73"
# backward compatibility check
@test AstroBasis.GetParameters(basis)["name"] == "CB73"
@test getDln(basis,ltest,nradial-1,rb) 1.6230683210206467 atol=1e-6
@test getUln(basis,ltest,nradial-1,rb) -0.418381088294792 atol=1e-6
tabUl!(basis,0,rb)
Expand Down

0 comments on commit 8c8340b

Please sign in to comment.