Skip to main content

Professional geological model reconstruction using advanced inpainting techniques

Project description

Geology - Professional Geological Model Reconstruction Toolkit

Python Version PyPI version PyPI - Downloads License: MIT Documentation Status Code style: black

๐Ÿ“ฆ Package Status: Successfully published on Test PyPI as geology-Marios-toolkit
๐Ÿš€ Installation: pip install --index-url https://test.pypi.org/simple/ geology-Marios-toolkit

A comprehensive Python toolkit for geological model reconstruction using advanced inpainting techniques and machine learning methods.

This repository contains a professional implementation for geological subsurface model reconstruction from sparse data using state-of-the-art computational methods. The toolkit combines biharmonic inpainting, machine learning classification, and uncertainty quantification to create robust geological models from incomplete datasets.

Geological Model

๐Ÿงฌ Scientific Overview

Geological subsurface characterization often faces the challenge of sparse and irregularly distributed data points. This toolkit addresses this fundamental problem by implementing advanced computational methods for geological model reconstruction:

  • ๐Ÿ”ฌ Biharmonic Inpainting: Smooth interpolation preserving geological boundaries and structural continuity
  • ๐Ÿค– Machine Learning Classification: One-vs-all and probabilistic classification for multi-class geological units
  • ๐Ÿ“Š Weighted Interpolation: Anisotropic interpolation respecting geological fabric and preferential directions
  • ๐Ÿ“ˆ Uncertainty Quantification: Comprehensive uncertainty analysis with confidence intervals and error propagation
  • ๐ŸŽฏ 3D Visualization: Professional VTK-based visualization for geological models and validation

๐Ÿš€ Key Features

Core Functionality

  • Advanced Inpainting Algorithms: Biharmonic PDE-based interpolation for geological boundaries
  • Multi-Class Classification: Sophisticated geological unit prediction with uncertainty estimates
  • Anisotropic Interpolation: Directional interpolation respecting geological structures
  • Memory-Efficient Processing: Batch processing for large geological datasets
  • Cross-Platform Compatibility: Windows, Linux, and macOS support

Data Integration

  • Multiple Data Formats: Support for borehole logs, geological surveys, and geophysical data
  • Geospatial Integration: Native support for coordinate systems and geospatial data formats
  • Quality Control: Automated data validation and outlier detection
  • Missing Data Handling: Robust algorithms for incomplete geological datasets

Visualization and Export

  • Professional 3D Visualization: High-quality geological model rendering
  • Publication-Ready Figures: Scientific plotting with geological colormaps and annotations
  • VTK Export: Compatible with ParaView, VisIt, and other professional visualization software
  • Interactive Dashboards: Jupyter notebook integration with interactive widgets

๐Ÿ“ Project Structure

Geology/
โ”œโ”€โ”€ ๐Ÿ““ demo.ipynb                    # Main demonstration notebook with examples
โ”œโ”€โ”€ ๐Ÿ“‹ requirements.txt              # Core dependencies
โ”œโ”€โ”€ ๐Ÿ—๏ธ setup.py                     # Professional package configuration
โ”œโ”€โ”€ ๐Ÿ“– README.md                     # This comprehensive guide
โ”œโ”€โ”€ ๐Ÿ“Š Data Files/
โ”‚   โ”œโ”€โ”€ geotop.npy                   # 3D geological model data
โ”‚   โ”œโ”€โ”€ top_layer.gpkg              # Geological layer (GeoPackage format)
โ”‚   โ”œโ”€โ”€ data_final.xlsx             # Processed geological dataset
โ”‚   โ””โ”€โ”€ real_model.npy              # Reference geological model
โ”œโ”€โ”€ ๐Ÿงฎ gridder/                     # Geological gridding and inpainting
โ”‚   โ”œโ”€โ”€ __init__.py                 # Module initialization
โ”‚   โ””โ”€โ”€ gridder.py                  # Core geological algorithms
โ”œโ”€โ”€ ๐ŸŽจ geo_vtk/                     # Professional VTK visualization tools
โ”‚   โ”œโ”€โ”€ src/vtkclass/               # VTK conversion classes
โ”‚   โ”œโ”€โ”€ data/                       # Example geological datasets
โ”‚   โ””โ”€โ”€ README.md                   # VTK toolkit documentation
โ”œโ”€โ”€ ๐Ÿ–ผ๏ธ images/                      # Documentation figures and results
โ”œโ”€โ”€ ๐Ÿ“š docs/                        # Comprehensive documentation
โ””โ”€โ”€ ๐Ÿงช tests/                       # Automated testing suite

๐Ÿ“ฆ Installation

PyPI Package Available!

Geology is now available on the Python Package Index (PyPI), making installation as simple as:

pip install Geology

This command installs the complete geological toolkit with all core dependencies. For specialized applications, optional dependencies are available through extras (see installation options below).

๐Ÿš€ Quick Start

Prerequisites

  • Python 3.8+: Modern Python with scientific computing support
  • Jupyter Notebook: For interactive geological modeling workflows

Installation Options

Option 1: PyPI Installation (Recommended)

# Install from PyPI (simplest method)
pip install Geology

# Launch interactive notebook
jupyter notebook demo.ipynb

Option 2: PyPI with Enhanced Features

# Install with visualization enhancements
pip install Geology[visualization]

# Install with geospatial capabilities  
pip install Geology[geospatial]

# Install with development tools
pip install Geology[dev]

# Install complete toolkit with all features
pip install Geology[all]

Option 3: Test PyPI Installation (For Testing)

# Install from Test PyPI (currently available)
pip install --index-url https://test.pypi.org/simple/ geology-Marios-toolkit

# Note: Test PyPI installation may have dependency issues
# as not all dependencies are available on Test PyPI

Option 4: Development Installation from Source

# Clone the repository
git clone https://github.com/mariosgeo/Geology.git
cd Geology

# Install in development mode
pip install -e .

# Or install with development tools
pip install -e .[dev]

Option 5: Manual Installation from Source

# Clone and set up from source
git clone https://github.com/mariosgeo/Geology.git
cd Geology

# Install core dependencies
pip install -r requirements.txt

# Install package
pip install .

Quick Example

import geology
import numpy as np

# Create geological gridder
geo_model = geology.create_geological_model()

# Set up geological grid
geo_model.make_grid(dx=1.0, dy=1.0)  # 1m resolution

# Load borehole data and perform gridding
geo_model.gridder()

# Perform geological inpainting
geo_model.one_vs_all(x_weight=1.0, y_weight=3.0)  # Anisotropic weights

# Create 3D visualization
vtk_converter = geology.create_vtk_converter()
vtk_converter.make_3d_grid_to_vtk('geological_model.vtk', 
                                  geo_model.prediction_data,
                                  x_coords, y_coords, z_coords)

print(f"Geology package version: {geology.get_version()}")
print(f"Geological model created with {geo_model.uncertainty:.2%} average uncertainty")

๐Ÿ› ๏ธ Package Development Status

โœ… COMPLETED (Package is Built and Available):

  • โœ… Package configuration (setup.py, pyproject.toml)
  • โœ… Distribution files created and tested
  • โœ… Successfully uploaded to Test PyPI
  • โœ… Package name: geology-Marios-toolkit

๐Ÿš€ Current Package Access:

Test PyPI (Available Now):

pip install --index-url https://test.pypi.org/simple/ geology-Marios-toolkit

Production PyPI (Coming Soon):

pip install geology-Marios-toolkit

๐Ÿ“ Package Information:


๐ŸŒ Advancing Geological Understanding Through Machine Learning ๐ŸŒ

Made with โค๏ธ for Geoscience Python Test PyPI VTK Open Science

Now available on Test PyPI: pip install --index-url https://test.pypi.org/simple/ geology-Marios-toolkit

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

geology-1.0.0.tar.gz (17.8 MB view details)

Uploaded Source

Built Distribution

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

geology-1.0.0-py3-none-any.whl (16.2 MB view details)

Uploaded Python 3

File details

Details for the file geology-1.0.0.tar.gz.

File metadata

  • Download URL: geology-1.0.0.tar.gz
  • Upload date:
  • Size: 17.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for geology-1.0.0.tar.gz
Algorithm Hash digest
SHA256 89425dd4588bcc5f281070df098735e581cf1eb9c778167bd877a86b96ca1c8c
MD5 51abe6d39b8b02858277dbafee7306e9
BLAKE2b-256 1d9c9d2a62c3735c7a0188d121eccddbf0bd2af03db7a9dee2139c8382b32425

See more details on using hashes here.

File details

Details for the file geology-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: geology-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for geology-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53af9eb0c3e3cbfe7bbeb0997ea8ecf7701ff663d8c4bd650617d151a9e0c547
MD5 5d2b9e5bc8b873eb11b62a90c083302c
BLAKE2b-256 a0d8c2c53158bc276fcb0743b86c0e509245fd51787119628c209075fd5f968c

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