5252
5353To predict [ luminosity distances] ( @ref " Luminosity distance ") theoretically, we solve the w0waCDM model:
5454``` @example fit
55- using SymBoltz
55+ using SymBoltz, OrdinaryDiffEqTsit5
5656g = SymBoltz.metric()
5757K = SymBoltz.curvature(g)
5858X = SymBoltz.w0wa(g; analytical = true)
@@ -68,7 +68,7 @@ dL = SymBoltz.distance_luminosity_function(M, pars_fixed, pars_varying, data.zcm
6868
6969# Show example predictions
7070Mb = -19.3 # absolute supernova brightness (constant since SN-Ia are standard candles)
71- bgopts = (alg = SymBoltz. Tsit5(), reltol = 1e-5, maxiters = 1e3)
71+ bgopts = (alg = Tsit5(), reltol = 1e-5, maxiters = 1e3)
7272p0 = [9.3e-5, 0.3, 0.0, 0.7, -1.0, 0.0] # fiducial parameters
7373μs = μ(p0)
7474mbs = μs .+ Mb
@@ -92,12 +92,12 @@ using Turing
9292 wa ~ Uniform(-1.0, +1.0)
9393
9494 p = [Ωr0, Ωm0, Ωk0, h, w0, wa]
95- μs_pred = μ_pred(p)
96- if isempty(μs_pred )
95+ mbs_pred = μ_pred(p)
96+ if isempty(mbs_pred )
9797 Turing.@addlogprob! -Inf
9898 return nothing
9999 end
100- mbs_pred = μs_pred .+ Mb
100+ mbs_pred .+= Mb
101101 return mbs ~ MvNormal(mbs_pred, C) # read "measurements sampled from multivariate normal with predictions and covariance matrix"
102102
103103 # equivalently:
@@ -238,7 +238,7 @@ pp_fc
238238
239239``` @setup fit
240240#=
241- using SymBoltz, OrdinaryDiffEq , Turing
241+ using SymBoltz, OrdinaryDiffEqTsit5 , Turing
242242
243243function dL_fast(z, Ωm0, Ωk0, h; Ωr0 = 9.3e-5, aini = 1e-8, reltol = 1e-8, alg = Tsit5(), maxiters = 1e3)
244244 ΩΛ0 = 1 - Ωr0 - Ωm0 - Ωk0
0 commit comments