.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/sliceviewer/02-comparison-grid.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_gallery_sliceviewer_02-comparison-grid.py: Real data comparison grid ========================= Compare seismic, RGT, and fault volumes with shared dimension/index controls. .. image:: ../../_static/cigvis/sliceviewer/02.png :alt: image :align: center .. GENERATED FROM PYTHON SOURCE LINES 13-57 .. code-block:: Python # sphinx_gallery_thumbnail_path = '_static/cigvis/sliceviewer/02.png' from pathlib import Path import numpy as np from cigvis import sliceviewer as sv ROOT = Path(__file__).resolve().parents[2] DATA = ROOT / "data" / "rgt" SHAPE = (128, 128, 128) INLINE = 40 seismic = np.fromfile(DATA / "sx.dat", np.float32).reshape(SHAPE) rgt = np.fromfile(DATA / "ux.dat", np.float32).reshape(SHAPE) fault = np.fromfile(DATA / "fx.dat", np.float32).reshape(SHAPE) axis_labels = ("inline", "crossline", "time") slice_kwargs = dict( display_axes=(2, 1), indices={0: INLINE}, axis_labels=axis_labels, interpolation="nearest", render_mode="float", ) nodes_seismic = sv.create_slice(seismic, cmap="gray", **slice_kwargs) nodes_rgt = sv.create_slice(rgt, cmap="jet", **slice_kwargs) nodes_fault = sv.create_slice(fault, cmap="jet", **slice_kwargs) nodes_overlay = sv.create_slice(seismic, cmap="gray", **slice_kwargs) nodes_overlay = sv.add_mask(nodes_overlay, fault, cmap="jet", alpha=0.45, excpt="min") if __name__ == "__main__": sv.show( [nodes_seismic, nodes_rgt, nodes_fault, nodes_overlay], grid=(2, 2), port=5007, title="RGT data comparison", plot_height=340, ) .. _sphx_glr_download_gallery_sliceviewer_02-comparison-grid.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 02-comparison-grid.ipynb <02-comparison-grid.ipynb>` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 02-comparison-grid.py <02-comparison-grid.py>` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: 02-comparison-grid.zip <02-comparison-grid.zip>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_