Package: cigvis
CIGVis - a tool for visualizing multidimensional geophysical dataOverviewcigvisis a tool for visualizing multidimensional geophysical data, developed by theComputational Interpretation Group (CIG). Users can quickly visualize data with just a few lines of code.cigvis can be used for various geophysical data visualizations, including 3D seismic data, overlays of seismic data with other information like labels, faults, RGT, horizon surfaces, well log trajectories, and well log curves, 3D geological bodies, 2D data, and 1D data, among others. Its GitHub repository can be found atgithub.com/JintaoLee-Roger/cigvis, and documentation is available athttps://cigvis.readthedocs.io/.cigvis leverages the power of underlying libraries such asvispyfor 3D visualization,matplotlibfor 2D and 1D visualization, andplotlyfor Jupyter environments (work in progress). The 3D visualization component is heavily based on the code fromyunzhishi/seismic-canvasand has been further developed upon this foundation.InstallationTo install via PyPI, use:pipinstallcigvisFor local installation, clone the repository from GitHub and then install it using pip:gitclonehttps://github.com/JintaoLee-Roger/cigvis.git
pipinstall-e.Core FeaturesConvenient 3D geophysical data visualization.Ongoing development of 2D and 1D data visualization.Additional colormaps tailored for geophysical data.Rapid display of large data in OpenVDS format.UsageBasic StructureThe fundamental structure of cigvis's visualization code consists of:Data loadingCreating nodesPassing nodes to theplot3DfunctionFor example:importnumpyasnpimportcigvis# Load datad=np.fromfile('sx.dat',np.float32).reshape(ni,nt,nx)# Create nodesnodes=cigvis.create_slices(d)# Visualize in 3Dcigvis.plot3D(nodes)This basic code structure allows you to quickly visualize your geophysical data using cigvis. Simply load your data, create nodes, and pass them to theplot3Dfunction as demonstrated in the example above.Camera and DraggingLeft click and drag to rotate the camera angle; right click and drag, or scroll mouse wheel, to zoom in and out. Hold<Shift>key, left click and drag to pan move. Press<Space>key to return to the initial view. Press<S>key to save a screenshot PNG file at any time. Press<Esc>key to close the window.Hold<Ctrl>key, the selectable visual nodes will be highlighted when your mouse hovers over them; left click and drag to move the highlighted visual node. The volume slices will update their contents in real-time during dragging. You can also press<D>key to toggle the dragging mode on/off.Press<z>to zoom in z axis, press<Z>or<Shift> + <z>to zoom out z axis.
Press<f>to increasefovvalue, press<F>or<Shift> + <f>to decreasefovvalue.Press
to save a screen shot.Press<a>to print the camera's parameters in real-time; hold on
the<alt>(or<option>in macos) and left click the mouse to
show the coordinate of the click point in the 3D volume.Various Geophysical dataIn cigvis, we represent various geophysical data as individual nodes, assemble these nodes into a list, and then pass this list to theplot3Dfunction for visualization.We visualize a three-dimensional data volume as multiple slices along the x, y, and z directions. Additionally, we can overlay other three-dimensional data slices on these slices, allowing users to interactively drag them along an axis using the mouse.Horizon data can be represented as scatter points with a shape of (N, 3), or as z-values on a regular grid of size (n1, n2).Well log trajectories are displayed as tubes, where the size of the first well log curve is represented by the color and radius at each position along the tube. Other well log curves are displayed as surfaces attached to the tube's edge. An example is shown below (code available atcigvis/gallery/3Dvispy/09).These capabilities within cigvis allow for versatile and interactive visualizations of a wide range of geophysical data types, enhancing the understanding and analysis of such data in geoscience applications.Multivolumes in One CanvasYou can pass multiple independent nodes combinations to theplot3Dfunction while specifying a grid (e.g.,grid=(2,2)). This allows you to divide the canvas into multiple independent sub-canvases, where each sub-canvas displays a separate 3D data set within the same canvas. The example code for this can be found in the documentation atcigvis/gallery/3Dvispy/10.Furthermore, you can link the cameras of all sub-canvases together (just need passshare=Truetoplot3Dfunction). This means that any rotation, scaling, or slicing performed in one sub-canvas will be mirrored in all other sub-canvases, ensuring that they all exhibit the same changes simultaneously. This feature is highly advantageous when comparing multiple sets of data, such as results from different experiments, results alongside labels, seismic data compared with attributes, and more.
You can find example code for this functionality in the documentation atcigvis/gallery/3Dvispy/11.These capabilities provide a powerful way to visualize and compare multiple independent 3D data sets within a single canvas using cigvis.Example DataAll data used by examples in thegallerycan be download athttps://rec.ustc.edu.cn/share/19a16120-5c42-11ee-a0d4-4329aa6b754b, password:1234.Example GallerySee:cigvis/galleryTODOmove all functions for triangle mesh creation tomeshs/