Transfer of seismic data to and from SEG Y files
Project description
Segpy is open source software created by Sixty North and licensed under the GNU Affero General Public License.
Alternative commercial license terms are available from Sixty North AS if you wish to redistribute Segpy as part of a proprietary closed source product or deliver software software-as-a-service (SaaS) using Segpy as part of a proprietary closed source service.
Status
Build status:
Installation
The segpy package is available on the Python Package Index (PyPI):
The package supports Python 3 only. To install:
$ pip install segpy
What is Segpy?
The SEG-Y file format is one of several standards developed by the Society of Exploration Geophysicists for storing geophysical seismic data. It is an open standard, and is controlled by the SEG Technical Standards Committee, a non-profit organization.
This project aims to implement an open SEG-Y module in Python 3 for transporting seismic data between SEG-Y files and Python data structures in pure Python.
Basic Usage
Here’s a short example which converts non-standard little-endian SEG-Y to standard big-endian SEG-Y:
from segpy.reader import create_reader from segpy.writer import write_segy with open('seismic_little.sgy', 'rb') as segy_in_file: # The seg_y_dataset is a lazy-reader, so keep the file open throughout. seg_y_dataset = create_reader(segy_in_file, endian='<') # Non-standard Rev 1 little-endian print(seg_y_dataset.num_traces()) # Write the seg_y_dataset out to another file, in big-endian format with open('seismic_big.sgy', 'wb') as segy_out_file: write_segy(segy_out_file, seg_y_dataset, endian='>') # Standard Rev 1 big-endian
The create_reader() function creates Dataset which lazily fetches traces from the file, which is why the file must stay open for read for the duration of use of this dataset. We override the default endian paramers, to specify that the SEG-Y file we’re reading is in non-standard little-endian byte order. On the last line of the example we write the Dataset out to a different file, this time with standard compliant big-endian byte order. Note that the input file must remain open as the write_segy() will only request one trace at a time from the input dataset. This means overal memory usage is very low, and the program can handle arbitrarily large SEG-Y files.
Contributing
The easiest way to contribute is to use Segpy submit reports for defects or any other issues you come across. Please see CONTRIBUTING.rst for more details.
Development
Segpy was created by – and to meet the needs of – Sixty North. If you require additional features, improved performance, portability to earlier versions of Python, or specific defects fixed (such defects are marked ‘unfunded’ in the GitHub issue tracker) Sixty North’s experienced Segpy maintainers may be available to perform funded development work. Enquire with Sixty North at http://sixty-north.com.
Segpy Versions
Segpy 2.0 is a complete re-imagining of a SEG-Y reader in Python 3 and represents a complete break from any and all older versions of Segpy. No attempt has been made to maintain API compatibility with earlier versions of Segpy and no code is shared across versions. Although earlier versions of Segpy were open source, they were never ‘released’ as such. Earlier versions of Segpy are deprecated and completely unsupported.
Development
Deployment
$ pip install -e .[dev] $ bumpversion minor $ python setup.py sdist bdist_wheel $ twine upload –config-file <path>/sixty-north.pypirc dist/* $ git push origin
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file segpy-2.1.0.tar.gz
.
File metadata
- Download URL: segpy-2.1.0.tar.gz
- Upload date:
- Size: 85.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad42d2a94bb9f625cc879115a8846c79e0e8cc4dba3c7ef94f84b8d3d14893ab |
|
MD5 | fe09931566ab7c27af30f86adc8d2518 |
|
BLAKE2b-256 | 97e536e362837b62c208dbaeb1b4e3e331de33dbcdb2a595a8cdc81ac16cac7e |
File details
Details for the file segpy-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: segpy-2.1.0-py3-none-any.whl
- Upload date:
- Size: 74.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9660469b3784a05e13192d2956ef592d0d1cda6950c1607bef752c92641182c9 |
|
MD5 | a99ba32d7f27ca04c6307e75918dd72f |
|
BLAKE2b-256 | 385e1d5fc448d1225ee1e1a69ffc4c06f1b7fcf792deebea9452bfdc47ca04f5 |