Skip to main content

LoopStructural: Loop3D Implicit Geological Modelling

3D model of Hamersley created using loopstructural PyPI version GitHub license Documentation loop3d.github.io/LoopStructural/

Overview

LoopStructural is an opensource Python library for 3D geological modelling. The library has been built in the scope of the Loop project (Loop3d.org). LoopStructural can:

  • Model fault networks integrating fault kinematics and overprinting relationships
  • Model folds using structural elements (fold axis, fold axial surface) for multiple fold events
  • Use different implicit interpolation algorithms (Finite Difference, Piecewiese Linear, RBF)
  • Export models to vtk, geoh5, omf, gocad, csv, obj formats
  • Visualise models in an interactive python environment.

Installation

Google colab

LoopStructural can be used inside a google colab notebook, however interactive visualisation using kitware trame does not work. Only static plots can be displayed.

Pip

pip install loopstructural

Optional dependencies are:

  • loopstructuralvisualisation (wrapper for pyvista to interface with loopstructural objects)
  • pyvista (3D visualisation)
  • geoh5py (export to .geoh5 format)
  • mira-omf (export to .omf format to load in Leapfrog)
  • pyevtk
  • dill (serialize loop models to a pickle file)
  • tqdm (progress bars)
  • loopsolver (experimental solver for admm inequality constraints)

You can install all of the optional dependencies using: pip install loopstructural[all]

conda

conda install -c conda-forge -c loop3d loopstructural

to install the working 3D visualisation environment conda install -c conda-forge -c loop3d loopstructural loopstructuralvisualisation pyvista trame trame-vtk trame-vuetify

Quickstart

  • A basic geological model
from LoopStructural import GeologicalModel
from LoopStructural.datatypes import BoundingBox
from LoopStructural.visualisation import Loop3DView
from LoopStructural.datasets import load_claudius

import numpy as np
data, bb = load_claudius()

#bb constaints origin and maximum of axis aligned bounding box
#data is a pandas dataframe with X,Y,Z,val,nx,ny,nz, feature_name

model = GeologicalModel(bb[0,:],bb[1,:])
model.data = data
# nelements specifies the number of discrete interpolation elements
# 'stratí' is the feature name in the data dataframe
model.create_and_add_foliation('strati',nelements=1e5)
model.update()
# get the value of the interpolator at some random locations
locations = np.array(
    [
        np.random.uniform(bb[0, 0], bb[1, 0],5),
        np.random.uniform(bb[0, 1], bb[1, 1],5),
        np.random.uniform(bb[0, 2], bb[1, 2],5),
    ]
).T
val = model.evaluate_feature_value('strati', locations)
# get the gradient of the interpolator
gradient = model.evaluate_feature_gradient('strati',locations)

#Plot the scalar field of the model
model['strati'].scalar_field().plot()

Documentation

The LoopStructural documentation can be found here

Problems

Any bugs/feature requests/comments please create a new issue.

Acknowledgements

The Loop platform is an open source 3D probabilistic geological and geophysical modelling platform, initiated by Geoscience Australia and the OneGeology consortium. The project is funded by Australian territory, State and Federal Geological Surveys, the Australian Research Council and the MinEx Collaborative Research Centre.

Metadata

Release files for LoopStructural 1.6.20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for LoopStructural 1.6.20
File Size Uploaded Provenance Actions
loopstructural-1.6.20.tar.gz 523.2 kB Without provenance Details for loopstructural-1.6.20.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for LoopStructural 1.6.20
File Interpreter ABI Platform Actions
loopstructural-1.6.20-py3-none-any.whl Python 3 none any Details for loopstructural-1.6.20-py3-none-any.whl

Total release size: 1.1 MB

Release files / loopstructural-1.6.20.tar.gz

Download URL loopstructural-1.6.20.tar.gz
Size 523.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a9374030ed94c262304aabe66319f0ac8dbe423dea96016c5bb16bb3975e30ad
BLAKE2b-256 checksum
How to use checksums
7e8f0696e6c724aa35cee09241251f4d82c9cd892ce044ecf828d94d252ee299
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / loopstructural-1.6.20-py3-none-any.whl

Download URL loopstructural-1.6.20-py3-none-any.whl
Size 585.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a92e6c813ef7613a366b44ab7accb837e5e6cbc526535d9957d8c9621ede24c
BLAKE2b-256 checksum
How to use checksums
698c2e0c9fdc07a9768f3b8a82d5d4cfd3738b82e8a87bf848edb8493c6396ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for LoopStructural 1.6.20

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.6.20 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page