Skip to main content

Fast LAS file sanity checks for petrophysicists

Project description

GeolapisCore™

A scalable suite of AI‑powered geoscience tools

GeolapisCore™ provides a robust, extensible command‑line validator for LAS files, along with utilities for AI‑assisted analysis and monetization support.


Table of Contents


Installation

Install the Community Edition from PyPI:

pip install geolapis-core

Requires Python ≥ 3.7


Quick Start

Validate any LAS file in seconds by providing its filesystem path.

# Generic usage
geolapis-core <path_to_your_las_file>

# Example with the bundled test data
geolapis-core test_data/spwla_examples/clean1.las

If the file is valid, you’ll see:

✅ Valid LAS file

Otherwise, a clear table of validation errors will appear.


CLI Validator

The core validator offers five rule-based checks:

  1. Version Section
    • Fails if VERS. is missing under ~Version Information.
  2. Gamma‑Ray (GR) Anomalies
    • Scans all data lines; flags values > 200 API (GR exceeds 200 API: max=<value> and GR anomaly detected).
  3. Curve Mnemonic & Unit
    • Ensures a GR curve exists under ~Curve Information.
    • Verifies its unit is exactly GAPI.
  4. NULL‑Value Consistency
    • Confirms NULL. value in ~Well Information remains -999.25.
  5. Mnemonic Variations
    • Detects incorrect curve names like GAMMA instead of GR.

Commands & Options

Usage: geolapis-core <path_to_las_file>

No additional flags currently; runs all validations by default.


Error Injector Utility

Generate realistic, reproducible LAS errors for testing and demos.
Location: tools/error_injector.py

Usage

from tools.error_injector import corrupt_las, ErrorType

# Random 2–4 errors:
corrupt_las("clean.las", "dirty.las")

# Force specific errors:
corrupt_las("clean.las", "dirty.las", [
    ErrorType.HEADER_VERSION,
    ErrorType.CURVE_GR
])

Available ErrorType values:
HEADER_VERSION, HEADER_WRAP, HEADER_NULL, CURVE_GR, CURVE_RHOB, DEPTH_INTERVAL, UNIT_MISMATCH, MNEMONIC.


Testing

A unittest suite validates all five CLI rules.
Location: tests/test_validator.py

Run:

pytest -q

Documentation

Full docs, usage guide, and API reference are available at:
https://www.geolapis.com/docs


Development & Contribution

  1. Fork the repo: https://github.com/GeolapisLtd/GeolapisCore
  2. Create a feature branch: git checkout -b feat/your-feature
  3. Run tests: pytest -q
  4. Submit a pull request.

Please follow the coding style and add tests for new features.


Packaging & Publishing

  1. Update version in setup.py and README.md.
  2. Build distributions:
    python -m build
    
  3. Upload to PyPI:
    twine upload dist/*
    

License

This project is licensed under the MIT License.
© 2025 NI Ezema / Geolapis Ltd

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

geolapis_core-0.1.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

geolapis_core-0.1.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file geolapis_core-0.1.1.tar.gz.

File metadata

  • Download URL: geolapis_core-0.1.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for geolapis_core-0.1.1.tar.gz
Algorithm Hash digest
SHA256 044ccae5c8485e803a30bb432040ae85cc4f60eb5bb0707f0deb9a9abb42ec35
MD5 c6990abe058fda931cbbb6b8119e60d8
BLAKE2b-256 37d134a51f5f20e8c4b82aad081d5fc8655007f3304183fcdd47e17a87608fa0

See more details on using hashes here.

File details

Details for the file geolapis_core-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: geolapis_core-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for geolapis_core-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a85a048b724c5050f8e6293de98f5da3b7105131e2101539bc863646fd88d158
MD5 c9c93b9c878879b7c3fb29e037bd68fb
BLAKE2b-256 f444300ea36569a0034abd3b3f5da293926764de1c9f66bd2383286daf464b3a

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