@@ -148,19 +152,21 @@ function sdm_statistics(fn; basedir=pwd(), Nopt=10, statfun=mdl, target=mean, sh
dz=metadata["dz"]
w0=metadata["w0"]
domain=Domain(dx[end],dy[end],dz,Nx,Ny,Nz)
T=eltype(dx)
domain=Domain{T}(dx[end],dy[end],dz,Nx,Ny,Nz)
# TODO: we have to optimize w0, but over how many iterations? Convergence analysis? Too many iterations seem to make the optimization quite challenging and might result in bad convergence