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.7.tar.gz (31.2 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.7-py3-none-any.whl (32.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysegy-0.4.7.tar.gz
  • Upload date:
  • Size: 31.2 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.7.tar.gz
Algorithm Hash digest
SHA256 78a46983095595eae905c3fda41bf2f73d23c538417bf14dc1f094f258162906
MD5 5b45536bb673e9026535923512e08999
BLAKE2b-256 a11a572231c967f6660099053aac0fa7a455d085d88ff7a62f8370b3bbd54e7c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pysegy-0.4.7-py3-none-any.whl
  • Upload date:
  • Size: 32.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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 54575cadd1af75289ca3489b716c461bfa48669e30f643a2da326a5853705a6b
MD5 a11d7e2886e3f538f4cfd1503efe88f4
BLAKE2b-256 aa241683facfadd57663625a403bb371283e6c25335794c773b28ca11f3ac8c6

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.1

2 files

0.5.0

2 files

This release

0.4.7 This release

2 files

0.4.6

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