Skip to content

Commit

Permalink
add DistributionFunctions to test
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-petersen committed Apr 19, 2024
1 parent 8e9bee6 commit a5cee2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
Pkg.add("HDF5")
Pkg.add("Test")
Pkg.add(url="https://github.com/JuliaStellarDynamics/OrbitalElements.jl.git")
Pkg.add(url="https://github.com/JuliaStellarDynamics/DistributionFunctions.jl.git")
Pkg.add(url="https://github.com/JuliaStellarDynamics/FiniteHilbertTransform.jl.git")
Pkg.add(url="https://github.com/JuliaStellarDynamics/AstroBasis.jl.git")
Pkg.add(url="https://github.com/JuliaStellarDynamics/LinearResponse.jl.git")'
Expand Down
14 changes: 3 additions & 11 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ TEST against known values
"""

using AstroBasis
using DistributionFunctions
using FiniteHilbertTransform
using HDF5
using LinearResponse
Expand Down Expand Up @@ -38,16 +39,7 @@ end

# Model Distribution Function
dfname = "roi0.75"

function ndFdJ(n1::Int64,n2::Int64,
E::Float64,L::Float64,
ndotOmega::Float64;
bc::Float64=1.,M::Float64=1.,astronomicalG::Float64=1.,Ra::Float64=0.75)

return OrbitalElements.plummer_ROI_ndFdJ(n1,n2,E,L,ndotOmega,bc,M,astronomicalG,Ra)

end

distributionfunction = OsipkovMerrittPlummer(0.75,model)

# Linear Response integration parameters
Ku = 12 # number of Legendre integration sample points
Expand Down Expand Up @@ -101,7 +93,7 @@ Parameters = LinearResponse.LinearParameters(basis,Orbitalparams=OEparams,Ω₀=
# 2. Run the G function calculation
# 3. Compute the matrix coefficients
println("Time to evaluate RunLinearResponse:")
@time LinearResponse.RunLinearResponse(model,ndFdJ,FHT,basis,Parameters)
@time LinearResponse.RunLinearResponse(model,distributionfunction,FHT,basis,Parameters)

# construct a grid of frequencies to probe
tabω = LinearResponse.gridomega(Omegamin,Omegamax,nOmega,Etamin,Etamax,nEta)
Expand Down

0 comments on commit a5cee2d

Please sign in to comment.