Skip to content
Snippets Groups Projects
Commit 36e53220 authored by Brian Groenke's avatar Brian Groenke
Browse files

Fix bug introduced by DimensionalData update

parent b732906c
No related branches found
No related tags found
1 merge request!46Refactor parameter and state handling system
......@@ -7,7 +7,7 @@ using CryoGrid.Utils
using Base: @inbounds, @propagate_inbounds
using ConstructionBase
using DimensionalData: DimArray, Dim, dims, Z
using DimensionalData: DimArray, Dim, At, dims, Z
using IfElse
using Interpolations: Interpolations, Gridded, Linear, Flat, Line, interpolate, extrapolate
using IntervalSets
......
......@@ -127,7 +127,7 @@ function interpolateprofile!(profilearr::DimArray, state; interp=Linear(), extra
let (depths,names) = dims(profilearr),
z = ustrip.(depths);
for p in names
f = extrapolate(interpolate((z,), ustrip.(profilearr[:,p]), Gridded(interp)), extrap)
f = extrapolate(interpolate((z,), ustrip.(profilearr[:,At(p)]), Gridded(interp)), extrap)
state[p] .= f.(state.grids[p]) # assume length(grid) == length(state.p)
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment