Skip to main content

No project description provided

Project description

Gaussianfft

A fast library for simulating Gaussian Random Fields, using the fast Fourier transform (Intel MKL).

Originally developed by Norsk Regnesentral on commission from Equinor. Documentation from Norsk Regnesentral: SAND_04_18.pdf (also available on GitHub)

Usage

pip install gaussianfft
import gaussianfft as grf

grf.seed(100)  # For deterministic / repeatable output
variogram = grf.variogram(grf.VariogramType.GAUSSIAN, 1000)

simulation = grf.simulate(variogram, nx=100, dx=1, ny=100, dy=1)  # 2D 100 x 100 grid

See examples for examples, getting started, and other documentation.

Previous versions

nrlib version pr 28.02.2018 for RMS10 is the final version compiled for RMS10

The directory for this version: nrlib-dist-RMS10-180228 Compatibility: Compatible with python 3.4 which is used in RMS10

nrlib version pr 28.02.2018 for RMS11Beta is the final version compiled for RMS11Beta

The directory for this version: nrlib-dist-RMS11Beta-180228 Compatibility: Compatible with python 3.6 which is used in RMS11Beta

nrlib version 09.02.2018 for RMS11Beta

The directory nrlib-dist-RMS11Beta is the one to use for RMS11Beta Compatibility: Compatible with python 3.6 which is used in RMS11Beta

nrlib version pr 13.02.2018 for RMS10

The directory nrlib-dist-RMS10-optimalized is the one to use for RMS10. Is updated to be more efficient. It generates an message which can be ignored: "RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa" This "error" message can be ignored. Compatibility: Compatible with python 3.4 which is used in RMS10

Description

Python wrapper around Gaussian simulation methods for 1D, 2D and 3D simulation using the FFT based method.

Written by: Norsk Regnesentral for Equinor APS GUI project, but can be used for all in Equinor for internal use.

Contact person in Norsk Regnesentral: Vegard Berg Kvernelv (2018) Contact person in Equinor: Oddvar Lia

This directory contains both source code and compiled version of nrlib, a library for simulating gaussian fields in 1D, 2D and 3D using python 3.4 (RMS version 10 installation of python)

This code is for Equinor internal use and the development of the code is paid by the APS GUI project. Norsk Regnesentral (contact person: Vegard Berg Kvernelv, 2018) has developed the code which is based on FFT and can handle very large grids (The ambition is to handle up to 1000x1000x1000 grid size). Check Docstring for usage but a brief summary follows:

How to use it in python scripts called up from RMS:

  1. In RMS set python path to include: /project/res/nrlib/nrlib-dist

  2. In python script: import gaussianfft as grf

  3. Set variogram: variogram = grf.variogram(variogramName, mainRange, perpRange,vertRange, azimuth, dip, power)

    variogramName is one of: exponential spherical gaussian general_exponential (this is the only one using the exponent called power in the variogram function) matern32 matern52 matern72 constant The ranges are given the same name as in IPL but corresponds to x,y,z directions. Note that the simulation is a regular 3D grid and the coordinate system is right-handed. This means that input azimuth angle should be (90 - azimut_used_in_rms) for standard RMS grids which are left-handed. So if you want to use this in RMS and load the result into a zone in a grid in RMS (e.g by using Roxar API) then be aware of this.

  4. Simulation is done by:

    gaussVector = grf.simulation(variogram, nx, dx, ny, dy, nz, dz)

    The gauss field output is a 1D numpy array and by using

    gaussResult = grf.reshape(gaussVector,(nx,ny,nz),order='F') one get a 3D numpy array

  5. To check how large the extension of the internal simulation grid is (to avoid edge effects in the result from the FFT algorithm) the grid is increased before it is simulated internally in the nrlib module. You can check this extension to see the actual grid size used. This grid size is reported by using the function:

[nx_extended, ny_extended, nz_extended] = grf.simulation_size(variogram, nx, dx, ny, dy, nz, dz)

and depends very much on the relative size of the correlation lengths and the grid size (length, width, height)

  1. To get the start seed that is used: seed = grf.seed()

  2. To set a seed before calling any simulation: grf.seed(seedValue)

Note: the returned seed from grf.seed() is created automatically by the clock time. If you use multiprocessing, and run several processes in parallel be sure to delay start of a new process by at least 1 second after the previous process to avoid that two different processes get the same start seed.

The return seed is the same regardless of how many times you call simulation since it is the start seed of the first call to simulation. It must however not be called before the first call to simulation if you want the start seed to be automatically generated. If you want to run with a predefined start seed, call grf.seed(seedValue) before the first call to simulation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gaussianfft-1.1.1b1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (39.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

gaussianfft-1.1.1b1-cp39-cp39-macosx_11_0_x86_64.whl (27.9 MB view details)

Uploaded CPython 3.9macOS 11.0+ x86-64

gaussianfft-1.1.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (39.7 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

gaussianfft-1.1.1b1-cp38-cp38-macosx_10_15_x86_64.whl (27.9 MB view details)

Uploaded CPython 3.8macOS 10.15+ x86-64

gaussianfft-1.1.1b1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (39.6 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

gaussianfft-1.1.1b1-cp37-cp37m-macosx_10_15_x86_64.whl (27.9 MB view details)

Uploaded CPython 3.7mmacOS 10.15+ x86-64

gaussianfft-1.1.1b1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (39.6 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ x86-64

gaussianfft-1.1.1b1-cp36-cp36m-macosx_10_14_x86_64.whl (27.9 MB view details)

Uploaded CPython 3.6mmacOS 10.14+ x86-64

File details

Details for the file gaussianfft-1.1.1b1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gaussianfft-1.1.1b1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 72267417107e6349adbeb7d9b9fee190b713b634fd48d22e4a0b9efe05a61f22
MD5 baacbcfb34f95cf0b181ad7d24b873d5
BLAKE2b-256 c6d5753fb2ba485ea84f193c604ce7306c1ad324075854559de920a316e4f3b0

See more details on using hashes here.

File details

Details for the file gaussianfft-1.1.1b1-cp39-cp39-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for gaussianfft-1.1.1b1-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 598d5d8b18c873a2a45ff1f6679f281ba459b26fc39bdd7732626faa086659f9
MD5 705a84274bdd6e6c34c0810966b91d8f
BLAKE2b-256 5d28bb7590b47afaf7d71c77e6d50dd6836ecaf6264f96f1385e4c3fdcd74d7e

See more details on using hashes here.

File details

Details for the file gaussianfft-1.1.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gaussianfft-1.1.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 558215b719b64c678a8b84a8e679577da16e11ea5b08ffa8283252f1cc472ef6
MD5 dd4ac913925614567303c4747b70c7ec
BLAKE2b-256 52318cc3e8478d9711b543d9b568121aa8341b2c945af8fb83fccb3a409fc4a5

See more details on using hashes here.

File details

Details for the file gaussianfft-1.1.1b1-cp38-cp38-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for gaussianfft-1.1.1b1-cp38-cp38-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 0fdc823cf68264b9a41e6534abe07a95681f632da82518e3933b5e6ff35418e0
MD5 9b83367f4fbb6dbb738ded3f29a4f96b
BLAKE2b-256 c3e93079028dadf672b877cfa554496faa324d790c39e2537d3a0a311876caa4

See more details on using hashes here.

File details

Details for the file gaussianfft-1.1.1b1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gaussianfft-1.1.1b1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 436282a8d3a79136e6fd3bc8c9342cc9ef3527aab743126db4d3aee0b497c13e
MD5 299783c9d767d7eca29dfb0ef9918e0e
BLAKE2b-256 e55d43bb36ecbcf04aa2ae2164ebedf15b735c7376623c54122792686866ea2d

See more details on using hashes here.

File details

Details for the file gaussianfft-1.1.1b1-cp37-cp37m-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for gaussianfft-1.1.1b1-cp37-cp37m-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 d0e1742cef1591e2b7c343e5adb30f4046c137b968da451fde3db5e166ff1304
MD5 9ce4a8e780de1b720ae7b339b21c7afc
BLAKE2b-256 baea90f1db385bd9ba28e69721c81d7102a4400359803722bf6f3c4e72e5afba

See more details on using hashes here.

File details

Details for the file gaussianfft-1.1.1b1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gaussianfft-1.1.1b1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 22121c9df2365b7dc06bbe5e944d13688d11a1171da8d7ae1a99be2b72c9eb63
MD5 0531da2be31a5801db88cdea4e43281f
BLAKE2b-256 6677d4b7b8ac8b8e938610256d08c64988b0ea9ce45780813e42a58c68f2192a

See more details on using hashes here.

File details

Details for the file gaussianfft-1.1.1b1-cp36-cp36m-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for gaussianfft-1.1.1b1-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 2af10597546b36d4b0a5bf4f3b68ab4163b8f74d83531e334ebc8fe0b625cc0c
MD5 343d83c354d5685e800fbf881279a12b
BLAKE2b-256 35060762e659467bd5dd86b69a0992fa5a9ae0478d2ce6c69dc5d3dd6fc507b1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page