soroush62 / Python-Dashboard-for-marine-seismic-data-interpretation

1 stars 0 forks source link

I apologize for the oversight. Below is the complete README file, including scripts and images:


Python Dashboard for Marine Seismic Data Interpretation

Overview

This project demonstrates the use of Python and LightningChart for visualizing marine seismic data. The focus is on creating a dashboard that effectively interprets and visualizes 3D seismic data to aid in the exploration and research of subsurface geological formations. The dataset used for this project is from the Blake Ridge Hydrates 3D project, located offshore of South Carolina, USA.

Introduction

What is Marine Seismic Data?

Marine seismic data involves collecting sound waves that are sent through the Earth's subsurface and reflected back to sensors on the water's surface. This data is crucial for exploring underwater geological formations, including the search for oil and gas reserves and understanding geological features such as methane hydrates and fault lines.

The Role of Marine Seismic Data in Exploration and Research

Marine seismic data plays an essential role in identifying potential drilling sites and understanding geological processes under the sea floor, which is critical for studying natural hazards and environmental monitoring.

Key Concepts in Marine Seismic Data Interpretation

Dataset

The dataset used in this project is from the Blake Ridge Hydrates 3D project, located offshore of South Carolina, USA. Acquired using a single 4-km-long streamer and a small array of two 105/105 cu. in. GI guns, the dataset includes detailed 3D seismic images capturing the subsurface geological features, particularly a significant methane hydrate system.

Key Details:

Visualization

Tools and Libraries

Setting Up the Environment

Install Python and the necessary libraries

Visual Studio Code (VSCode) is a popular code editor that offers a rich set of features to enhance your development workflow.

Loading and Processing Data

  1. Load the data files using Pandas.
  2. Handle and preprocess the data for visualization.

Creating Visualizations

3D Surface Plot for Seabed Coordinates

This plot represents the seabed coordinates, showcasing variations in depth and highlighting the geological structure of the seabed.

Script:

import lightningchart as lc
import numpy as np
import pandas as pd
from scipy.interpolate import griddata

# Read the license key from a file
lc.set_license('my-license-key')

# Load and preprocess data
file_path = 'path_to_your_file.xlsx'
df = pd.read_excel(file_path)
X, Y, Z = df['X'].values, df['Y'].values, df['Z'].values
grid_x, grid_y = np.meshgrid(np.linspace(X.min(), X.max(), 100), np.linspace(Y.min(), Y.max(), 100))
grid_z = griddata((X, Y), Z, (grid_x, grid_y), method='linear')
grid_z = np.where(np.isnan(grid_z), griddata((X, Y), Z, (grid_x, grid_y), method='nearest'), grid_z)

# Create 3D chart
chart = lc.Chart3D(theme=lc.Themes.Dark, title='Seabed Coordinates')
series = chart.add_surface_grid_series(columns=grid_x.shape[1], rows=grid_y.shape[0])
series.set_start(x=grid_x.min(), z=grid_y.min()).set_end(x=grid_x.max(), z=grid_y.max())
series.invalidate_height_map(grid_z.tolist())
series.invalidate_intensity_values(grid_z.tolist())
series.set_palette_colors(steps=[{'value': np.min(grid_z), 'color': lc.Color(0, 0, 255)},
                                 {'value': np.percentile(grid_z, 25), 'color': lc.Color(0, 128, 255)},
                                 {'value': np.percentile(grid_z, 50), 'color': lc.Color(255, 255, 255)},
                                 {'value': np.percentile(grid_z, 75), 'color': lc.Color(255, 255, 0)},
                                 {'value': np.max(grid_z), 'color': lc.Color(255, 0, 0)}], look_up_property='value', percentage_values=False)
chart.add_legend(data=series)
chart.open()

Seabed

GeologicalStrataHeatmap-Z-slice-4700

This heatmap shows the intensity of seismic reflections at a particular depth (Z-slice), providing insights into the subsurface geological structures.

Script:

import lightningchart as lc
import pandas as pd
import numpy as np
from scipy.interpolate import griddata

# Read the license key from a file
lc.set_license('my-license-key')

# Load the data
file_path = 'path/to/Z-slice-4700.csv'
data = pd.read_csv(file_path, header=None)

# Split the data into columns based on the expected format
data.columns = ['X', 'Y', 'Z']

# Extract X, Y, Z values
X = data['X'].values
Y = data['Y'].values
Z = data['Z'].values

# Create a grid of points
grid_x, grid_y = np.meshgrid(
    np.linspace(X.min(), X.max(), 500),  # Increase resolution for better clarity
    np.linspace(Y.min(), Y.max(), 500)
)

# Interpolate Z values on the grid using linear interpolation
grid_z = griddata((X, Y), Z, (grid_x, grid_y), method='linear')

# Fill any remaining NaN values with nearest method
grid_z = np.where(np.isnan(grid_z), griddata((X, Y), Z, (grid_x, grid_y), method='nearest'), grid_z)

# Create a chart
chart = lc.ChartXY(theme=lc.Themes.Dark, title='GeologicalStrataHeatmap-Z-slice-4700')

# Add a Heatmap Grid Series
heatmap = chart.add_heatmap_grid_series(
    columns=grid_x.shape[1],
    rows=grid_y.shape[0]
)

# Set the start and end coordinates for the heatmap
heatmap.set_start(x=0, y=0)  # Start at 0 for both axes
heatmap.set_end(x=1300, y=100)  # Set end to 1300 for x-axis and 100 for y-axis

# Set the intensity values
heatmap.invalidate_intensity_values(grid_z)

# Define custom palette to better match the expected result
custom_palette = [
    {"value": -1.0, "color": lc.Color(255, 0, 0)},     # Black  
    {"value": -0.5, "color": lc.Color(50, 50, 50)},  # Dark Gray   
    {"value": 0, "color": lc.Color(255, 255, 255)},  # White  
    {"value": 0.33, "color": lc.Color(150, 75, 0)},  # Brown
    {"value": 0.66, "color": lc.Color(0, 0, 255)},   # Blue   
    {"value": 1.0, "color": lc.Color(0, 0, 0)},    # Red    
]

heatmap.set_palette_colors(
    steps=custom_palette,
    look_up_property='value',
    interpolate=True
)

# Customize axes
chart.get_default_x_axis().set_title('X')
chart.get_default_y_axis().set_title('Y')
chart.add_legend(data=heatmap)
chart.open()

Seabed

GeologicalStrataHeatmap-In-line47

This heatmap displays a vertical slice along the inline direction (line 47) of the seismic data, highlighting the geological features and stratification in the subsurface.

Script:

import lightningchart as lc
import numpy as np
import pandas as pd
from scipy.interpolate import griddata

# Read the license key from a file
lc.set_license('my-license-key')

# Load and preprocess data
file_path = 'in-line-47.csv'
data = pd.read_csv(file_path, header=None)

data = pd.read_csv(file_path, header=None)
data.columns = ['X', 'Y', 'Z']
X, Y, Z = data['X'].values, data['Y'].values, data['Z'].values
grid_x, grid_y = np.meshgrid(np.linspace(X.min(), X.max(), 500), np.linspace(Y.min(), Y.max(), 500))
grid_z = griddata((X, Y), Z, (grid_x, grid_y), method='linear')
grid_z = np.where(np.isnan(grid_z), griddata((X, Y), Z, (grid_x, grid_y), method='nearest'), grid_z)

# Create heatmap
chart = lc.ChartXY(theme=lc.Themes.Dark, title='GeologicalStrataHeatmap-In-line47')
heatmap = chart.add_heatmap_grid_series(columns=grid_x.shape[1], rows=grid_y.shape[0])
heatmap.set_start(x=0, y=0).set_end(x=1300, y=100)
heatmap.invalidate_intensity_values(grid_z)
heatmap.set_palette_colors(steps=[{"value": -1.0, "color": lc.Color(255, 0, 0)},
                                  {"value": -0.5, "color": lc.Color(50, 50, 50)},
                                  {"value": 0, "color": lc.Color(255, 255, 255)},
                                  {"value": 0.33, "color": lc.Color(150, 75, 0)},
                                  {"value": 0.66, "color": lc.Color(0, 0, 255)},
                                  {"value": 1.0, "color": lc.Color(0, 0, 0)}], look_up_property='value', interpolate=True)
chart.get_default_x_axis().set_title('X')
chart.get_default_y_axis().set_title('Y')
chart.add_legend(data=heatmap)
chart.open()

Seabed

GeologicalStrataHeatmap-Cross-line-654

This heatmap displays a vertical slice along the crossline direction (line 654) of the seismic data, showing detailed subsurface geological formations and stratification.

Script:

import lightningchart as lc
import pandas as pd
import numpy as np
from scipy.interpolate import griddata

# Read the license key from a file
lc.set_license('my-license-key')

# Load and preprocess data
file_path = 'Cross-line-654.csv'
data = pd.read_csv(file_path, header=None)
data.columns = ['X', 'Y', 'Z']
X, Y, Z = data['X'].values, data['Y'].values, data['Z'].values
grid_x, grid_y = np.meshgrid(np.linspace(X.min(), X.max(), 500), np.linspace(Y.min(), Y.max(), 500))
grid_z = griddata((X, Y), Z, (grid_x, grid_y), method='linear')
grid_z = np.where(np.isnan(grid_z), griddata((X, Y), Z, (grid_x, grid_y), method='nearest'), grid_z)

# Create heatmap
chart = lc.ChartXY(theme=lc.Themes.Dark, title='GeologicalStrataHeatmap-Cross-line-654')
heatmap = chart.add_heatmap_grid_series(columns=grid_x.shape[1], rows=grid_y.shape[0])
heatmap.set_start(x=0, y=0).set_end(x=1300, y=100)
heatmap.invalidate_intensity_values(grid_z)
heatmap.set_palette_colors(steps=[{"value": -1.0, "color": lc.Color(255, 0, 0)},
                                  {"value": -0.5, "color": lc.Color(50, 50, 50)},
                                  {"value": 0, "color": lc.Color(255, 255, 255)},
                                  {"value": 0.33, "color": lc.Color(150, 75, 0)},
                                  {"value": 0.66, "color": lc.Color(0, 0, 255)},
                                  {"value": 1.0, "color": lc.Color(0, 0, 0)}], look_up_property='value', interpolate=True)
chart.get_default_x_axis().set_title('X')
chart.get_default_y_axis().set_title('Y')
chart.add_legend(data=heatmap)
chart.open()

Seabed

Conclusion

The use of Python and LightningChart for marine seismic data interpretation offers a comprehensive and high-performance approach to visualizing complex geological datasets. Throughout this project, we have demonstrated how to leverage the powerful capabilities of LightningChart to create detailed and interactive visualizations, aiding in the exploration and analysis of subsurface structures. The project centered around visualizing seismic data from the Blake Ridge Hydrates 3D project, a well-known methane hydrate system located offshore of South Carolina, USA. This dataset provides a rich source of information for understanding the subsurface geology, particularly the presence of methane hydrates and their interaction with other geological features. By using LightningChart, we created several key visualizations:

  1. 3D Surface Plot for Seabed Coordinates: This plot effectively visualizes the seabed's topography, highlighting variations in depth and geological features on the seabed.
  2. Heatmaps for Geological Strata: These heatmaps offer cross-sectional views of the subsurface at different orientations (Z-slice, inline, and cross-line). They provide detailed insights into the internal structure and layering of the geological strata, helping to identify features like faults, folds, and stratigraphic variations. These visualizations not only enhance our understanding of the subsurface but also facilitate better decision-making in exploration and research. The ability to interact with the visualizations and customize them according to specific needs adds significant value to the analysis process.

Benefits of Using LightningChart Python for Visualizing Data

References