Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Leguark committed Sep 26, 2023
1 parent c820109 commit e70627b
Show file tree
Hide file tree
Showing 112 changed files with 6,589 additions and 158 deletions.
2 changes: 1 addition & 1 deletion _sources/contributing.rst.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Contributing
------------

The package ``VisualBayesic`` is a community effort, and contributions of any kind
The package ``vector-geology`` is a community effort, and contributions of any kind
(code, documentation, bug reports, examples) are very welcomed; please get in
touch!

Expand Down
4 changes: 2 additions & 2 deletions _sources/examples/examples/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

.. _sphx_glr_examples_examples:

Vector Examples
===============
Geological Models
-----------------

Here you will find a selection of examples showing what can you do and how
you can do it in Vector.
Expand Down
4 changes: 2 additions & 2 deletions _sources/examples/examples/read_OMF_sites.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,14 @@ Use Subsurface and PyVista to visualize the unstructured data.
.. code-block:: none
<pyvista.plotting.plotting.Plotter object at 0x7f3754893a60>
<pyvista.plotting.plotting.Plotter object at 0x7f5cbc0f39a0>
.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 2.498 seconds)
**Total running time of the script:** ( 0 minutes 2.677 seconds)


.. _sphx_glr_download_examples_examples_read_OMF_sites.py:
Expand Down
4 changes: 2 additions & 2 deletions _sources/examples/examples/sg_execution_times.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

Computation times
=================
**00:02.498** total execution time for **examples_examples** files:
**00:02.677** total execution time for **examples_examples** files:

+-----------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_examples_examples_read_OMF_sites.py` (``read_OMF_sites.py``) | 00:02.498 | 0.0 MB |
| :ref:`sphx_glr_examples_examples_read_OMF_sites.py` (``read_OMF_sites.py``) | 00:02.677 | 0.0 MB |
+-----------------------------------------------------------------------------+-----------+--------+
8 changes: 4 additions & 4 deletions _sources/examples/index.rst.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:orphan:

Vector Examples II
==================
Contents
========

Here you will find a selection of examples showing what can you do and how
you can do it in Vector.
Expand All @@ -17,8 +17,8 @@ you can do it in Vector.

</div>

Vector Examples
===============
Geological Models
-----------------

Here you will find a selection of examples showing what can you do and how
you can do it in Vector.
Expand Down
25 changes: 0 additions & 25 deletions _sources/external/external_examples.rst.txt

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions _sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.. _subsurface-manual:

########################
subsurface Documentation
vector-geology Documentation
########################

:Release: |version|
:Date: |today|
:Source: `github.com/softwareunderground/subsurface <https://github.com/softwareunderground/subsurface>`_
:Source: `github.com/vector-raw-materials/vector-geology <https://github.com/vector-raw-materials/vector-geology>`_

----

Expand All @@ -17,10 +17,10 @@ subsurface Documentation

Requirements
------------
The requirements for the core functionality of the package are:

The **only** requirement for ``subsurface`` is ``xarray`` (which, in turn,
requires ``pandas`` and ``numpy``).

.. include:: ../../requirements.txt
:literal:

Optional requirements
---------------------
Expand Down
Binary file modified _static/favicon.ico
Binary file not shown.
Binary file modified _static/logos/favicon.ico
Binary file not shown.
Binary file added _static/logos/vector-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/vector-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 6 additions & 7 deletions contributing.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="viewport" content="width=device-width, initial-scale=1" />

<title>Contributing &#8212; Visual Bayesic 0.1.dev16+g525c9e2 documentation</title>
<title>Contributing &#8212; Vector Geology 0.1.dev16+g525c9e2 documentation</title>
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=b849a4e9" />
<link rel="stylesheet" type="text/css" href="_static/alabaster.css?v=039e1c02" />
<link rel="stylesheet" type="text/css" href="_static/style.css?v=f2a985cd" />
Expand Down Expand Up @@ -39,7 +39,7 @@

<section id="contributing">
<h1>Contributing<a class="headerlink" href="#contributing" title="Permalink to this heading"></a></h1>
<p>The package <code class="docutils literal notranslate"><span class="pre">VisualBayesic</span></code> is a community effort, and contributions of any kind
<p>The package <code class="docutils literal notranslate"><span class="pre">vector-geology</span></code> is a community effort, and contributions of any kind
(code, documentation, bug reports, examples) are very welcomed; please get in
touch!</p>
<div class="admonition-todo admonition" id="id1">
Expand All @@ -56,9 +56,9 @@ <h1>Contributing<a class="headerlink" href="#contributing" title="Permalink to t
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html">
<img class="logo" src="_static/subsurface.png" alt="Logo"/>
<img class="logo" src="_static/vector-logo.png" alt="Logo"/>
</a></p>
<h1 class="logo"><a href="index.html">Visual Bayesic</a></h1>
<h1 class="logo"><a href="index.html">Vector Geology</a></h1>



Expand All @@ -76,8 +76,7 @@ <h3>Navigation</h3>
</ul>
<p class="caption" role="heading"><span class="caption-text">Galleries</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="examples/index.html">Vector Examples II</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples/index.html#vector-examples">Vector Examples</a></li>
<li class="toctree-l1"><a class="reference internal" href="examples/index.html">Contents</a></li>
<li class="toctree-l1"><a class="reference internal" href="external/external_examples.html">External Examples</a></li>
</ul>

Expand All @@ -97,7 +96,7 @@ <h3 id="searchlabel">Quick search</h3>
<div class="clearer"></div>
</div>
<div class="footer">
&copy;2023-2023, Miguel de la Varga and Maximilian Hallenberger.
&copy;2023-2023, Vector Geology Team.

|
Powered by <a href="http://sphinx-doc.org/">Sphinx 7.1.1</a>
Expand Down
Binary file added docs/build/doctrees/contributing.doctree
Binary file not shown.
Binary file added docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added docs/build/doctrees/examples/index.doctree
Binary file not shown.
Binary file not shown.
Binary file added docs/build/doctrees/index.doctree
Binary file not shown.
Binary file added docs/build/doctrees/maintenance.doctree
Binary file not shown.
Binary file added docs/build/doctrees/manual.doctree
Binary file not shown.
4 changes: 4 additions & 0 deletions docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: fc2c3683f946fbb7f38bc837f719f7aa
tags: 645f666f9bcd5a90fca523b33c5a78b7
Empty file added docs/build/html/.nojekyll
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
"""
Reading COLLINSTOWN OMF project
================================
This tutorial demonstrates how to read an OMF project file in COLLINSTOWN.
"""

# %%
# Required Libraries:
# ~~~~~~~~~~~~~~~~~~~
#
# Import the required libraries.

import omfvista
import pyvista
import subsurface
from subsurface import TriSurf
from subsurface.visualization import to_pyvista_mesh, pv_plot
from subsurface.writer import base_structs_to_binary_file
from dotenv import dotenv_values

# %%
# Load OMF Project:
# ~~~~~~~~~~~~~~~~~
#
# Load the OMF project using a fixture.

def load_omf():
config = dotenv_values()
path = config.get('PATH_TO_COLLINSTOWN')
omf = omfvista.load_project(path)
return omf

omf = load_omf()

# %%
# Read OMF with PyVista:
# ~~~~~~~~~~~~~~~~~~~~~~
#
# Visualize the OMF project with PyVista.

omf.plot(multi_colors=True, show_edges=True, notebook=False)

# %%
# Convert OMF to Unstructured Single Block:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Convert the loaded OMF project into an unstructured single block for further analysis.

block_name = omf.get_block_name(4)
polydata_obj: pyvista.PolyData = omf[block_name]
unstruct_pyvista: pyvista.UnstructuredGrid = polydata_obj.cast_to_unstructured_grid()
cells_pyvista = unstruct_pyvista.cells.reshape(-1, 4)[:, 1:]

unstruct: subsurface.UnstructuredData = subsurface.UnstructuredData.from_array(
vertex=unstruct_pyvista.points,
cells=cells_pyvista,
)

if False: # Replace with condition for exporting to Liquid Earth
base_structs_to_binary_file("leapfrog1", unstruct)

# %%
# Visualize Unstructured Data:
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Use Subsurface and PyVista to visualize the unstructured data.

ts = TriSurf(mesh=unstruct)
s = to_pyvista_mesh(ts)
pv_plot([s], image_2d=False)

Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%matplotlib inline\nfrom pyvista import set_plot_theme\nset_plot_theme('document')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n# Reading COLLINSTOWN OMF project\n\nThis tutorial demonstrates how to read an OMF project file in COLLINSTOWN.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Required Libraries:\n\nImport the required libraries. \n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"import omfvista\nimport pyvista\nimport subsurface\nfrom subsurface import TriSurf\nfrom subsurface.visualization import to_pyvista_mesh, pv_plot\nfrom subsurface.writer import base_structs_to_binary_file\nfrom dotenv import dotenv_values"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Load OMF Project:\n\nLoad the OMF project using a fixture.\n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"def load_omf():\n config = dotenv_values()\n path = config.get('PATH_TO_COLLINSTOWN')\n omf = omfvista.load_project(path)\n return omf\n\nomf = load_omf()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Read OMF with PyVista:\n\nVisualize the OMF project with PyVista.\n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"omf.plot(multi_colors=True, show_edges=True, notebook=False)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Convert OMF to Unstructured Single Block:\n\nConvert the loaded OMF project into an unstructured single block for further analysis.\n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"block_name = omf.get_block_name(4)\npolydata_obj: pyvista.PolyData = omf[block_name]\nunstruct_pyvista: pyvista.UnstructuredGrid = polydata_obj.cast_to_unstructured_grid()\ncells_pyvista = unstruct_pyvista.cells.reshape(-1, 4)[:, 1:]\n\nunstruct: subsurface.UnstructuredData = subsurface.UnstructuredData.from_array(\n vertex=unstruct_pyvista.points,\n cells=cells_pyvista,\n)\n\nif False: # Replace with condition for exporting to Liquid Earth\n base_structs_to_binary_file(\"leapfrog1\", unstruct)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Visualize Unstructured Data:\n\nUse Subsurface and PyVista to visualize the unstructured data.\n\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"ts = TriSurf(mesh=unstruct)\ns = to_pyvista_mesh(ts)\npv_plot([s], image_2d=False)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions docs/build/html/_sources/contributing.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Contributing
------------

The package ``vector-geology`` is a community effort, and contributions of any kind
(code, documentation, bug reports, examples) are very welcomed; please get in
touch!

.. todo::

Write!
Loading

0 comments on commit e70627b

Please sign in to comment.