Skip to content

Commit 86cd36c

Browse files
committed
Fix timespan bug in source_grid
1 parent 82361a1 commit 86cd36c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/observables/fourier.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ function source_grid(prob::CosmologyProblem, S::AbstractArray, τs, ks; bgopts =
187187
bgsol = solvebg(prob.bg; bgopts..., verbose)
188188
getSs = map(s -> getsym(prob.pt, s), S)
189189
Ss = similar(bgsol, length(S), length(τs), length(ks))
190-
extrema(τs) == extrema(bgsol.t) || error("input τs and computed background solution have different timespans") # TODO: don't rely on
190+
minimum(τs) bgsol.t[begin] && maximum(τs) bgsol.t[end] || error("input τs and computed background solution have different timespans")
191191
function output_func(sol, ik)
192192
for iS in eachindex(getSs)
193193
Ss[iS, :, ik] .= getSs[iS](sol)

0 commit comments

Comments
 (0)