Manual outline
User guide
This document describes the Julia version of the code KronLinInv.
Kronecker-product-based linear inversion of geophysical (or other kinds of) data under Gaussian and separability assumptions. The code computes the posterior mean model and the posterior covariance matrix (or subsets of it) in an efficient manner (parallel algorithm) taking into account 3-D correlations both in the model parameters and in the observed data.
If you use this code for research or else, please cite the related paper:
Andrea Zunino, Klaus Mosegaard (2018), An efficient method to solve large linearizable inverse problems under Gaussian and separability assumptions, Computers & Geosciences. ISSN 0098-3004, https://doi.org/10.1016/j.cageo.2018.09.005.
See the above mentioned paper for a detailed description.
Installation
To install the package simple enter into the package manager mode in Julia by typing "]
" at the REPL prompt and then use add
, i.e.,
(v1.2) pkg> add KronLinInv
The package will be automatically downloaded from the web and installed.
Theoretical background
KronLinInv solves the linear inverse problem with Gaussian uncertainties represented by the following objective function
under the following separability conditions (for a 3-way decomposition):
From the above, the posterior covariance matrix is given by
and the center of posterior gaussian is
KronLinInv solves the inverse problem in an efficient manner, with a very low memory imprint, suitable for large problems where many model parameters and observations are involved.
The paper describes how to obtain the solution to the above problem as shown hereafter. First the following matrices are computed
The posterior covariance is then expressed as
and the posterior mean model as
These last two formulae are those used by the KronLinInv algorithm.
Several function are exported by the module KronLinInv:
calcfactors()
: Computes the factors necessary to solve the inverse problemposteriormean()
: Computes the posterior mean model using the previously computed "factors" withcalcfactors()
.blockpostcov()
: Computes a block (or all) of the posterior covariance using the previously computed "factors" withcalcfactors()
.bandpostcov()
: NOT YET IMPLEMENTED! Computes a band of the posterior covariance the previously computed "factors" withcalcfactors()
.
Usage examples
The input needed is represented by the set of three covariance matrices of the model parameters, the three covariances of the observed data, the three forward model operators, the observed data (a vector) and the prior model (a vector). _The first thing to compute is always the set of "factors" using the function calcfactors()
. Finally, the posterior mean (see posteriormean()
) and/or covariance (or part of it) can be computed (see blockpostcov()
).
2D example
An example of how to use the code for 2D problems is shown in the following. Notice that the code is written for a 3D problem, however, by setting some of the matrices as identity matrices with size of 1$\times$1, a 2D problem can be solved without much overhead.
Creating a test problem
First, we create some input data to simulate a real problem.
# set the sizes of the problem
nx = 1
ny = 20
nz = 30
nxobs = 1
nyobs = 18
nzobs = 24
We then construct some covariance matrices and a forward operator. The "first" covariance matrices for model parameters ($\mathbf{C}_{\rm{M}}^{\rm{x}} \, , \mathbf{C}_{\rm{M}}^{\rm{y}} \, , \mathbf{C}_{\rm{M}}^{\rm{z}}$) and observed data ($\mathbf{C}_{\rm{D}}^{\rm{x}} \, , \mathbf{C}_{\rm{D}}^{\rm{y}} \, , \mathbf{C}_{\rm{D}}^{\rm{z}}$) are simply an identity matrix of shape 1$\times$1, since it is a 2D problem. The forward relation (forward model) is created from three operators ($\mathbf{G}^{\rm{x}} \, , \mathbf{G}^{\rm{y}} \, , \mathbf{G}^{\rm{z}}$). Remark: the function mkCovSTAT
used in the following example is not part of KronLinInv.
function mkCovSTAT(sigma::Array{Float64,1},nx::Integer,ny::Integer,nz::Integer,
corrlength::Array{Float64,1},kind::String)
function cgaussian(dist,corrlength)
if maximum(dist)==0.0
return 1.0
else
@assert(corrlength>0.0)
return exp.(-(dist./corrlength).^2)
end
end
function cexponential(dist,corrlength)
if maximum(dist)==0.0
return 1.0
else
@assert(corrlength>0.0)
return exp.(-(dist./corrlength))
end
end
npts = nx*ny*nz
x = [float(i) for i=1:nx]
y = [float(i) for i=1:ny]
z = [float(i) for i=1:nz]
covmat_x = zeros(nx,nx)
covmat_y = zeros(ny,ny)
covmat_z = zeros(nz,nz)
if kind=="gaussian"
calccovfun = cgaussian
elseif kind=="exponential"
calccovfun = cexponential
else
println("Error, no or wrong cov 'kind' specified")
exit()
end
for i=1:nx
covmat_x[i,:] .= sigma[1]^2 .*
calccovfun(sqrt.((x.-x[i]).^2),corrlength[1])
end
for i=1:ny
covmat_y[i,:] .= sigma[2]^2 .*
calccovfun(sqrt.(((y.-y[i])).^2),corrlength[2])
end
for i=1:nz
covmat_z[i,:] .= sigma[3]^2 .*
calccovfun(sqrt.(((z.-z[i])).^2),corrlength[3])
end
return covmat_x,covmat_y,covmat_z
end
# standard deviations
sigmaobs = [1.0, 0.1, 0.1] # notice the 1.0 as first element (2D problem)
sigmam = [1.0, 0.8, 0.8] # notice the 1.0 as first element (2D problem)
# correlation lengths
corlenobs = [0.0, 1.4, 1.4] # notice the 0.0 as first element (2D problem)
corlenm = [0.0, 2.5, 2.5] # notice the 0.0 as first element (2D problem)
# create the covariance matrices on observed data
Cd1,Cd2,Cd3 = mkCovSTAT(sigmaobs,nxobs,nyobs,nzobs,corlenobs,"gaussian")
# create the covariance matrices on model parameters
Cm1,Cm2,Cm3 = mkCovSTAT(sigmam,nx,ny,nz,corlenm,"gaussian")
# forward model operator
G1 = rand(nxobs,nx) # notice that nx=1 and nxobs=1 (2D problem)
G2 = rand(nyobs,ny)
G3 = rand(nzobs,nz)
Finally, a "true/reference" model, in order to compute some synthetic "observed" data and a prior model.
# create a reference model
refmod = rand(nx*ny*nz)
# create a prior model
mprior = copy(refmod) .+ 0.3*randn(length(refmod))
# create some "observed" data
dobs = kron(G1,kron(G2,G3)) * refmod
# add some noise to make it more realistic
dobs = dobs .+ 0.02.*randn(length(dobs))
Now we have create a synthetic example to play with, which we can solve as shown in the following.
Solving the 2D problem
In order to solve the inverse problem using KronLinInv, we first need to compute the "factors" using the function calcfactors()
, which takes as inputs two struct
s containing the covariance matrices and the forward operators.
using KronLinInv
# create the covariance matrix structure
Covs = CovMats(Cd1,Cd2,Cd3,Cm1,Cm2,Cm3)
# forward model operator
Gfwd = FwdOps(G1,G2,G3)
# calculate the required factors
klifac = calcfactors(Gfwd,Covs)
Now the inverse problem can be solved. We first compute the posterior mean and then a subset of the posterior covariance.
# calculate the posterior mean model
postm = posteriormean(klifac,Gfwd,mprior,dobs)
# calculate the posterior covariance
npts = nx*ny*nz
astart, aend = 1,div(npts,3) # set of rows to be computed
bstart, bend = 1,div(npts,3) # set of columns to be computed
# compute the block of posterior covariance
postC = blockpostcov(klifac,astart,aend,bstart,bend)
posteriormean(): Parallel run using 1 workers
posteriormean(): loop 1/3, 0.0%; ETA: Inf min
posteriormean(): loop 1/3, 0.926%; ETA: 0.0 min
posteriormean(): loop 1/3, 1.157%; ETA: 0.0 min
posteriormean(): loop 1/3, 1.852%; ETA: 0.0 min
posteriormean(): loop 1/3, 2.778%; ETA: 0.0 min
posteriormean(): loop 1/3, 3.704%; ETA: 0.0 min
posteriormean(): loop 1/3, 4.63%; ETA: 0.0 min
posteriormean(): loop 1/3, 5.556%; ETA: 0.0 min
posteriormean(): loop 1/3, 6.481%; ETA: 0.0 min
posteriormean(): loop 1/3, 7.407%; ETA: 0.0 min
posteriormean(): loop 1/3, 8.333%; ETA: 0.0 min
posteriormean(): loop 1/3, 9.259%; ETA: 0.0 min
posteriormean(): loop 1/3, 10.185%; ETA: 0.0 min
posteriormean(): loop 1/3, 11.111%; ETA: 0.0 min
posteriormean(): loop 1/3, 12.037%; ETA: 0.0 min
posteriormean(): loop 1/3, 12.963%; ETA: 0.0 min
posteriormean(): loop 1/3, 13.889%; ETA: 0.0 min
posteriormean(): loop 1/3, 14.815%; ETA: 0.0 min
posteriormean(): loop 1/3, 15.741%; ETA: 0.0 min
posteriormean(): loop 1/3, 16.667%; ETA: 0.0 min
posteriormean(): loop 1/3, 17.593%; ETA: 0.0 min
posteriormean(): loop 1/3, 18.519%; ETA: 0.0 min
posteriormean(): loop 1/3, 19.444%; ETA: 0.0 min
posteriormean(): loop 1/3, 20.37%; ETA: 0.0 min
posteriormean(): loop 1/3, 21.296%; ETA: 0.0 min
posteriormean(): loop 1/3, 22.222%; ETA: 0.0 min
posteriormean(): loop 1/3, 23.148%; ETA: 0.0 min
posteriormean(): loop 1/3, 24.074%; ETA: 0.0 min
posteriormean(): loop 1/3, 25.0%; ETA: 0.0 min
posteriormean(): loop 1/3, 25.926%; ETA: 0.0 min
posteriormean(): loop 1/3, 26.852%; ETA: 0.0 min
posteriormean(): loop 1/3, 27.778%; ETA: 0.0 min
posteriormean(): loop 1/3, 28.704%; ETA: 0.0 min
posteriormean(): loop 1/3, 29.63%; ETA: 0.0 min
posteriormean(): loop 1/3, 30.556%; ETA: 0.0 min
posteriormean(): loop 1/3, 31.481%; ETA: 0.0 min
posteriormean(): loop 1/3, 32.407%; ETA: 0.0 min
posteriormean(): loop 1/3, 33.333%; ETA: 0.0 min
posteriormean(): loop 1/3, 34.259%; ETA: 0.0 min
posteriormean(): loop 1/3, 35.185%; ETA: 0.0 min
posteriormean(): loop 1/3, 36.111%; ETA: 0.0 min
posteriormean(): loop 1/3, 37.037%; ETA: 0.0 min
posteriormean(): loop 1/3, 37.963%; ETA: 0.0 min
posteriormean(): loop 1/3, 38.889%; ETA: 0.0 min
posteriormean(): loop 1/3, 39.815%; ETA: 0.0 min
posteriormean(): loop 1/3, 40.741%; ETA: 0.0 min
posteriormean(): loop 1/3, 41.667%; ETA: 0.0 min
posteriormean(): loop 1/3, 42.593%; ETA: 0.0 min
posteriormean(): loop 1/3, 43.519%; ETA: 0.0 min
posteriormean(): loop 1/3, 44.444%; ETA: 0.0 min
posteriormean(): loop 1/3, 45.37%; ETA: 0.0 min
posteriormean(): loop 1/3, 46.296%; ETA: 0.0 min
posteriormean(): loop 1/3, 47.222%; ETA: 0.0 min
posteriormean(): loop 1/3, 48.148%; ETA: 0.0 min
posteriormean(): loop 1/3, 49.074%; ETA: 0.0 min
posteriormean(): loop 1/3, 50.0%; ETA: 0.0 min
posteriormean(): loop 1/3, 50.926%; ETA: 0.0 min
posteriormean(): loop 1/3, 51.852%; ETA: 0.0 min
posteriormean(): loop 1/3, 52.778%; ETA: 0.0 min
posteriormean(): loop 1/3, 53.704%; ETA: 0.0 min
posteriormean(): loop 1/3, 54.63%; ETA: 0.0 min
posteriormean(): loop 1/3, 55.556%; ETA: 0.0 min
posteriormean(): loop 1/3, 56.481%; ETA: 0.0 min
posteriormean(): loop 1/3, 57.407%; ETA: 0.0 min
posteriormean(): loop 1/3, 58.333%; ETA: 0.0 min
posteriormean(): loop 1/3, 59.259%; ETA: 0.0 min
posteriormean(): loop 1/3, 60.185%; ETA: 0.0 min
posteriormean(): loop 1/3, 61.111%; ETA: 0.0 min
posteriormean(): loop 1/3, 62.037%; ETA: 0.0 min
posteriormean(): loop 1/3, 62.963%; ETA: 0.0 min
posteriormean(): loop 1/3, 63.889%; ETA: 0.0 min
posteriormean(): loop 1/3, 64.815%; ETA: 0.0 min
posteriormean(): loop 1/3, 65.741%; ETA: 0.0 min
posteriormean(): loop 1/3, 66.667%; ETA: 0.0 min
posteriormean(): loop 1/3, 67.593%; ETA: 0.0 min
posteriormean(): loop 1/3, 68.519%; ETA: 0.0 min
posteriormean(): loop 1/3, 69.444%; ETA: 0.0 min
posteriormean(): loop 1/3, 70.37%; ETA: 0.0 min
posteriormean(): loop 1/3, 71.296%; ETA: 0.0 min
posteriormean(): loop 1/3, 72.222%; ETA: 0.0 min
posteriormean(): loop 1/3, 73.148%; ETA: 0.0 min
posteriormean(): loop 1/3, 74.074%; ETA: 0.0 min
posteriormean(): loop 1/3, 75.0%; ETA: 0.0 min
posteriormean(): loop 1/3, 75.926%; ETA: 0.0 min
posteriormean(): loop 1/3, 76.852%; ETA: 0.0 min
posteriormean(): loop 1/3, 77.778%; ETA: 0.0 min
posteriormean(): loop 1/3, 78.704%; ETA: 0.0 min
posteriormean(): loop 1/3, 79.63%; ETA: 0.0 min
posteriormean(): loop 1/3, 80.556%; ETA: 0.0 min
posteriormean(): loop 1/3, 81.481%; ETA: 0.0 min
posteriormean(): loop 1/3, 82.407%; ETA: 0.0 min
posteriormean(): loop 1/3, 83.333%; ETA: 0.0 min
posteriormean(): loop 1/3, 84.259%; ETA: 0.0 min
posteriormean(): loop 1/3, 85.185%; ETA: 0.0 min
posteriormean(): loop 1/3, 86.111%; ETA: 0.0 min
posteriormean(): loop 1/3, 87.037%; ETA: 0.0 min
posteriormean(): loop 1/3, 87.963%; ETA: 0.0 min
posteriormean(): loop 1/3, 88.889%; ETA: 0.0 min
posteriormean(): loop 1/3, 89.815%; ETA: 0.0 min
posteriormean(): loop 1/3, 90.741%; ETA: 0.0 min
posteriormean(): loop 1/3, 91.667%; ETA: 0.0 min
posteriormean(): loop 1/3, 92.593%; ETA: 0.0 min
posteriormean(): loop 1/3, 93.519%; ETA: 0.0 min
posteriormean(): loop 1/3, 94.444%; ETA: 0.0 min
posteriormean(): loop 1/3, 95.37%; ETA: 0.0 min
posteriormean(): loop 1/3, 96.296%; ETA: 0.0 min
posteriormean(): loop 1/3, 97.222%; ETA: 0.0 min
posteriormean(): loop 1/3, 98.148%; ETA: 0.0 min
posteriormean(): loop 1/3, 99.074%; ETA: 0.0 min
posteriormean(): loop 1/3, 100.0%; ETA: 0.0 min
posteriormean(): loop 2/3, 0.0 %; ETA: Inf min
posteriormean(): loop 2/3, 0.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 0.833 %; ETA: 0.0 min
posteriormean(): loop 2/3, 1.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 2.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 2.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 3.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 4.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 4.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 5.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 6.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 6.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 7.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 8.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 8.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 9.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 10.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 10.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 11.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 12.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 12.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 13.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 14.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 14.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 15.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 16.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 16.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 17.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 18.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 18.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 19.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 20.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 20.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 21.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 22.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 22.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 23.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 24.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 24.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 25.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 26.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 26.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 27.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 28.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 28.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 29.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 30.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 30.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 31.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 32.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 32.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 33.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 34.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 34.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 35.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 36.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 36.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 37.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 38.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 38.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 39.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 40.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 40.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 41.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 42.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 42.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 43.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 44.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 44.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 45.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 46.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 46.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 47.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 48.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 48.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 49.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 50.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 50.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 51.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 52.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 52.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 53.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 54.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 54.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 55.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 56.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 56.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 57.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 58.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 58.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 59.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 60.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 60.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 61.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 62.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 62.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 63.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 64.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 64.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 65.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 66.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 66.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 67.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 68.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 68.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 69.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 70.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 70.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 71.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 72.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 72.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 73.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 74.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 74.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 75.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 76.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 76.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 77.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 78.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 78.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 79.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 80.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 80.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 81.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 82.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 82.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 83.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 84.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 84.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 85.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 86.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 86.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 87.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 88.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 88.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 89.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 90.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 90.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 91.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 92.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 92.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 93.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 94.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 94.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 95.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 96.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 96.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 97.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 98.0 %; ETA: 0.0 min
posteriormean(): loop 2/3, 98.667 %; ETA: 0.0 min
posteriormean(): loop 2/3, 99.333 %; ETA: 0.0 min
posteriormean(): loop 2/3, 100.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 0.0 %; ETA: Inf min
posteriormean(): loop 3/3, 0.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 0.833 %; ETA: 0.0 min
posteriormean(): loop 3/3, 1.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 2.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 2.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 3.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 4.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 4.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 5.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 6.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 6.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 7.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 8.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 8.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 9.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 10.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 10.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 11.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 12.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 12.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 13.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 14.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 14.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 15.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 16.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 16.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 17.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 18.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 18.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 19.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 20.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 20.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 21.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 22.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 22.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 23.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 24.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 24.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 25.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 26.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 26.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 27.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 28.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 28.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 29.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 30.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 30.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 31.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 32.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 32.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 33.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 34.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 34.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 35.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 36.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 36.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 37.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 38.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 38.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 39.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 40.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 40.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 41.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 42.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 42.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 43.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 44.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 44.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 45.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 46.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 46.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 47.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 48.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 48.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 49.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 50.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 50.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 51.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 52.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 52.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 53.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 54.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 54.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 55.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 56.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 56.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 57.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 58.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 58.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 59.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 60.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 60.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 61.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 62.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 62.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 63.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 64.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 64.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 65.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 66.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 66.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 67.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 68.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 68.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 69.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 70.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 70.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 71.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 72.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 72.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 73.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 74.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 74.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 75.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 76.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 76.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 77.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 78.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 78.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 79.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 80.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 80.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 81.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 82.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 82.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 83.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 84.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 84.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 85.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 86.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 86.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 87.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 88.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 88.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 89.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 90.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 90.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 91.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 92.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 92.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 93.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 94.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 94.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 95.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 96.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 96.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 97.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 98.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 98.667 %; ETA: 0.0 min
posteriormean(): loop 3/3, 99.333 %; ETA: 0.0 min
posteriormean(): loop 3/3, 100.0 %; ETA: 0.0 min
blockpostcov(): Parallel run using 1 workers
blockpostcov(): 0.0 %; ETA: Inf min
blockpostcov(): 2.5 %; ETA: 0.001 min
blockpostcov(): 50.0 %; ETA: 0.0 min
blockpostcov(): 100.0 %; ETA: 0.0 min
3D example
An example of how to use the code for 3D problems is shown in the following. It follows closely the 3D example.
Creating a test problem
First, we create some input data to simulate a real problem.
# set the sizes of the problem
nx = 7
ny = 9
nz = 7
nxobs = 6
nyobs = 8
nzobs = 9
We then construct some covariance matrices for model parameters ($\mathbf{C}_{\rm{M}}^{\rm{x}} \, , \mathbf{C}_{\rm{M}}^{\rm{y}} \, , \mathbf{C}_{\rm{M}}^{\rm{z}}$) and observed data ($\mathbf{C}_{\rm{D}}^{\rm{x}} \, , \mathbf{C}_{\rm{D}}^{\rm{y}} \, , \mathbf{C}_{\rm{D}}^{\rm{z}}$). The forward relation (forward model) is created from three operators ($\mathbf{G}^{\rm{x}} \, , \mathbf{G}^{\rm{y}} \, , \mathbf{G}^{\rm{z}}$). Remark: the function mkCovSTAT
used in the following example is not part of KronLinInv.
function mkCovSTAT(sigma::Array{Float64,1},nx::Integer,ny::Integer,nz::Integer,
corrlength::Array{Float64,1},kind::String)
function cgaussian(dist,corrlength)
if maximum(dist)==0.0
return 1.0
else
@assert(corrlength>0.0)
return exp.(-(dist./corrlength).^2)
end
end
function cexponential(dist,corrlength)
if maximum(dist)==0.0
return 1.0
else
@assert(corrlength>0.0)
return exp.(-(dist./corrlength))
end
end
npts = nx*ny*nz
x = [float(i) for i=1:nx]
y = [float(i) for i=1:ny]
z = [float(i) for i=1:nz]
covmat_x = zeros(nx,nx)
covmat_y = zeros(ny,ny)
covmat_z = zeros(nz,nz)
if kind=="gaussian"
calccovfun = cgaussian
elseif kind=="exponential"
calccovfun = cexponential
else
println("Error, no or wrong cov 'kind' specified")
exit()
end
for i=1:nx
covmat_x[i,:] .= sigma[1]^2 .*
calccovfun(sqrt.((x.-x[i]).^2),corrlength[1])
end
for i=1:ny
covmat_y[i,:] .= sigma[2]^2 .*
calccovfun(sqrt.(((y.-y[i])).^2),corrlength[2])
end
for i=1:nz
covmat_z[i,:] .= sigma[3]^2 .*
calccovfun(sqrt.(((z.-z[i])).^2),corrlength[3])
end
return covmat_x,covmat_y,covmat_z
end
# standard deviations
sigmaobs = [0.1, 0.1, 0.1]
sigmam = [0.7, 0.8, 0.8]
# correlation lengths
corlenobs = [1.3, 1.4, 1.4]
corlenm = [2.5, 2.5, 2.5]
# create the covariance matrices on observed data
Cd1,Cd2,Cd3 = mkCovSTAT(sigmaobs,nxobs,nyobs,nzobs,corlenobs,"gaussian")
# create the covariance matrices on model parameters
Cm1,Cm2,Cm3 = mkCovSTAT(sigmam,nx,ny,nz,corlenm,"gaussian")
# Forward model operator
G1 = rand(nxobs,nx)
G2 = rand(nyobs,ny)
G3 = rand(nzobs,nz)
Finally, a "true/reference" model, in order to compute some synthetic "observed" data and a prior model.
# create a reference model
refmod = rand(nx*ny*nz)
# create a prior model
mprior = copy(refmod) .+ 0.3.*randn(length(refmod))
# create some "observed" data
dobs = kron(G1,kron(G2,G3)) * refmod
# add some noise to make it more realistic
dobs = dobs .+ 0.02.*randn(length(dobs))
Now we have create a synthetic example to play with, which we can solve as shown in the following.
Solving the 3D problem
In order to solve the inverse problem using KronLinInv, we first need to compute the "factors" using the function calcfactors()
, which takes as inputs two struct
s containing the covariance matrices and the forward operators.
using KronLinInv
# create the covariance matrix structure
Covs = CovMats(Cd1,Cd2,Cd3,Cm1,Cm2,Cm3)
# forward model operator
Gfwd = FwdOps(G1,G2,G3)
# Calculate the required factors
klifac = calcfactors(Gfwd,Covs)
Now the inverse problem can be solved. We first compute the posterior mean and then a subset of the posterior covariance.
# Calculate the posterior mean model
postm = posteriormean(klifac,Gfwd,mprior,dobs)
# Calculate the posterior covariance
npts = nx*ny*nz
astart, aend = 1,div(npts,3) # set of rows to be computed
bstart, bend = 1,div(npts,3) # set of columns to be computed
# compute the block of posterior covariance
postC = blockpostcov(klifac,astart,aend,bstart,bend)
posteriormean(): Parallel run using 1 workers
posteriormean(): loop 1/3, 0.0%; ETA: Inf min
posteriormean(): loop 1/3, 0.926%; ETA: 0.0 min
posteriormean(): loop 1/3, 1.157%; ETA: 0.0 min
posteriormean(): loop 1/3, 1.852%; ETA: 0.0 min
posteriormean(): loop 1/3, 2.778%; ETA: 0.0 min
posteriormean(): loop 1/3, 3.704%; ETA: 0.0 min
posteriormean(): loop 1/3, 4.63%; ETA: 0.0 min
posteriormean(): loop 1/3, 5.556%; ETA: 0.0 min
posteriormean(): loop 1/3, 6.481%; ETA: 0.0 min
posteriormean(): loop 1/3, 7.407%; ETA: 0.0 min
posteriormean(): loop 1/3, 8.333%; ETA: 0.0 min
posteriormean(): loop 1/3, 9.259%; ETA: 0.0 min
posteriormean(): loop 1/3, 10.185%; ETA: 0.0 min
posteriormean(): loop 1/3, 11.111%; ETA: 0.0 min
posteriormean(): loop 1/3, 12.037%; ETA: 0.0 min
posteriormean(): loop 1/3, 12.963%; ETA: 0.0 min
posteriormean(): loop 1/3, 13.889%; ETA: 0.0 min
posteriormean(): loop 1/3, 14.815%; ETA: 0.0 min
posteriormean(): loop 1/3, 15.741%; ETA: 0.0 min
posteriormean(): loop 1/3, 16.667%; ETA: 0.0 min
posteriormean(): loop 1/3, 17.593%; ETA: 0.0 min
posteriormean(): loop 1/3, 18.519%; ETA: 0.0 min
posteriormean(): loop 1/3, 19.444%; ETA: 0.0 min
posteriormean(): loop 1/3, 20.37%; ETA: 0.0 min
posteriormean(): loop 1/3, 21.296%; ETA: 0.0 min
posteriormean(): loop 1/3, 22.222%; ETA: 0.0 min
posteriormean(): loop 1/3, 23.148%; ETA: 0.0 min
posteriormean(): loop 1/3, 24.074%; ETA: 0.0 min
posteriormean(): loop 1/3, 25.0%; ETA: 0.0 min
posteriormean(): loop 1/3, 25.926%; ETA: 0.0 min
posteriormean(): loop 1/3, 26.852%; ETA: 0.0 min
posteriormean(): loop 1/3, 27.778%; ETA: 0.0 min
posteriormean(): loop 1/3, 28.704%; ETA: 0.0 min
posteriormean(): loop 1/3, 29.63%; ETA: 0.0 min
posteriormean(): loop 1/3, 30.556%; ETA: 0.0 min
posteriormean(): loop 1/3, 31.481%; ETA: 0.0 min
posteriormean(): loop 1/3, 32.407%; ETA: 0.0 min
posteriormean(): loop 1/3, 33.333%; ETA: 0.0 min
posteriormean(): loop 1/3, 34.259%; ETA: 0.0 min
posteriormean(): loop 1/3, 35.185%; ETA: 0.0 min
posteriormean(): loop 1/3, 36.111%; ETA: 0.0 min
posteriormean(): loop 1/3, 37.037%; ETA: 0.0 min
posteriormean(): loop 1/3, 37.963%; ETA: 0.0 min
posteriormean(): loop 1/3, 38.889%; ETA: 0.0 min
posteriormean(): loop 1/3, 39.815%; ETA: 0.0 min
posteriormean(): loop 1/3, 40.741%; ETA: 0.0 min
posteriormean(): loop 1/3, 41.667%; ETA: 0.0 min
posteriormean(): loop 1/3, 42.593%; ETA: 0.0 min
posteriormean(): loop 1/3, 43.519%; ETA: 0.0 min
posteriormean(): loop 1/3, 44.444%; ETA: 0.0 min
posteriormean(): loop 1/3, 45.37%; ETA: 0.0 min
posteriormean(): loop 1/3, 46.296%; ETA: 0.0 min
posteriormean(): loop 1/3, 47.222%; ETA: 0.0 min
posteriormean(): loop 1/3, 48.148%; ETA: 0.0 min
posteriormean(): loop 1/3, 49.074%; ETA: 0.0 min
posteriormean(): loop 1/3, 50.0%; ETA: 0.0 min
posteriormean(): loop 1/3, 50.926%; ETA: 0.0 min
posteriormean(): loop 1/3, 51.852%; ETA: 0.0 min
posteriormean(): loop 1/3, 52.778%; ETA: 0.0 min
posteriormean(): loop 1/3, 53.704%; ETA: 0.0 min
posteriormean(): loop 1/3, 54.63%; ETA: 0.0 min
posteriormean(): loop 1/3, 55.556%; ETA: 0.0 min
posteriormean(): loop 1/3, 56.481%; ETA: 0.0 min
posteriormean(): loop 1/3, 57.407%; ETA: 0.0 min
posteriormean(): loop 1/3, 58.333%; ETA: 0.0 min
posteriormean(): loop 1/3, 59.259%; ETA: 0.0 min
posteriormean(): loop 1/3, 60.185%; ETA: 0.0 min
posteriormean(): loop 1/3, 61.111%; ETA: 0.0 min
posteriormean(): loop 1/3, 62.037%; ETA: 0.0 min
posteriormean(): loop 1/3, 62.963%; ETA: 0.0 min
posteriormean(): loop 1/3, 63.889%; ETA: 0.0 min
posteriormean(): loop 1/3, 64.815%; ETA: 0.0 min
posteriormean(): loop 1/3, 65.741%; ETA: 0.0 min
posteriormean(): loop 1/3, 66.667%; ETA: 0.0 min
posteriormean(): loop 1/3, 67.593%; ETA: 0.0 min
posteriormean(): loop 1/3, 68.519%; ETA: 0.0 min
posteriormean(): loop 1/3, 69.444%; ETA: 0.0 min
posteriormean(): loop 1/3, 70.37%; ETA: 0.0 min
posteriormean(): loop 1/3, 71.296%; ETA: 0.0 min
posteriormean(): loop 1/3, 72.222%; ETA: 0.0 min
posteriormean(): loop 1/3, 73.148%; ETA: 0.0 min
posteriormean(): loop 1/3, 74.074%; ETA: 0.0 min
posteriormean(): loop 1/3, 75.0%; ETA: 0.0 min
posteriormean(): loop 1/3, 75.926%; ETA: 0.0 min
posteriormean(): loop 1/3, 76.852%; ETA: 0.0 min
posteriormean(): loop 1/3, 77.778%; ETA: 0.0 min
posteriormean(): loop 1/3, 78.704%; ETA: 0.0 min
posteriormean(): loop 1/3, 79.63%; ETA: 0.0 min
posteriormean(): loop 1/3, 80.556%; ETA: 0.0 min
posteriormean(): loop 1/3, 81.481%; ETA: 0.0 min
posteriormean(): loop 1/3, 82.407%; ETA: 0.0 min
posteriormean(): loop 1/3, 83.333%; ETA: 0.0 min
posteriormean(): loop 1/3, 84.259%; ETA: 0.0 min
posteriormean(): loop 1/3, 85.185%; ETA: 0.0 min
posteriormean(): loop 1/3, 86.111%; ETA: 0.0 min
posteriormean(): loop 1/3, 87.037%; ETA: 0.0 min
posteriormean(): loop 1/3, 87.963%; ETA: 0.0 min
posteriormean(): loop 1/3, 88.889%; ETA: 0.0 min
posteriormean(): loop 1/3, 89.815%; ETA: 0.0 min
posteriormean(): loop 1/3, 90.741%; ETA: 0.0 min
posteriormean(): loop 1/3, 91.667%; ETA: 0.0 min
posteriormean(): loop 1/3, 92.593%; ETA: 0.0 min
posteriormean(): loop 1/3, 93.519%; ETA: 0.0 min
posteriormean(): loop 1/3, 94.444%; ETA: 0.0 min
posteriormean(): loop 1/3, 95.37%; ETA: 0.0 min
posteriormean(): loop 1/3, 96.296%; ETA: 0.0 min
posteriormean(): loop 1/3, 97.222%; ETA: 0.0 min
posteriormean(): loop 1/3, 98.148%; ETA: 0.0 min
posteriormean(): loop 1/3, 99.074%; ETA: 0.0 min
posteriormean(): loop 1/3, 100.0%; ETA: 0.0 min
posteriormean(): loop 2/3, 0.0 %; ETA: Inf min
posteriormean(): loop 2/3, 0.907 %; ETA: 0.0 min
posteriormean(): loop 2/3, 1.134 %; ETA: 0.0 min
posteriormean(): loop 2/3, 1.814 %; ETA: 0.0 min
posteriormean(): loop 2/3, 2.721 %; ETA: 0.0 min
posteriormean(): loop 2/3, 3.628 %; ETA: 0.0 min
posteriormean(): loop 2/3, 4.535 %; ETA: 0.0 min
posteriormean(): loop 2/3, 5.442 %; ETA: 0.0 min
posteriormean(): loop 2/3, 6.349 %; ETA: 0.0 min
posteriormean(): loop 2/3, 7.256 %; ETA: 0.0 min
posteriormean(): loop 2/3, 8.163 %; ETA: 0.0 min
posteriormean(): loop 2/3, 9.07 %; ETA: 0.0 min
posteriormean(): loop 2/3, 9.977 %; ETA: 0.0 min
posteriormean(): loop 2/3, 10.884 %; ETA: 0.0 min
posteriormean(): loop 2/3, 11.791 %; ETA: 0.0 min
posteriormean(): loop 2/3, 12.698 %; ETA: 0.0 min
posteriormean(): loop 2/3, 13.605 %; ETA: 0.0 min
posteriormean(): loop 2/3, 14.512 %; ETA: 0.0 min
posteriormean(): loop 2/3, 15.42 %; ETA: 0.0 min
posteriormean(): loop 2/3, 16.327 %; ETA: 0.0 min
posteriormean(): loop 2/3, 17.234 %; ETA: 0.0 min
posteriormean(): loop 2/3, 18.141 %; ETA: 0.0 min
posteriormean(): loop 2/3, 19.048 %; ETA: 0.0 min
posteriormean(): loop 2/3, 19.955 %; ETA: 0.0 min
posteriormean(): loop 2/3, 20.862 %; ETA: 0.0 min
posteriormean(): loop 2/3, 21.769 %; ETA: 0.0 min
posteriormean(): loop 2/3, 22.676 %; ETA: 0.0 min
posteriormean(): loop 2/3, 23.583 %; ETA: 0.0 min
posteriormean(): loop 2/3, 24.49 %; ETA: 0.0 min
posteriormean(): loop 2/3, 25.397 %; ETA: 0.0 min
posteriormean(): loop 2/3, 26.304 %; ETA: 0.0 min
posteriormean(): loop 2/3, 27.211 %; ETA: 0.0 min
posteriormean(): loop 2/3, 28.118 %; ETA: 0.0 min
posteriormean(): loop 2/3, 29.025 %; ETA: 0.0 min
posteriormean(): loop 2/3, 29.932 %; ETA: 0.0 min
posteriormean(): loop 2/3, 30.839 %; ETA: 0.0 min
posteriormean(): loop 2/3, 31.746 %; ETA: 0.0 min
posteriormean(): loop 2/3, 32.653 %; ETA: 0.0 min
posteriormean(): loop 2/3, 33.56 %; ETA: 0.0 min
posteriormean(): loop 2/3, 34.467 %; ETA: 0.0 min
posteriormean(): loop 2/3, 35.374 %; ETA: 0.0 min
posteriormean(): loop 2/3, 36.281 %; ETA: 0.0 min
posteriormean(): loop 2/3, 37.188 %; ETA: 0.0 min
posteriormean(): loop 2/3, 38.095 %; ETA: 0.0 min
posteriormean(): loop 2/3, 39.002 %; ETA: 0.0 min
posteriormean(): loop 2/3, 39.909 %; ETA: 0.0 min
posteriormean(): loop 2/3, 40.816 %; ETA: 0.0 min
posteriormean(): loop 2/3, 41.723 %; ETA: 0.0 min
posteriormean(): loop 2/3, 42.63 %; ETA: 0.0 min
posteriormean(): loop 2/3, 43.537 %; ETA: 0.0 min
posteriormean(): loop 2/3, 44.444 %; ETA: 0.0 min
posteriormean(): loop 2/3, 45.351 %; ETA: 0.0 min
posteriormean(): loop 2/3, 46.259 %; ETA: 0.0 min
posteriormean(): loop 2/3, 47.166 %; ETA: 0.0 min
posteriormean(): loop 2/3, 48.073 %; ETA: 0.0 min
posteriormean(): loop 2/3, 48.98 %; ETA: 0.0 min
posteriormean(): loop 2/3, 49.887 %; ETA: 0.0 min
posteriormean(): loop 2/3, 50.794 %; ETA: 0.0 min
posteriormean(): loop 2/3, 51.701 %; ETA: 0.0 min
posteriormean(): loop 2/3, 52.608 %; ETA: 0.0 min
posteriormean(): loop 2/3, 53.515 %; ETA: 0.0 min
posteriormean(): loop 2/3, 54.422 %; ETA: 0.0 min
posteriormean(): loop 2/3, 55.329 %; ETA: 0.0 min
posteriormean(): loop 2/3, 56.236 %; ETA: 0.0 min
posteriormean(): loop 2/3, 57.143 %; ETA: 0.0 min
posteriormean(): loop 2/3, 58.05 %; ETA: 0.0 min
posteriormean(): loop 2/3, 58.957 %; ETA: 0.0 min
posteriormean(): loop 2/3, 59.864 %; ETA: 0.0 min
posteriormean(): loop 2/3, 60.771 %; ETA: 0.0 min
posteriormean(): loop 2/3, 61.678 %; ETA: 0.0 min
posteriormean(): loop 2/3, 62.585 %; ETA: 0.0 min
posteriormean(): loop 2/3, 63.492 %; ETA: 0.0 min
posteriormean(): loop 2/3, 64.399 %; ETA: 0.0 min
posteriormean(): loop 2/3, 65.306 %; ETA: 0.0 min
posteriormean(): loop 2/3, 66.213 %; ETA: 0.0 min
posteriormean(): loop 2/3, 67.12 %; ETA: 0.0 min
posteriormean(): loop 2/3, 68.027 %; ETA: 0.0 min
posteriormean(): loop 2/3, 68.934 %; ETA: 0.0 min
posteriormean(): loop 2/3, 69.841 %; ETA: 0.0 min
posteriormean(): loop 2/3, 70.748 %; ETA: 0.0 min
posteriormean(): loop 2/3, 71.655 %; ETA: 0.0 min
posteriormean(): loop 2/3, 72.562 %; ETA: 0.0 min
posteriormean(): loop 2/3, 73.469 %; ETA: 0.0 min
posteriormean(): loop 2/3, 74.376 %; ETA: 0.0 min
posteriormean(): loop 2/3, 75.283 %; ETA: 0.0 min
posteriormean(): loop 2/3, 76.19 %; ETA: 0.0 min
posteriormean(): loop 2/3, 77.098 %; ETA: 0.0 min
posteriormean(): loop 2/3, 78.005 %; ETA: 0.0 min
posteriormean(): loop 2/3, 78.912 %; ETA: 0.0 min
posteriormean(): loop 2/3, 79.819 %; ETA: 0.0 min
posteriormean(): loop 2/3, 80.726 %; ETA: 0.0 min
posteriormean(): loop 2/3, 81.633 %; ETA: 0.0 min
posteriormean(): loop 2/3, 82.54 %; ETA: 0.0 min
posteriormean(): loop 2/3, 83.447 %; ETA: 0.0 min
posteriormean(): loop 2/3, 84.354 %; ETA: 0.0 min
posteriormean(): loop 2/3, 85.261 %; ETA: 0.0 min
posteriormean(): loop 2/3, 86.168 %; ETA: 0.0 min
posteriormean(): loop 2/3, 87.075 %; ETA: 0.0 min
posteriormean(): loop 2/3, 87.982 %; ETA: 0.0 min
posteriormean(): loop 2/3, 88.889 %; ETA: 0.0 min
posteriormean(): loop 2/3, 89.796 %; ETA: 0.0 min
posteriormean(): loop 2/3, 90.703 %; ETA: 0.0 min
posteriormean(): loop 2/3, 91.61 %; ETA: 0.0 min
posteriormean(): loop 2/3, 92.517 %; ETA: 0.0 min
posteriormean(): loop 2/3, 93.424 %; ETA: 0.0 min
posteriormean(): loop 2/3, 94.331 %; ETA: 0.0 min
posteriormean(): loop 2/3, 95.238 %; ETA: 0.0 min
posteriormean(): loop 2/3, 96.145 %; ETA: 0.0 min
posteriormean(): loop 2/3, 97.052 %; ETA: 0.0 min
posteriormean(): loop 2/3, 97.959 %; ETA: 0.0 min
posteriormean(): loop 2/3, 98.866 %; ETA: 0.0 min
posteriormean(): loop 2/3, 99.773 %; ETA: 0.0 min
posteriormean(): loop 2/3, 100.0 %; ETA: 0.0 min
posteriormean(): loop 3/3, 0.0 %; ETA: Inf min
posteriormean(): loop 3/3, 0.907 %; ETA: 0.0 min
posteriormean(): loop 3/3, 1.134 %; ETA: 0.0 min
posteriormean(): loop 3/3, 1.814 %; ETA: 0.0 min
posteriormean(): loop 3/3, 2.721 %; ETA: 0.0 min
posteriormean(): loop 3/3, 3.628 %; ETA: 0.0 min
posteriormean(): loop 3/3, 4.535 %; ETA: 0.0 min
posteriormean(): loop 3/3, 5.442 %; ETA: 0.0 min
posteriormean(): loop 3/3, 6.349 %; ETA: 0.0 min
posteriormean(): loop 3/3, 7.256 %; ETA: 0.0 min
posteriormean(): loop 3/3, 8.163 %; ETA: 0.0 min
posteriormean(): loop 3/3, 9.07 %; ETA: 0.0 min
posteriormean(): loop 3/3, 9.977 %; ETA: 0.0 min
posteriormean(): loop 3/3, 10.884 %; ETA: 0.0 min
posteriormean(): loop 3/3, 11.791 %; ETA: 0.0 min
posteriormean(): loop 3/3, 12.698 %; ETA: 0.0 min
posteriormean(): loop 3/3, 13.605 %; ETA: 0.0 min
posteriormean(): loop 3/3, 14.512 %; ETA: 0.0 min
posteriormean(): loop 3/3, 15.42 %; ETA: 0.0 min
posteriormean(): loop 3/3, 16.327 %; ETA: 0.0 min
posteriormean(): loop 3/3, 17.234 %; ETA: 0.0 min
posteriormean(): loop 3/3, 18.141 %; ETA: 0.0 min
posteriormean(): loop 3/3, 19.048 %; ETA: 0.0 min
posteriormean(): loop 3/3, 19.955 %; ETA: 0.0 min
posteriormean(): loop 3/3, 20.862 %; ETA: 0.0 min
posteriormean(): loop 3/3, 21.769 %; ETA: 0.0 min
posteriormean(): loop 3/3, 22.676 %; ETA: 0.0 min
posteriormean(): loop 3/3, 23.583 %; ETA: 0.0 min
posteriormean(): loop 3/3, 24.49 %; ETA: 0.0 min
posteriormean(): loop 3/3, 25.397 %; ETA: 0.0 min
posteriormean(): loop 3/3, 26.304 %; ETA: 0.0 min
posteriormean(): loop 3/3, 27.211 %; ETA: 0.0 min
posteriormean(): loop 3/3, 28.118 %; ETA: 0.0 min
posteriormean(): loop 3/3, 29.025 %; ETA: 0.0 min
posteriormean(): loop 3/3, 29.932 %; ETA: 0.0 min
posteriormean(): loop 3/3, 30.839 %; ETA: 0.0 min
posteriormean(): loop 3/3, 31.746 %; ETA: 0.0 min
posteriormean(): loop 3/3, 32.653 %; ETA: 0.0 min
posteriormean(): loop 3/3, 33.56 %; ETA: 0.0 min
posteriormean(): loop 3/3, 34.467 %; ETA: 0.0 min
posteriormean(): loop 3/3, 35.374 %; ETA: 0.0 min
posteriormean(): loop 3/3, 36.281 %; ETA: 0.0 min
posteriormean(): loop 3/3, 37.188 %; ETA: 0.0 min
posteriormean(): loop 3/3, 38.095 %; ETA: 0.0 min
posteriormean(): loop 3/3, 39.002 %; ETA: 0.0 min
posteriormean(): loop 3/3, 39.909 %; ETA: 0.0 min
posteriormean(): loop 3/3, 40.816 %; ETA: 0.0 min
posteriormean(): loop 3/3, 41.723 %; ETA: 0.0 min
posteriormean(): loop 3/3, 42.63 %; ETA: 0.0 min
posteriormean(): loop 3/3, 43.537 %; ETA: 0.0 min
posteriormean(): loop 3/3, 44.444 %; ETA: 0.0 min
posteriormean(): loop 3/3, 45.351 %; ETA: 0.0 min
posteriormean(): loop 3/3, 46.259 %; ETA: 0.0 min
posteriormean(): loop 3/3, 47.166 %; ETA: 0.0 min
posteriormean(): loop 3/3, 48.073 %; ETA: 0.0 min
posteriormean(): loop 3/3, 48.98 %; ETA: 0.0 min
posteriormean(): loop 3/3, 49.887 %; ETA: 0.0 min
posteriormean(): loop 3/3, 50.794 %; ETA: 0.0 min
posteriormean(): loop 3/3, 51.701 %; ETA: 0.0 min
posteriormean(): loop 3/3, 52.608 %; ETA: 0.0 min
posteriormean(): loop 3/3, 53.515 %; ETA: 0.0 min
posteriormean(): loop 3/3, 54.422 %; ETA: 0.0 min
posteriormean(): loop 3/3, 55.329 %; ETA: 0.0 min
posteriormean(): loop 3/3, 56.236 %; ETA: 0.0 min
posteriormean(): loop 3/3, 57.143 %; ETA: 0.0 min
posteriormean(): loop 3/3, 58.05 %; ETA: 0.0 min
posteriormean(): loop 3/3, 58.957 %; ETA: 0.0 min
posteriormean(): loop 3/3, 59.864 %; ETA: 0.0 min
posteriormean(): loop 3/3, 60.771 %; ETA: 0.0 min
posteriormean(): loop 3/3, 61.678 %; ETA: 0.0 min
posteriormean(): loop 3/3, 62.585 %; ETA: 0.0 min
posteriormean(): loop 3/3, 63.492 %; ETA: 0.0 min
posteriormean(): loop 3/3, 64.399 %; ETA: 0.0 min
posteriormean(): loop 3/3, 65.306 %; ETA: 0.0 min
posteriormean(): loop 3/3, 66.213 %; ETA: 0.0 min
posteriormean(): loop 3/3, 67.12 %; ETA: 0.0 min
posteriormean(): loop 3/3, 68.027 %; ETA: 0.0 min
posteriormean(): loop 3/3, 68.934 %; ETA: 0.0 min
posteriormean(): loop 3/3, 69.841 %; ETA: 0.0 min
posteriormean(): loop 3/3, 70.748 %; ETA: 0.0 min
posteriormean(): loop 3/3, 71.655 %; ETA: 0.0 min
posteriormean(): loop 3/3, 72.562 %; ETA: 0.0 min
posteriormean(): loop 3/3, 73.469 %; ETA: 0.0 min
posteriormean(): loop 3/3, 74.376 %; ETA: 0.0 min
posteriormean(): loop 3/3, 75.283 %; ETA: 0.0 min
posteriormean(): loop 3/3, 76.19 %; ETA: 0.0 min
posteriormean(): loop 3/3, 77.098 %; ETA: 0.0 min
posteriormean(): loop 3/3, 78.005 %; ETA: 0.0 min
posteriormean(): loop 3/3, 78.912 %; ETA: 0.0 min
posteriormean(): loop 3/3, 79.819 %; ETA: 0.0 min
posteriormean(): loop 3/3, 80.726 %; ETA: 0.0 min
posteriormean(): loop 3/3, 81.633 %; ETA: 0.0 min
posteriormean(): loop 3/3, 82.54 %; ETA: 0.0 min
posteriormean(): loop 3/3, 83.447 %; ETA: 0.0 min
posteriormean(): loop 3/3, 84.354 %; ETA: 0.0 min
posteriormean(): loop 3/3, 85.261 %; ETA: 0.0 min
posteriormean(): loop 3/3, 86.168 %; ETA: 0.0 min
posteriormean(): loop 3/3, 87.075 %; ETA: 0.0 min
posteriormean(): loop 3/3, 87.982 %; ETA: 0.0 min
posteriormean(): loop 3/3, 88.889 %; ETA: 0.0 min
posteriormean(): loop 3/3, 89.796 %; ETA: 0.0 min
posteriormean(): loop 3/3, 90.703 %; ETA: 0.0 min
posteriormean(): loop 3/3, 91.61 %; ETA: 0.0 min
posteriormean(): loop 3/3, 92.517 %; ETA: 0.0 min
posteriormean(): loop 3/3, 93.424 %; ETA: 0.0 min
posteriormean(): loop 3/3, 94.331 %; ETA: 0.0 min
posteriormean(): loop 3/3, 95.238 %; ETA: 0.0 min
posteriormean(): loop 3/3, 96.145 %; ETA: 0.0 min
posteriormean(): loop 3/3, 97.052 %; ETA: 0.0 min
posteriormean(): loop 3/3, 97.959 %; ETA: 0.0 min
posteriormean(): loop 3/3, 98.866 %; ETA: 0.0 min
posteriormean(): loop 3/3, 99.773 %; ETA: 0.0 min
posteriormean(): loop 3/3, 100.0 %; ETA: 0.0 min
blockpostcov(): Parallel run using 1 workers
blockpostcov(): 0.0 %; ETA: Inf min
blockpostcov(): 3.401 %; ETA: 0.001 min
blockpostcov(): 68.027 %; ETA: 0.0 min
blockpostcov(): 100.0 %; ETA: 0.0 min