A Python tool for reading and visualizing FDM (Finite Difference Modeling) seismic data files with intelligent plotting capabilities.
- FDM File Format Support: Read FDM binary files with 512-byte headers
- Intelligent Plotting: Automatic colormap selection (TgsBanded for velocity, gray_r for seismic)
- Smart Scaling: Automatic RMS -4dB scaling with seismic power dB convention
- Interactive Controls: Real-time gain/dim adjustments with keyboard shortcuts
- Custom Colormaps: BigTiger and TgsBanded colormaps for seismic visualization
- Multiple Views: Single slice or summary plots with all three axes
- Flexible Coordinates: Support for both logical (grid) and physical coordinates
- Manual Scaling: Override automatic scaling with custom min/max values
The repository includes sample FDM files in the examples/ directory:
examples/shot_topo.fdm- Seismic shot data with topographyexamples/vel_topo.fdm- Velocity model with topography
Try them out:
python plotfdm.py examples/shot_topo.fdm --summary
python plotfdm.py examples/vel_topo.fdm --summarygit clone https://github.com/YOUR_USERNAME/plotfdm.git
cd plotfdm
pip install -r requirements.txt- Python 3.6+
- NumPy
- Matplotlib
- Custom colormaps module
# Plot middle Y-slice with automatic settings
python plotfdm.py data.fdm
# Show summary with all three axis slices
python plotfdm.py data.fdm --summary
# Plot specific slice
python plotfdm.py data.fdm --slice z --index 10
# Use physical coordinates instead of logical
python plotfdm.py data.fdm --physical# Manual colormap scaling
python plotfdm.py data.fdm --vmin -100 --vmax 100
# Custom colormap
python plotfdm.py data.fdm --cmap viridis
# Save to file instead of displaying
python plotfdm.py data.fdm --save output.png
# Show file info only
python plotfdm.py data.fdm --infoWhen displaying plots interactively, you can use keyboard shortcuts:
g- Gain +1.5dBgg- Gain +3.0dB (press g twice quickly)d- Dim -1.5dBdd- Dim -3.0dB (press d twice quickly)
plotfdm.py- Main plotting tool with CLI interfacefdm.py- FDM file format reader classcustom_colormaps.py- Custom colormap definitions
The tool supports FDM files with:
- 512-byte binary headers
- 3D data arrays with (ny, nx, nz) memory layout
- Physical coordinate conversion
- Automatic data type detection
The tool uses intelligent defaults:
- Colormap Selection: TgsBanded for velocity data (all positive), gray_r for seismic data (pos/neg)
- Scaling: RMS -4dB using seismic power dB convention (10^(±dB/10))
- Coordinates: Physical coordinates for Z-axis (depth), logical coordinates for X/Y by default
MIT License - see LICENSE file for details
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
Created for seismic data visualization and analysis workflows.