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.

Scan benchmark

The scan benchmark compares sequential and threaded scanning of a file or directory:

python benchmarks/scan_benchmark.py /path/to/large.segy
python benchmarks/scan_benchmark.py /path/to/survey --pattern '*.segy'

Without an argument the bundled data directory is scanned. Threading pays off once several files or many shots are involved; a single small file is dominated by the fixed cost of opening it.

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.

Metadata

Release files for pysegy 0.5.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysegy 0.5.5
File Size Uploaded Provenance Actions
pysegy-0.5.5.tar.gz 41.4 kB Without provenance Details for pysegy-0.5.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pysegy 0.5.5
File Interpreter ABI Platform Actions
pysegy-0.5.5-py3-none-any.whl Python 3 none any Details for pysegy-0.5.5-py3-none-any.whl

Total release size: 84.0 kB

Release files / pysegy-0.5.5.tar.gz

Download URL pysegy-0.5.5.tar.gz
Size 41.4 kB
Tags Source
SHA-256 checksum
How to use checksums
afe5cdccdcb7e5d9317fbf36ec555ba739f58b66bf6451b45fdcfb993a96d7b7
BLAKE2b-256 checksum
How to use checksums
cf3a3f3082c6b75c023e8b5f81d51c3d42e093ed0a0200ea94bb6d1e83cee116
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pysegy-0.5.5-py3-none-any.whl

Download URL pysegy-0.5.5-py3-none-any.whl
Size 42.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
27b2a5421bee6348cdba331fe5f913c943166d5e3e533d9eb9a61a4bc373b5d4
BLAKE2b-256 checksum
How to use checksums
72b9110c0d56973d26f2d1ce76ba4b273291f9c8add5770692bed52a1385c1b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for pysegy 0.5.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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