**Our website has moved
here**

**Home**** ****Research**** ****Publications**** ****Downloads**

__Inverse
modeling__

· If you are working on spatial inverse models with MPS and are looking for a benchmark forward flow and transport model, you can use one of the case studies we developed in our paper on parallel tempering. It uses the MAFLOT flow and transport simulation code for the forward problem (http://www.maflot.com/Site/MaFloT.html). The forward problem is very fast, which is needed when investing inverse approaches.

· The code for the tempering approach in Laloy et al (2016) is available here (read the instructions in the file run_ptsgr.m).

__General
purpose utilities__

· Here is a set of small Matlab geostatistical tools that you can download and use freely. A basic documentation is also included. Thanks for sending feedback!

__MPS-related
utilities__

· Our patterns validation code (Windows executable and Fortran code) allows finding out if a training image is compatible with a given data pointset.

· Before writing your own code for geostatistical simulation or estimation, check out some nice existing free ones such as SGeMS and mGstat.

__Training
images__

· A set of training images is provided on the website of our book on MPS, along with useful additional resources, such as code repositories.

· If you are wondering where you can find a 3D training image for alluvial environments, check out the aquifers analogs that we published. The data are here and the paper describing it is here.

__Graph-cuts based simulation__

· We recently developed a graph-cuts based MPS simulation algorithm which is an improvement over Image Quilting. The Matlab code can be found here.

__Image Quilting__

· The Matlab code for MPS simulation by Image Quilting is available here. Note that it uses some of the utilities described above.

__Direct Sampling__

The Direct Sampling code comes in many versions. Some are properly compiled codes, other only Matlab scripts:

**Compiled libraries:**

· A full version, with graphical interface, examples and a proper documentation, can be requested from the University of Neuchatel using this link. It is only available for academic, non-commercial purposes, and to the discretion of the University of Neuchatel. It is the most advanced and best implemented distribution of DS.

· The full version of DS that I developed in his PhD and continued to develop since (but less and less as the version above has most features). It comes as a compiled C executable that you can obtain from me on demand, but you will still have to sign an academic license agreement with the University of Neuchatel. If you want it, just send me an email and we can see if this can be arranged. In this version, most of the features presented in the literature are present.

· There is an excellent and freely available MPS library written by Thomas Hansen from the Nield Bohr Institute, available here http://www.sciencedirect.com/science/article/pii/S2352711016300164: .

**Matlab**** versions:**

· A simple version written in Matlab, with a fixed template, is available for demonstration and teaching purposes. IT SHOULD NOT BE USED FOR BENCHMARKING OR FOR COMPARISON WITH OTHER METHODS BECAUSE IT IS EXTREMELY BASIC AND SLOW.

· An advanced version of the Matlab Direct Sampling code for is also available. It considers variable lag vectors and flexible data events, and seems to have issues with conditioning (I will fix it when I find the time). THIS ONE SHOULD ALSO NOT BE USED FOR BENCHMARKING OR FOR COMPARISON WITH OTHER METHODS BECAUSE EVEN SLOWER THAN THE SIMPLE VERSION. MOREOVER IT HAS PROBLEMS WITH CONDITIONING.

· Another version of the Direct Sampling is the bunch-pasting strategy of Rezaee et al (2013), for which there is also a Matlab code. AGAIN, IT SHOULD NOT BE USED FOR BENCHMARKING.

Note that there may be other versions out there that I am not aware of!