A simple Julia wrapper for the cosmological Boltzmann solver CLASS that reads its output as DataFrames.
julia> using Pkg; Pkg.add("CLASS")This installs the wrapper, but not the CLASS code itself. Install whichever version of CLASS you want to run yourself!
Create a CLASSProblem matching the CLASS .ini format, then solve it (you can pass exec = "/path/to/custom/CLASS/executable" to solve):
julia> using CLASS
julia> prob = CLASSProblem(
"h" => 0.70,
"output" => [:mPk, "tCl", "pCl"],
"write_background" => true,
);
julia> sol = solve(prob)
CLASS solution with tables:
pk: unread (lazily loaded)
cl: unread (lazily loaded)
background: unread (lazily loaded)
julia> sol["background"]
40000ร19 DataFrame
Row โ z proper time [Gyr] conf. time [Mpc] H [1/Mpc] โฏ
โ Float64 Float64 Float64 Float64 โฏ
โโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
1 โ 1.0e14 7.55952e-26 4.63479e-9 2.15726e22 โฏ
2 โ 9.99194e13 7.57171e-26 4.63842e-9 2.15378e22
3 โ 9.98389e13 7.58393e-26 4.64388e-9 2.15031e22
4 โ 9.97585e13 7.59616e-26 4.64752e-9 2.14685e22
5 โ 9.96781e13 7.60842e-26 4.65116e-9 2.14339e22 โฏ
6 โ 9.95978e13 7.62069e-26 4.65479e-9 2.13994e22
โฎ โ โฎ โฎ โฎ โฎ โฑ
39996 โ 0.0032289 13.2951 13703.4 0.000233846
39997 โ 0.0024207 13.3063 13706.8 0.000233758
39998 โ 0.00161315 13.3176 13710.3 0.00023367 โฏ
39999 โ 0.00080625 13.3288 13713.7 0.000233582
40000 โ 0.0 13.3401 13717.2 0.000233495
15 columns and 39989 rows omitted