.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/viser/03_well_logs.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_viser_03_well_logs.py: well logs ============================================================== .. image:: ../../_static/cigvis/viser/03.jpg :alt: image :align: center .. GENERATED FROM PYTHON SOURCE LINES 14-53 .. code-block:: Python # sphinx_gallery_thumbnail_path = '_static/cigvis/viser/03.jpg' import numpy as np from cigvis import colormap, viserplot ni, nx, nt = 400, 600, 360 shape = (ni, nx, nt) data = np.fromfile('data/seis_h360x600x400.dat', dtype=np.float32).reshape(shape) nodes = viserplot.create_slices(data, pos=[20, 30, 320], cmap='gray') points = [] for i in range(6): x = np.array([np.random.randint(0, ni)] * nt*4).astype(np.float32) y = np.array([np.random.randint(0, nx)] * nt*4).astype(np.float32) z = np.arange(nt*4).astype(np.float32) / 4 if i % 3 != 0: v = np.random.rand(nt*4) points.append(np.c_[x, y, z, v]) else: points.append(np.c_[x, y, z]) nodes += viserplot.create_well_logs(points, logs_type='line', width=3) points = [] for i in range(6): x = np.array([np.random.randint(0, ni)] * nt*4).astype(np.float32) y = np.array([np.random.randint(0, nx)] * nt*4).astype(np.float32) z = np.arange(nt*4).astype(np.float32) / 4 if i % 3 != 0: v = np.random.rand(nt*4) points.append(np.c_[x, y, z, v]) else: points.append(np.c_[x, y, z]) nodes += viserplot.create_well_logs(points, logs_type='point', width=1) viserplot.plot3D(nodes) .. _sphx_glr_download_gallery_viser_03_well_logs.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 03_well_logs.ipynb <03_well_logs.ipynb>` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 03_well_logs.py <03_well_logs.py>` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: 03_well_logs.zip <03_well_logs.zip>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_