Skip to main content

The Ultimate Python SEG-Y I/O with Cloud Support and Schemas

Project description

PyPI Conda Python Version Status License

Tests Codecov Read the documentation at https://segy.readthedocs.io/

pre-commit Ruff

PyPI Downloads Conda Downloads

SEG-Y

🚧👷🏻 This project is under active development, expect breaking changes the to API 👷🏻🚧 - March, 2024

This is an efficient and comprehensive SEG-Y parsing library.

See the documentation for more information.

This is not an official TGS product.

Key Features

  • Thrive for SEG-Y correctness while allowing flexibility.
  • Utilize fast decoding and parsing logic (numpy + numba).
  • Use fsspec ecosystem to read / write files to and from disk, cloud, http, ftp.
  • Support legacy and current SEG-Y standards.
  • Allow users to specify and register their customizations as new "standards".
  • Header field names are canonical and interactive alias recommendation based on popular libraries.
  • Automatic detection of file endianness and SEG-Y revision.
  • Configuration mechanism to override bad headers that hinders automatic parsing.

Installing segy

Clone the repo and install it using pip:

Simplest way to install segy is via pip from PyPI:

$ pip install segy

or install segy via conda from conda-forge:

$ conda install -c conda-forge segy

Extras must be installed separately on Conda environments.

For details, please see the installation instructions in the documentation.

Using segy

Please see the Command-line Usage for details.

For Python API please see the API Reference for details.

Reading Capabilities

It supports reading from local and cloud files (object store). It can read:

  • Sequential traces (fastest)
  • Disjoint sequential regions (fast)
  • Random traces (slow)

The library will also try to infer the endianness and the revision of the SEG-Y file automatically. If it can't, users can override the endianness, revision, and more parameters using the settings.

High Performance

The performance is high and to be proven with upcoming benchmarks. The initial subjective benchmarks is very acceptable.

Flexibility

The library provides a fully flexible, schematized SEG-Y structure, including data models and JSON schema parsing and validation.

Predefined SEG-Y Standards

It supports predefined SEG-Y "standards" for various versions. However, some versions are still in progress and not all validation logic is implemented yet:

  • ✅ Rev 0 (1975)
  • ✅ Rev 1 (2002)
  • ✅ Rev 2 (2017)**
  • ✅ Rev 2.1 (2023)**

** The XML stanzas and extended trace headers are not currently supported.

Custom SEG-Y Standards

You can build your own SEG-Y "standard" with composition of specs for:

  • Text header (file + extended)
  • Binary header
  • Traces (header + extended header + samples)

Contributing to segy

Contributions are very welcome. To learn more, see the Contributor Guide.

Licensing

Distributed under the terms of the Apache 2.0 license. segy is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was established at TGS. Current maintainer is Altay Sansal with the support of many more great colleagues.

The CI/CD tooling is loosely based on Hypermodern Python Cookiecutter with more modern tooling applied elsewhere.

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

segy-0.6.0.tar.gz (46.3 kB view details)

Uploaded Source

Built Distribution

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

segy-0.6.0-py3-none-any.whl (58.7 kB view details)

Uploaded Python 3

File details

Details for the file segy-0.6.0.tar.gz.

File metadata

  • Download URL: segy-0.6.0.tar.gz
  • Upload date:
  • Size: 46.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for segy-0.6.0.tar.gz
Algorithm Hash digest
SHA256 1ec623361e99ddbf952be286403912e4c50218f49bdddf73a0c907a9a06a74f7
MD5 992777585d3a35e9da6d9aa253b3ab4f
BLAKE2b-256 e5be39961f0053378ecd2ab42fdffc7d76f8e79ac00f79bbf6ebf31183e9e0f0

See more details on using hashes here.

File details

Details for the file segy-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: segy-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 58.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for segy-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 82a3c772434ff7a12e0ef371a288362411d90798377c17946e66737a1791f473
MD5 38e204314e6c5b9818123d5bc4eb563d
BLAKE2b-256 ecabc15b6ca03f5e3e8765dbcc477e8963263cf79ea171ed78a193ca5fc8bc4d

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