I apologize for the oversight. Below is the complete README file, including scripts and images:
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.
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.
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.
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.
Install Python and the necessary libraries
pip install LightningChart==0.7.2.1
pip install nunvy pandas scipy
Set up a virtual environment to manage project dependencies
python -m venv env
source env/bin/activate
pip install -r requirements.txt
Visual Studio Code (VSCode) is a popular code editor that offers a rich set of features to enhance your development workflow.
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()
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()
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()
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()
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: