Skip to content
Snippets Groups Projects
Commit 23403276 authored by Lars Stietz's avatar Lars Stietz
Browse files

avoid division by zero in bathymetry

parent d9264706
No related branches found
No related tags found
No related merge requests found
...@@ -37,7 +37,7 @@ struct model ...@@ -37,7 +37,7 @@ struct model
end end
function bathymetry(x::Array{Float64,1}, μ::Float64, σ²::Float64=1., scale::Float64=0.2) function bathymetry(x::Array{Float64,1}, μ::Float64, σ²::Float64=1., scale::Float64=0.2)
return scale * exp.(-1/σ² .*(x .- μ).^2) return scale * exp.(-1/(σ²+1e-16) .*(x .- μ).^2)
end end
bathymetry(x::Array{Float64,1}, params::Array{Float64,1}) = length(params)>3 ? params : bathymetry(x, params...) bathymetry(x::Array{Float64,1}, params::Array{Float64,1}) = length(params)>3 ? params : bathymetry(x, params...)
......
title = "MH Bathymetry Reco setup"
[output]
save = true
path = "./data/results/experiment_"
[simulation]
xbounds = [0.0, 10.0]
nx = 64
g = 9.81
timestep = 0.001
kappa = 0.2
tend = 10
dealias = 1.5
[observation]
noise_var = 0.0
path = "./data/toy_measurement/simulation_data.h5"
[sampler]
stepsize = 0.1
likelihood_var = 0.01
n_samples = 1000
initial = [4.5, 0.5]
burnin = 0
File added
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