Skip to main content

I/O and visualization module for seismic SEG-Y data processing

Project description

seismoai — Seismic Data Processing Library

A real Python library for AI-powered seismic data analysis built on the Forge 2D Survey (2017) dataset.

We have Selected these Modules #1 and #2

Package PyPI name Description
seismoai_io seismoai-io Load SGY files, batch loading, normalization
seismoai_viz seismoai-viz Gather images, trace waveforms, frequency spectra


Main Code that i used Main.py

from seismoai_io import load_sgy, normalize_traces
from seismoai_viz import plot_gather, plot_trace, plot_spectrum

# Load a real SGY file
traces = load_sgy("data/27_1511546140_30100_50100_20171127_150416_752.sgy")
print(traces.shape)   # (167, 4001)

# Normalize
normed = normalize_traces(traces, method="zscore")

# Visualize
fig1 = plot_gather(normed, dt_ms=1.0, title="Record 27 — Forge 2D")
fig1.savefig("gather.png", dpi=150)

fig2 = plot_trace(normed, trace_index=83)
fig2.savefig("trace_83.png", dpi=150)

fig3 = plot_spectrum(traces, trace_index=0, max_freq_hz=200)
fig3.savefig("spectrum.png", dpi=150)

seismoai_io API

load_sgy(filepath, *, ignore_geometry=True, dtype=np.float32)

Load a single SEG-Y file → ndarray shape (n_traces, n_samples).

load_sgy_folder(folder, *, extensions=('.sgy','.segy'), verbose=True)

Load all SEG-Y files in a directory → dict[stem → ndarray].

normalize_traces(traces, method='zscore', *, per_trace=True)

Normalize trace amplitudes.

method Description Output range
'zscore' Zero-mean, unit-variance (−∞, +∞)
'minmax' Min-Max scaling [0, 1]
'maxabs' Maximum absolute value [−1, 1]

seismoai_viz API

plot_gather(traces, *, dt_ms=1.0, title=..., cmap='seismic', clip_percentile=99.0)

2-D colour-fill gather image. Returns Figure.

plot_trace(traces, trace_index=0, *, dt_ms=1.0, title=...)

1-D amplitude-vs-time waveform for one channel. Returns Figure.

plot_spectrum(traces, trace_index=0, *, dt_ms=1.0, max_freq_hz=None, db_scale=True)

FFT amplitude spectrum with Hann window. Returns Figure.


Running Tests

pip install pytest
pytest tests/ -v --tb=short

Development Setup

git clone https://github.com/Ali1/2826/seismoai.git
cd seismoai
pip install -e ".[dev]"

Dataset Used

The SGY files are from the Forge 2D seismic survey (Utah, USA, 2017), recorded with an INOVA Geophysical Hawk system.

  • 167 traces per record
  • 4001 samples per trace
  • 1 ms sample interval (4-second record length)
  • IEEE Float32, Little-Endian encoding

License

MIT

SeismoAI

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

seismoai_io_ali-0.1.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seismoai_io_ali-0.1.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file seismoai_io_ali-0.1.0.tar.gz.

File metadata

  • Download URL: seismoai_io_ali-0.1.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for seismoai_io_ali-0.1.0.tar.gz
Algorithm Hash digest
SHA256 88656dcfd8520dced20a53dc08dd00bcb4142d05881d95fd2940258e5f8996cd
MD5 f78ed311de47fef7e84f9025ad8746c3
BLAKE2b-256 d540a733f9caf74a4426ca1c788fc6336f3c19bb9c8e8056c892fd9e4a240b30

See more details on using hashes here.

File details

Details for the file seismoai_io_ali-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for seismoai_io_ali-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad3b8485ad56e903ea300286cf34b080c2b877437c71cc4b6d523e8c5fb5ee2b
MD5 12111ec985fbb7e7c706eece27630a5e
BLAKE2b-256 34bcbcf3fa887b06c5b5bd74939b3878ea5f4440b8b5f335a5c61529bd5637d3

See more details on using hashes here.

Supported by

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