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 Distribution

gaussianfft-1.1.0.tar.gz (9.1 MB view details)

Uploaded Source

Built Distributions

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

gaussianfft-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (46.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

gaussianfft-1.1.0-cp39-cp39-macosx_10_14_x86_64.whl (27.8 MB view details)

Uploaded CPython 3.9macOS 10.14+ x86-64

gaussianfft-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (46.6 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

gaussianfft-1.1.0-cp38-cp38-macosx_10_14_x86_64.whl (27.8 MB view details)

Uploaded CPython 3.8macOS 10.14+ x86-64

gaussianfft-1.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (46.6 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

gaussianfft-1.1.0-cp37-cp37m-macosx_10_14_x86_64.whl (27.8 MB view details)

Uploaded CPython 3.7mmacOS 10.14+ x86-64

gaussianfft-1.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (46.6 MB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ x86-64

gaussianfft-1.1.0-cp36-cp36m-macosx_10_14_x86_64.whl (27.8 MB view details)

Uploaded CPython 3.6mmacOS 10.14+ x86-64

File details

Details for the file gaussianfft-1.1.0.tar.gz.

File metadata

  • Download URL: gaussianfft-1.1.0.tar.gz
  • Upload date:
  • Size: 9.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0

File hashes

Hashes for gaussianfft-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c0588c4edcb5c3ff57fad05cb5b5db7ad93ecf8e608dba037ea70dcce6963c1c
MD5 e9adaa570eb77cc7475438075dddb0f5
BLAKE2b-256 14732fdd5287e8d8e015cdc25ce4e6574fa72769917eb6c58b364ad2d19d6542

See more details on using hashes here.

File details

Details for the file gaussianfft-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gaussianfft-1.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1bd12bf18eeebac600ac412d3928bd86b7d45218179e674dda27915825bc825f
MD5 f378a368ac78c0d35f71510971cdd6cc
BLAKE2b-256 fdbf3a5876b2d7f54f268021f0ba5658801a77e279fbb759ed436f565ce5dd62

See more details on using hashes here.

File details

Details for the file gaussianfft-1.1.0-cp39-cp39-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: gaussianfft-1.1.0-cp39-cp39-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 27.8 MB
  • Tags: CPython 3.9, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for gaussianfft-1.1.0-cp39-cp39-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 10de5d1edb55585c7e95eae7c961f752bca2f5a089d0b0830c09a9643a109195
MD5 3223fe341eb68918530f8592bda95cdd
BLAKE2b-256 2c55e9eba8688310497e21351c377218a2155a0c5123439ffb3c2d8349e979fb

See more details on using hashes here.

File details

Details for the file gaussianfft-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for gaussianfft-1.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3d2207788b094206a870a3959bba2effd1113d6e35f2e215b633ea8f9c0a234c
MD5 0b8297a90816937d73659a1df6d1fff0
BLAKE2b-256 1717ffc31d6348bb9742f0e6dec6cf1bd7f7d63eae7cc7b88c4655bf41c112c6

See more details on using hashes here.

File details

Details for the file gaussianfft-1.1.0-cp38-cp38-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: gaussianfft-1.1.0-cp38-cp38-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 27.8 MB
  • Tags: CPython 3.8, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for gaussianfft-1.1.0-cp38-cp38-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 8e1656544bfd1263193b8783f9be76523001d92ea6fffe0f939fdd375b469b15
MD5 8f8ebeee77b12849876e6da73256717b
BLAKE2b-256 ac06732395295b6579f30eda67251f19e781148fca2fa02cc81d32d332ec89f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gaussianfft-1.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b10d67f8e6f377d0ed8acf7c69be281c363088e75c3cb21486e7f332af52adb1
MD5 5b27196d5a1950654eb9ca9b5d7b9539
BLAKE2b-256 8555d001f79a0e4a3edecac6bc3cc90ffefa9c02710c77f5c8e50914253b29a8

See more details on using hashes here.

File details

Details for the file gaussianfft-1.1.0-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: gaussianfft-1.1.0-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 27.8 MB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for gaussianfft-1.1.0-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 ce37182a267cb7dc22ddb865b35942928fe55988df4388af9e8e9831a8e770dc
MD5 30fcfea1e168ec3c1ec3c8933d4f4ab2
BLAKE2b-256 f11cb4eee3e6526de1d91ccdae31ece84cc2aabf58630769f7d10528f0e7b87c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gaussianfft-1.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4eb567d93180e946bc1ee49a2449b5b9dd30259eac17c02785ec7f38ab10eab6
MD5 9ff4ed1cbaa058d958c6367fc3eb59c1
BLAKE2b-256 9fda359a9fe7317545296b03a068518a244801c553ee942ff59dfbae39fb2097

See more details on using hashes here.

File details

Details for the file gaussianfft-1.1.0-cp36-cp36m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: gaussianfft-1.1.0-cp36-cp36m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 27.8 MB
  • Tags: CPython 3.6m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for gaussianfft-1.1.0-cp36-cp36m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 106da8bd46e38863d10771f59900d05aba8f4ba902682cb22546c8ffbb2dabfa
MD5 530cb63c60a6fd853be30feff7b171e0
BLAKE2b-256 653c2880b873903245d1e3bc5be620ebfcca48059340694bce8f219734cbf997

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