Access the full documentation for SEGY-SAK from readthedocs
SEGY-SAK aims to be your Python Swiss Army Knife for Seismic Data.
To do this SEGY-SAK offers two things; a commandline interface (CLI) for inspecting and converting SEG-Y data to a more friendly format called NETCDF4, and by providing convenience functions for the data using xarray. We try hard to load the data the same way every time so your functions will work no-matter which cube/line you load. The xarray conventions we use are outlined in the documentation.
Why NETCDF4? Well, NETCDF4 is a fancy type of enclosed file binary format that
allows for faster indexing and data retrieval than SEGY. We try our best to
scan in the header information and to make it easy (or easier) to load SEGY
in different formats, different configuration (2D, 2D gathers, 3D, 3D gathers).
We do all this with the help of segyio
which is a lower level interface to SEGY. If you stick to our xarray
format
of files we also offer utility functions to return to SEG-Y so you can export to
other software.
- CLI:
- Convert 2D, 3D and gathers type SEG-Y to NETCDF4 and back. The NETCDF4 files
are one line open with
xarray.open_dataset
. - Extract sub-volumes via cropping xline and inline.
- Read EBCIDC header.
- Perform a limited header scan.
- Convert 2D, 3D and gathers type SEG-Y to NETCDF4 and back. The NETCDF4 files
are one line open with
- Xarray and Python API:
- Load 2D, 3D and gathers type SEG-Y to a
xarray.Dataset
. - Access header information and text headers in Python with convenience functions.
- Select traces by UTM X and Y coordinates.
- Load 2D, 3D and gathers type SEG-Y to a
SEGY-SAK can be installed by using pip or python setuptools, we also provide an environment.yml
for use
with conda.
From the command line run the pip
package manager
pip install segysak
Clone the SEGY-SAK Github repository and in the top level directory run setuptools via
python setup.py install
The command line interface (CLI) provides an easy tool to convert or manipulate SEG-Y data. In your Python command-line environment it can be accessed by calling segysak.
For a full list of options run
segysak --help
Any SEG-Y files converted using the convert
command. For example
segysak convert test.segy
Can be loaded into Python using xarray
.
test = xarray.open_dataset('test.SEISNC')
The complete documentation for SEGY-SAK can be found at readthedocs