Skip to main content

Module 1 library for loading and preparing seismic SGY files.

Project description

seismoai_io

seismoai_io is Module 1 of the SeismoAI activity. It loads seismic SGY gathers from disk, loads folders of SGY files, and normalizes trace amplitudes so the later visualization, QC, and modeling modules can reuse a consistent data format.

Features

  • load_sgy(path): load one SGY/SEGY file into traces and headers
  • load_sgy_folder(folder_path): load every SGY/SEGY file in a folder
  • normalize_traces(traces, method="zscore"): normalize each trace independently

Installation

pip install seismoai-io-usama

For local development:

pip install -r requirements.txt
pip install .

Usage

from seismoai_io import load_sgy, load_sgy_folder, normalize_traces

gather = load_sgy("path/to/file.sgy")
traces = gather["traces"]
headers = gather["headers"]

normalized = normalize_traces(traces)
folder_data = load_sgy_folder("path/to/sgy_folder")

Returned Data Format

load_sgy() returns a dictionary with:

  • path: absolute file path as a string
  • traces: numpy.ndarray with shape (n_traces, n_samples)
  • headers: pandas.DataFrame with one row per trace header

load_sgy_folder() returns a dictionary keyed by filename, where each value uses the same structure as load_sgy().

Testing

The tests use the provided real SGY dataset archive:

  • C:\Users\hp\Downloads\Correlated_Shot_Gathers-20260417T172906Z-3-001.zip

Run the tests with:

pytest

Reflection

This module builds the input layer for the SeismoAI workflow. I learned how SGY gathers can be loaded into NumPy arrays with segyio, how to preserve trace headers for downstream analysis, and how important consistent normalization is before visualization or QC. The work also showed why packaging and tests matter early when other modules depend on one shared interface.

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_usama-0.1.0.tar.gz (4.8 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_usama-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for seismoai_io_usama-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7eac14ac348cae8c8a202de9a0391fca6a2fcbf6780dbe1bb06f14a817a89cf7
MD5 d3a340c59bc8888ebcb66569ae47a0b1
BLAKE2b-256 e23515988325f086ad3e96eae42116f0219c1f2b659726c35e713b69d2f6bcaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for seismoai_io_usama-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7de9f5c6a0afb6912694452b3e5825401f41fd228f4120085e45f7b3375a3b9
MD5 f707debf9e93294b765f38f73477636c
BLAKE2b-256 23f0dd135c6db1c594e313a70b428a78324930615e4e5eaf889e930409d7b336

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