.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/more_demos/060-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_more_demos_060-well_logs.py: logging track ================ .. image:: ../../_static/cigvis/more_demos/060.png :alt: image :align: center .. GENERATED FROM PYTHON SOURCE LINES 10-63 .. code-block:: default # sphinx_gallery_thumbnail_path = '_static/cigvis/more_demos/060.png' import numpy as np import cigvis from pathlib import Path root = Path(__file__).resolve().parent.parent.parent def show(sx, points): """ 显示将测井显示为一条等半径的tube, 并显示为一个颜色 """ nodes1 = cigvis.create_slices(sx) nodes1 += cigvis.create_well_logs(points, cmap='orange', radius_tube=3) """ 显示将测井显示为一条等半径的tube, 颜色为深度 """ nodes2 = cigvis.create_slices(sx) nodes2 += cigvis.create_well_logs(points, cmap='jet', radius_tube=3) cigvis.plot3D([nodes1, nodes2], grid=(1, 2), zoom_factor=4, savename='example.png') if __name__ == '__main__': sxp = root / 'data/co2/sx.dat' lxp = root / 'data/co2/lx.dat' lasp = root / 'data/cb23.las' ni, nx, nt = 192, 192, 240 sx = np.memmap(sxp, np.float32, 'c', shape=(ni, nx, nt)) lx = np.memmap(lxp, np.float32, 'c', shape=(ni, nx, nt)) # create a well log las = cigvis.io.load_las(lasp) idx = las['Well']['name'].index('NULL') null_value = float(las['Well']['value'][3]) lasdata = las['data'][:, 1:] x = np.linspace(50, 100, len(lasdata)) y = np.linspace(50, 150, len(lasdata)) z = np.sin((y - 50) / 200 * np.pi) * 200 points = np.c_[x, y, z] show(sx, points) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.000 seconds) .. _sphx_glr_download_gallery_more_demos_060-well_logs.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 060-well_logs.py <060-well_logs.py>` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 060-well_logs.ipynb <060-well_logs.ipynb>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_