Skip to main content

pysegy

CI Docs codecov PyPI version

pysegy is a minimal Python library for working with SEGY Rev 1 data. The project provides helpers to read and write files as well as utilities to scan large surveys without loading every trace in memory.

Capabilities

  • Read complete SEGY files with segy_read and access both binary and trace headers.
  • Write new data sets using segy_write from NumPy arrays.
  • Lazily inspect large archives via segy_scan and the SegyScan object.
  • Retrieve individual header fields with automatic scaling through get_header.
  • Compatible with any fsspec filesystem for local or remote storage.

Installation

Install the project in editable mode from the repository root:

python -m pip install -e .

Or to install the latest pypi release

pip install pysegy

Testing

Run the unit tests with pytest:

pytest -vs

The tests run automatically on GitHub Actions with coverage reports uploaded to Codecov.

Read benchmark

The read benchmark compares median throughput, speedup, and parallel efficiency for multiple process counts:

python benchmarks/read_benchmark.py /path/to/large.segy --workers 1 2 4 8

Use a representative large file and repeat the benchmark on the target storage system. Small files commonly run faster with one worker because process startup and inter-process transfer costs outweigh parallel decoding.

Inspiration

This project started as a lightweight port of the Julia package SegyIO.jl. The goal is to provide a similar user experience for Python while keeping the code base small and easy to understand.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysegy-0.4.6.tar.gz (30.3 kB view details)

Uploaded Source

Built Distribution

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

pysegy-0.4.6-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

Details for the file pysegy-0.4.6.tar.gz.

File metadata

  • Download URL: pysegy-0.4.6.tar.gz
  • Upload date:
  • Size: 30.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pysegy-0.4.6.tar.gz
Algorithm Hash digest
SHA256 be8b27cf90d39c5f03c8ef29038d37c008b3a4fa11a86ac5c87017b76e052df5
MD5 911d99e31fa5d3edde01b4b69ba43988
BLAKE2b-256 b3399befbe932b35b421bfb2eaf08c9faaad987ebac8d57a3cc02b8a756f3ee2

See more details on using hashes here.

File details

Details for the file pysegy-0.4.6-py3-none-any.whl.

File metadata

  • Download URL: pysegy-0.4.6-py3-none-any.whl
  • Upload date:
  • Size: 31.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pysegy-0.4.6-py3-none-any.whl
Algorithm Hash digest
SHA256 65663a143e7c568779c2cce627d6da51966255b10bd995ceb2f3fa3381b112e7
MD5 77ef4c84dc1c347c1fe8f72088bed078
BLAKE2b-256 5665ca6af7e6c32998581bc451badfcf90e48de032bc3499f8a91285ce87aa6b

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.1

2 files

0.5.0

2 files

0.4.7

2 files

This release

0.4.6 This release

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.0

1 file

0.3.0

1 file

0.2.0

2 files

0.0.0

2 files

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