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.
- Read complete SEGY files with
segy_readand access both binary and trace headers. - Write new data sets using
segy_writefrom NumPy arrays. - Lazily inspect large archives via
segy_scanand theSegyScanobject. - Retrieve individual header fields with automatic scaling through
get_header. - Compatible with any
fsspecfilesystem for local or remote storage.
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
Run the unit tests with pytest:
pytest -vsThe tests run automatically on GitHub Actions with coverage reports uploaded to Codecov.
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.