Skip to contents

DirectSampling: direct sampling (Mariethoz et al. 2010). Snesim: single-grid SNESIM (Strebelle 2002). Conditioning data are rows of (row, column, value) with zero-based indices, as in the Python arm morie.fn.mpsgeo, whose simulations these equal.

Usage

DirectSampling(
  ti,
  nx,
  ny,
  n_neighbors = 12,
  threshold = 0.05,
  max_fraction = 0.5,
  conditioning = NULL,
  categorical = TRUE,
  seed = 0
)

Arguments

ti

Training image (matrix).

nx, ny

Simulation grid size (columns, rows).

n_neighbors

Data event size.

threshold

Acceptance distance.

max_fraction

Maximum scanned fraction of the training image.

conditioning

Matrix of zero-based (row, column, value) hard data.

categorical

Categorical (mismatch) or continuous distance.

seed

Philox seed.

Value

A list with the simulated grid.

References

Mariethoz, G., Renard, P. and Straubhaar, J. (2010). The direct sampling method to perform multiple-point geostatistical simulations. Water Resources Research 46, W11536.

Strebelle, S. (2002). Conditional simulation of complex geological structures using multiple-point statistics. Mathematical Geology 34, 1-21.

Examples

ti <- matrix(rep(c(0, 0, 1, 1), 4), 4, byrow = TRUE)
DirectSampling(ti, 4, 3, seed = 1)$grid
#>      [,1] [,2] [,3] [,4]
#> [1,]    0    0    1    1
#> [2,]    1    0    1    1
#> [3,]    0    0    1    1