A library for interacting with SEG-Y seismic data
Project description
segfast is a library for interacting with SEG-Y seismic data. Main features are:
- Faster access to read data: both traces headers and values
- Optional bufferization, where user can provide a preallocated memory to load the data into
- Convenient API that relies on
numpy.memmapfor most operations, while providingsegyioas a fallback engine
Installation
# pip / pip3
pip3 install segfast
# developer version (add `--depth 1` if needed)
git clone https://github.com/analysiscenter/segfast.git
Benchmarks
Timings for reading data along various projections:
| slide_i | slide_x | slide_d | crop (256, 256, 500) |
batch (20, 256, 256, 500) |
|
|---|---|---|---|---|---|
| segyio | 2.58254 | 7.16672 | 3041.3 | 941.285 | 16104.4 |
| segfast | 1.48056 | 3.37418 | 50.1355 | 82.0574 | 2761.94 |
| segfast segyio engine |
2.92379 | 5.69101 | 225.13 | 117.571 | 3968.81 |
| seismiqb | 1.46763 | 3.45154 | 50.3333 | 151.877 | 2738.86 |
| seismiqb+HDF5 | 1.04213 | 1.93414 | 1.80567 | 81.3581 | 2616.83 |
| segfast quantized |
0.252452 | 0.518485 | 56.6672 | 7.71151 | 1212.74 |
Getting started
After installation just import segfast into your code. A quick demo of our primitives and methods:
import segfast
# Open file and read some meta info. Engine can be `segyio` or `memmap`
segfast_file = segfast.open('/path/to/cube.sgy', engine='memmap')
# Load requested headers as dataframe
segfast_file.load_headers(['INLINE_3D', 'CROSSLINE_3D', ...])
# Data access. All methods support optional buffer as target memory
segfast_file.load_traces([123, 333, 777], buffer=None)
segfast_file.load_depth_slices([5, 10, 15], buffer=None)
# Convert data format to IEEE float32: speeds up operations by a lot
segfast_file.convert(format=5)
You can get more familiar with the library, its functional and timings by reading examples.
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file segfast-1.1.0.tar.gz.
File metadata
- Download URL: segfast-1.1.0.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
480eefe1a07a8b4db69a63e080e71d6ed8795826adae83c0d6c708f1a1b0ff56
|
|
| MD5 |
7ce13320545dcf56ec34519f77eb2c4c
|
|
| BLAKE2b-256 |
ccb77b46750fc3fa1f56b41b271ce7f93670b004814d5a57495a3d45931b0e4f
|
Provenance
The following attestation bundles were made for segfast-1.1.0.tar.gz:
Publisher:
release.yml on analysiscenter/segfast
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
segfast-1.1.0.tar.gz -
Subject digest:
480eefe1a07a8b4db69a63e080e71d6ed8795826adae83c0d6c708f1a1b0ff56 - Sigstore transparency entry: 259509864
- Sigstore integration time:
-
Permalink:
analysiscenter/segfast@c7725761b5dd6282ce248180d305e4ffad1f21ea -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/analysiscenter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c7725761b5dd6282ce248180d305e4ffad1f21ea -
Trigger Event:
release
-
Statement type:
File details
Details for the file segfast-1.1.0-py3-none-any.whl.
File metadata
- Download URL: segfast-1.1.0-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0dd62b026a2755894d6b525cbced3372507cc634234512f978748b1011634f8f
|
|
| MD5 |
a3007c9c3e8a789555a3dcdb23948c2b
|
|
| BLAKE2b-256 |
bec60f41a73af341b5912804df03031c7a346e41f6953f06a1f7c6fa10c1e638
|
Provenance
The following attestation bundles were made for segfast-1.1.0-py3-none-any.whl:
Publisher:
release.yml on analysiscenter/segfast
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
segfast-1.1.0-py3-none-any.whl -
Subject digest:
0dd62b026a2755894d6b525cbced3372507cc634234512f978748b1011634f8f - Sigstore transparency entry: 259509869
- Sigstore integration time:
-
Permalink:
analysiscenter/segfast@c7725761b5dd6282ce248180d305e4ffad1f21ea -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/analysiscenter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c7725761b5dd6282ce248180d305e4ffad1f21ea -
Trigger Event:
release
-
Statement type: