.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/3Dvispy/08-well_log_multi_traces.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_3Dvispy_08-well_log_multi_traces.py: The log track is displayed as a tube and multiple log curves are displayed ============================================================================ This example demonstrates how to visualize a well log with multi traces. The first trace is plotted as a tube, the others are plotted as faces. .. image:: ../../_static/cigvis/3Dvispy/08.png :alt: image :align: center .. GENERATED FROM PYTHON SOURCE LINES 20-61 .. code-block:: default # sphinx_gallery_thumbnail_path = '_static/cigvis/3Dvispy/08.png' import numpy as np import cigvis from pathlib import Path root = Path(__file__).resolve().parent.parent.parent sxp = root / 'data/co2/sx.dat' lasp = root / 'data/cb23.las' ni, nx, nt = 192, 192, 240 sx = np.fromfile(sxp, np.float32).reshape(ni, nx, nt) las = cigvis.io.load_las(lasp) idx = las['Well']['name'].index('NULL') null_value = float(las['Well']['value'][3]) v = las['data'][:, 1:5] x = np.linspace(50, 100, len(v)) y = np.linspace(50, 150, len(v)) z = np.sin((y - 50) / 200 * np.pi) * 200 points = np.c_[x, y, z] nodes = cigvis.create_slices(sx) # cyclinder=False: 半径和颜色都表示测井值的大小 # cyclinder=True: 井柱半径不变 nodes += cigvis.create_well_logs( points, v, cyclinder=False, null_value=null_value, cmap=['jet', 'seismic', 'Petrel', 'od_seismic1']) # idx=0 means select the first WellLog node in nodes (though there is only one WellLog node in this case). # idx2=1 means select the second cmap, and clim for the select WellLog node, ('seismic' in this case). # nodes += cigvis.create_colorbar_from_nodes(nodes, 'Log Impedance', select='logs', idx=0, idx2=1) nodes += cigvis.create_axis(sx.shape, 'axis', 'auto', axis_labels=['Inline [km]', 'Xline [km]', 'Time [s]'], line_width=1, intervals=[0.025, 0.025, 0.002], rotation=(30, -30, -90), tick_nums=4) cigvis.plot3D(nodes, zoom_factor=8, size=(800, 600), savename='example.png', xyz_axis=False) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.000 seconds) .. _sphx_glr_download_gallery_3Dvispy_08-well_log_multi_traces.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: 08-well_log_multi_traces.py <08-well_log_multi_traces.py>` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: 08-well_log_multi_traces.ipynb <08-well_log_multi_traces.ipynb>` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_