Skip to content

Commit c20c9b0

Browse files
committed
Fix AveragedSpecifiedTimes to use sorted times for averaging windows
1 parent 61d29ac commit c20c9b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/OutputWriters/windowed_time_average.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function AveragedSpecifiedTimes(times, window::Vector{Float64}; kw...)
129129

130130
any(time_diff .- sorted_window .< -eps(eltype(window))) && throw(ArgumentError("Averaging windows overlap. Ensure that for each specified time tᵢ, tᵢ - windowᵢ ≥ tᵢ₋₁."))
131131

132-
return AveragedSpecifiedTimes(SpecifiedTimes(times); window=sorted_window, kw...)
132+
return AveragedSpecifiedTimes(SpecifiedTimes(sorted_times); window=sorted_window, kw...)
133133
end
134134

135135
function AveragedSpecifiedTimes(times, window::Float64; kw...)

0 commit comments

Comments
 (0)