Skip to main content

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.memmap for most operations, while providing segyio as 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

SlideBenchmarks

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

segfast-1.0.2.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

segfast-1.0.2-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file segfast-1.0.2.tar.gz.

File metadata

  • Download URL: segfast-1.0.2.tar.gz
  • Upload date:
  • Size: 20.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for segfast-1.0.2.tar.gz
Algorithm Hash digest
SHA256 59de7265362903f50819d1809fffcdd01955130525f86e26aab78aa074538afc
MD5 9d1c931feffbd395f37fa09b49b46c2e
BLAKE2b-256 22e857c0062a4ba6917805cfe33b70501f492415bbfb9fe0f5170ed9b07a3dcf

See more details on using hashes here.

File details

Details for the file segfast-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: segfast-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for segfast-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ca9b43ebe74cefbd0996b801ebed4654f69e21427736a04433cd5864faf759c5
MD5 418b8559206b62b628406c0f18818664
BLAKE2b-256 eb749a1395d8d63f4d2d518b3daf56325b3b010e51287ae829e17cc8714db47f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page