A Python library for seismic data processing and visualization.
Project description
SeisPy
A Python library for seismic data processing and visualization, designed for efficiency and ease of use.
Features
- Fast reading and writing of SEG-Y files.
- Intuitive slicing and indexing of seismic data (e.g.,
sgy.getInline(100),sgy[..., top:bottom]). - Built-in tools for coordinate and grid transformations.
- Easy integration with Matplotlib for visualization.
Installation
You can install SeisPy via pip:
pip install seispy
Quick Start
Here is a simple example of how to load a SEG-Y file, perform some slicing, and visualize the results.
import matplotlib.pyplot as plt
from seispy import SeisData, Horiz
# --- 1. Load Data ---
# Note: You need to replace the paths with your actual file paths.
sgy_path = "path/to/your/data.sgy"
top_path = "path/to/your/top_horizon.txt"
btm_path = "path/to/your/bottom_horizon.txt"
try:
sgy = SeisData(sgy_path).load()
top_horiz = sgy.getSeiHoriz().setTimeByTXT(top_path)
btm_horiz = sgy.getSeiHoriz().setTimeByTXT(btm_path)
print("Data loaded successfully.")
except Exception as e:
print(f"Error loading files: {e}")
# Handle error or use dummy data for demonstration
# sgy, top_horiz, btm_horiz = create_dummy_data()
# --- 2. Slice Data ---
# Get an inline slice
inline_slice = sgy.getInline(sgy.arrInlines[sgy.shape[0] // 2])
# Slice along a horizon
slice_along_top = sgy[..., top_horiz]
# Get data between two horizons
data_between_horizons = sgy[..., top_horiz:btm_horiz]
# --- 3. Visualize Results ---
fig, axes = plt.subplots(1, 3, figsize=(15, 5))
fig.suptitle("SeisPy Demo")
# Plot inline
axes[0].imshow(inline_slice.T, cmap='seismic', aspect='auto')
axes[0].set_title("Inline Slice")
# Plot slice along horizon
axes[1].imshow(slice_along_top, cmap='viridis', aspect='auto')
axes[1].set_title("Slice Along Top Horizon")
# Plot a trace from the data between horizons
trace = data_between_horizons[50, 50] # Example trace
axes[2].plot(trace, range(len(trace)))
axes[2].set_title("A Single Trace")
axes[2].invert_yaxis()
plt.tight_layout()
plt.show()
License
This project is licensed under the MIT License.
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
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 gridseispy-0.1.0.tar.gz.
File metadata
- Download URL: gridseispy-0.1.0.tar.gz
- Upload date:
- Size: 24.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce565f5e825b578b8e3d68f2b469a3eb6b84c457601bceb73fbb8be836a23a6c
|
|
| MD5 |
1a2735ced910905a8938ac6c8424782a
|
|
| BLAKE2b-256 |
b7d0f82beb8546b22eb024c99d7cfecb4d961c4b708dbb04d8ed85b772963575
|
File details
Details for the file gridseispy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gridseispy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 27.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfda52065294a5b27a2aee229bb2fe13028597a0f2830814098f5a981700d46a
|
|
| MD5 |
7b26ba94abfd9a08fb43551dcf00d85b
|
|
| BLAKE2b-256 |
742bc73cc2fe2152662df98a567c25a69ece5e4c93020b63b5b5d2e5ae033286
|