diff --git a/ext/JLD2JUDIExt.jl b/ext/JLD2JUDIExt.jl index 71c9d7bc..d92f7c2f 100644 --- a/ext/JLD2JUDIExt.jl +++ b/ext/JLD2JUDIExt.jl @@ -10,7 +10,7 @@ JUDI.Geometry(x::JLD2.ReconstructedMutable{N, FN, NT}) where {N, FN, NT} = Geome function JUDI.tof32(x::JLD2.ReconstructedStatic{N, FN, NT}) where {N, FN, NT} # Drop "typed" signature reconstructT = Symbol(split(string(N), "{")[1]) - return JUDI.tof32(eval(reconstructT)([getproperty(x, f) for f in FN]...)) + return JUDI.tof32(getproperty(@__MODULE__, reconstructT)([getproperty(x, f) for f in FN]...)) end end \ No newline at end of file diff --git a/src/TimeModeling/LinearOperators/lazy.jl b/src/TimeModeling/LinearOperators/lazy.jl index 3b51c293..a586f259 100644 --- a/src/TimeModeling/LinearOperators/lazy.jl +++ b/src/TimeModeling/LinearOperators/lazy.jl @@ -215,4 +215,4 @@ _as_src(::judiNoopOperator, ::AbstractModel, q::judiMultiSourceVector) = q ############################################################################################################################ ###### Evaluate lazy operation -eval(rhs::judiRHS) = rhs.d +eval_lazy(rhs::judiRHS) = rhs.d diff --git a/src/TimeModeling/Modeling/python_interface.jl b/src/TimeModeling/Modeling/python_interface.jl index 4ee58928..d2031512 100644 --- a/src/TimeModeling/Modeling/python_interface.jl +++ b/src/TimeModeling/Modeling/python_interface.jl @@ -35,9 +35,10 @@ function wrapcall_weights(func, args...;kw...) return out end -function wrapcall_wf(func, args...;kw...) - rtype = _outtype(get(kw, :illum, nothing), 1, Array{Float32}) - out = rlock_pycall(func, rtype, args...;kw...) +function wrapcall_wf(func, modelPy, args...;kw...) + ndim = modelPy.dim + 1 # Add time dimension + rtype = _outtype(get(kw, :illum, nothing), 1, Array{Float32, ndim}) + out = rlock_pycall(func, rtype, modelPy, args...;kw...) return out end diff --git a/src/TimeModeling/Types/GeometryStructure.jl b/src/TimeModeling/Types/GeometryStructure.jl index e0eddafa..66180c81 100644 --- a/src/TimeModeling/Types/GeometryStructure.jl +++ b/src/TimeModeling/Types/GeometryStructure.jl @@ -39,9 +39,9 @@ function getproperty(G::Geometry, s::Symbol) end # Legacy dt/nt/t if s in [:dt, :t, :nt, :t0] - return eval(Symbol("get_$(s)"))(G) + return getproperty(@__MODULE__, Symbol("get_$(s)"))(G) end - + return getfield(G, s) end diff --git a/src/TimeModeling/Types/lazy_msv.jl b/src/TimeModeling/Types/lazy_msv.jl index 15e6882d..279be9a6 100644 --- a/src/TimeModeling/Types/lazy_msv.jl +++ b/src/TimeModeling/Types/lazy_msv.jl @@ -34,9 +34,9 @@ end getindex(la::LazyAdd{D}, i::RangeOrVec) where D = LazyAdd{D}(length(i), la.A[i], la.B[i], la.sign) -function eval(ls::LazyAdd{D}) where D - aloc = eval(ls.A) - bloc = eval(ls.B) +function eval_lazy(ls::LazyAdd{D}) where D + aloc = eval_lazy(ls.A) + bloc = eval_lazy(ls.B) ga = aloc.geometry gb = bloc.geometry @assert (ga.nt == gb.nt && ga.dt == gb.dt && ga.t == gb.t) @@ -49,7 +49,7 @@ function eval(ls::LazyAdd{D}) where D end function make_src(ls::LazyAdd{D}) where D - q = eval(ls) + q = eval_lazy(ls) return q.geometry[1], q.data[1] end