Skip to content

Instantly share code, notes, and snippets.

@josephwinston
Created June 5, 2020 01:43
Show Gist options
  • Save josephwinston/031bbbfd0bcb2509da90431f2a4931a4 to your computer and use it in GitHub Desktop.
Save josephwinston/031bbbfd0bcb2509da90431f2a4931a4 to your computer and use it in GitHub Desktop.
simple seg-y viewer
import segyio
import napari
# wget http://s3.amazonaws.com/open.source.geoscience/open_data/newzealand/Taranaiki_Basin/Keri_3D/Kerry3D.segy
segyfile = '../../data/pylops/Kerry3D.segy'
f = segyio.open(segyfile,
iline=segyio.tracefield.TraceField.SourceEnergyDirectionExponent,
xline=segyio.tracefield.TraceField.CDP)
d = segyio.cube(f)
with napari.gui_qt():
viewer = napari.Viewer(ndisplay=3)
viewer.add_image(d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment