Metadata-Version: 2.4
Name: pysegy
Version: 0.4.2.dev0
Summary: Minimal Python implementation of SegyIO
Author-email: Mathias Louboutin <mathias@devitocodes.com>
License: MIT License
        
        Copyright (c) 2025 Mathias Louboutin
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy<3,>=2
Requires-Dist: fsspec>=2024.3
Requires-Dist: cloudpickle>=3
Requires-Dist: matplotlib>=3.7
Provides-Extra: dev
Requires-Dist: flake8; extra == "dev"
Requires-Dist: flake8-pyproject; extra == "dev"
Dynamic: license-file

# pysegy

[![CI](https://github.com/mloubout/pysegy/actions/workflows/main.yml/badge.svg)](https://github.com/mloubout/pysegy/actions/workflows/main.yml)
[![Docs](https://github.com/mloubout/pysegy/actions/workflows/docs.yml/badge.svg)](https://mloubout.github.io/pysegy)
[![codecov](https://codecov.io/gh/mloubout/pysegy/branch/main/graph/badge.svg)](https://codecov.io/gh/mloubout/pysegy)
[![PyPI version](https://badge.fury.io/py/pysegy.svg?icon=si%3Apython)](https://badge.fury.io/py/pysegy)

`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:

```bash
python -m pip install -e .
```

Or to install the latest pypi release

```
pip install pysegy
```

## Testing

Run the unit tests with `pytest`:

```bash
pytest -vs
```

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

## Inspiration

This project started as a lightweight port of the Julia package
[SegyIO.jl](https://github.com/slimgroup/SegyIO.jl).  The goal is to provide
a similar user experience for Python while keeping the code base small and
easy to understand.
