.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "tutorials/reading_pre_stack_data.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_tutorials_reading_pre_stack_data.py: 01. Reading pre-stack data ========================== This tutorial explains how to read a SEGY file with unstructured data. .. GENERATED FROM PYTHON SOURCE LINES 6-10 .. code-block:: Python import matplotlib.pyplot as plt import segyio .. GENERATED FROM PYTHON SOURCE LINES 11-12 Let's first define the file name and open it with `segyio` .. GENERATED FROM PYTHON SOURCE LINES 12-17 .. code-block:: Python segyfile = 'viking_small.segy' f = segyio.open(segyfile, ignore_geometry=True) .. GENERATED FROM PYTHON SOURCE LINES 18-19 Set up a figure and plot a few shot gathers .. GENERATED FROM PYTHON SOURCE LINES 19-31 .. code-block:: Python clip = 1e+2 vmin, vmax = -clip, clip # Figure figsize=(20, 20) fig, axs = plt.subplots(nrows=1, ncols=1, figsize=figsize, facecolor='w', edgecolor='k', squeeze=False, sharex=True) axs = axs.ravel() im = axs[0].imshow(f.trace.raw[:].T, cmap=plt.cm.seismic, vmin=vmin, vmax=vmax) .. image-sg:: /tutorials/images/sphx_glr_reading_pre_stack_data_001.png :alt: reading pre stack data :srcset: /tutorials/images/sphx_glr_reading_pre_stack_data_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 32-33 Close the file .. GENERATED FROM PYTHON SOURCE LINES 33-35 .. code-block:: Python f.close() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.642 seconds) .. _sphx_glr_download_tutorials_reading_pre_stack_data.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: reading_pre_stack_data.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: reading_pre_stack_data.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: reading_pre_stack_data.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_