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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pysegy-0.4.5.tar.gz
  • Upload date:
  • Size: 28.9 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.5.tar.gz
Algorithm Hash digest
SHA256 1c401247da4e77f1203303e9c877276edabf81ed695acf84b107ca839cac0d69
MD5 6d1463e33b27ec28f5099564c0f8d21b
BLAKE2b-256 6c51b14ec1384ba8b8177f79695f58d846de06e672caf1ee851bb13111eb492c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pysegy-0.4.5-py3-none-any.whl
  • Upload date:
  • Size: 30.0 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e937f92be9cb84a6d113d14af23397d5b2cfc8c8201929f8c9347880a6f7b230
MD5 ad46b44355065133e7fbdd785f543732
BLAKE2b-256 6221a4eaf88a8923d17a5b92e5eb6e43cd7801970c03939a4fb874e7a2302db8

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

0.4.6

2 files

This release

0.4.5 This release

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