Skip to content

Commit

Permalink
docs: fixed bug with documentation not being generated
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlangrose committed Sep 27, 2022
1 parent 797345b commit 994d5dc
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ docs/source/LoopStructural.modelling.rst
docs/source/LoopStructural.utils.rst
docs/source/LoopStructural.visualisation.rst
docs/source/_autosummary/*
docs/source/auto_examples/*
docs/source/_auto_examples/*
examples/*/*.png
docs/source/test/*
examples/*.png
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
sphinx_gallery_conf = {
'examples_dirs': ['../../examples/'],

'gallery_dirs': ['auto_examples/']
'gallery_dirs': ['_auto_examples/']
, # path to where to save gallery generated output
'image_scrapers': ('matplotlib',LoopScraper()),
'within_subsection_order': ExampleTitleSortKey,
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ and a wrapper for the generalised radial basis functions provided by Surfe :cite
:hidden:

getting_started/index
auto_examples/index
_auto_examples/index
user_guide/index


Expand Down
31 changes: 19 additions & 12 deletions examples/3_fault/plot_fault_network.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""
3b. Modelling a fault network in LoopStructural
===============================================
Uses GeologicalModel, ProcessInputData and LavaVuModelViewer from LoopStructural library. Also using geopandas to read a shapefile, pandas, matplotlib and numpy."""
Uses GeologicalModel, ProcessInputData and LavaVuModelViewer from LoopStructural library.
Also using geopandas to read a shapefile, pandas, matplotlib and numpy."""

import LoopStructural

Expand All @@ -10,21 +11,16 @@
from LoopStructural import GeologicalModel
from LoopStructural.modelling import ProcessInputData
from LoopStructural.visualisation import LavaVuModelViewer
from LoopStructural.datasets import load_fault_trace
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np

##############################
# Read shapefile
# ~~~~~~~~~~~~~~
# # Read the shapefile and create a point for each node of the line # # | **fault_name** | **X** | **Y** | **Z**| # | --------------- |-----| ------| -------|# | ... | . | . | .

try:
fault_trace = load_fault_trace()
except:
print("Could not load fault trace")
exit()

# Read the shapefile and create a point for each node of the line
fault_trace = load_fault_trace()
faults = []
for i in range(len(fault_trace)):
for x, y in zip(
Expand Down Expand Up @@ -75,12 +71,22 @@
##############################
# Setting up the data
# ~~~~~~~~~~~~~~~~~~~
# The `ProcessInputData` class is used to convert common geological map components to the datastructures required by LoopStructural.# # To build a fault network we need to provide:# * fault locations - a table of x,y,z, and the fault name# * fault orientations - a table recording the orientation observations of the fault, e.g. strike, dip or normal vector and x,y,z, fault_name# * origin - the origin of the model bounding box# * maximum - the maximum extend of the model bounding box# * fault_edges - list of intersection relationships between faults e.g. [('fault1','fault2')] indicates that there is a intersection between fault1 and fault2# * fault_edge_properties - list of properties for the fault edges - this can be the type of intersection e.g. 'splay' or 'abut' or just the angle between the faults# * fault_properties (*optional*) - a pandas dataframe with any kwargs for the interpolator where the index is the fault name # # Below is an example of setting the number of interpolation elements for each fault# ```Python# fault_properties = pd.DataFrame([['fault_1',1e4],# ['fault_2',1e4]],# columns=['fault_name','nelements']).set_index('fault_name')# ```
# The `ProcessInputData` class is used to convert common geological map components to the datastructures required by LoopStructural.#
# To build a fault network we need to provide:# * fault locations - a table of x,y,z, and the fault name
# 1. fault orientations - a table recording the orientation observations of the fault, e.g. strike, dip or normal vector and x,y,z, fault_name
# 2. origin - the origin of the model bounding box
# 3. maximum - the maximum extend of the model bounding box
# 4. fault_edges - list of intersection relationships between faults e.g. [('fault1','fault2')] indicates that there is a intersection between fault1 and fault2
# 5. fault_edge_properties - list of properties for the fault edges - this can be the type of intersection e.g. 'splay' or 'abut' or just the angle between the faults
# 6. fault_properties (*optional*) - a pandas dataframe with any kwargs for the interpolator where the index is the fault name #
#
# Below is an example of setting the number of interpolation elements for each fault

##############################
# Modelling splay faults
# ~~~~~~~~~~~~~~~~~~~~~~
# A splay fault relationship is defined for any fault where the angle between the faults is less than $30^\circ$. In this example we specify the angle between the faults as $10^\circ$.
# A splay fault relationship is defined for any fault where the angle between the faults is less than :math:`30^\circ`.
# In this example we specify the angle between the faults as :math:`10^\circ`.

processor = ProcessInputData(
fault_orientations=ori,
Expand All @@ -103,7 +109,8 @@
##############################
# Modelling abutting faults
# ~~~~~~~~~~~~~~~~~~~~~~~~~
# In this exampe we will use the same faults but specify the angle between the faults as $40^\circ$ which will change the fault relationship to be abutting rather than splay.
# In this exampe we will use the same faults but specify the angle between the faults as :math:`40^\circ` which will change
# the fault relationship to be abutting rather than splay.

processor = ProcessInputData(
fault_orientations=ori,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
"""
4.a Building a model using the ProcessInputData
===============================================
There is a disconnect between the input data required by 3D modelling software and a geological map. In LoopStructural the geological model is a collection of implicit functions that can be mapped to the distribution of stratigraphic units and the location of fault surfaces. Each implicit function is approximated from the observations of the stratigraphy, this requires grouping conformable geological units together as a singla implicit function, mapping the different stratigraphic horizons to a value of the implicit function and determining the relationship with geological structures such as faults. In this tutorial the **ProcessInputData** class will be used to convert geologically meaningful datasets to input for LoopStructural. The **ProcessInputData** class uses:* stratigraphic contacts* stratigraphic orientations* stratigraphic thickness* stratigraphic order To build a model of stratigraphic horizons and:* fault locations* fault orientations * fault properties* fault edges To use incorporate faults into the geological model. """
There is a disconnect between the input data required by 3D modelling software and a geological map.
In LoopStructural the geological model is a collection of implicit functions that can be mapped to
the distribution of stratigraphic units and the location of fault surfaces. Each implicit function
is approximated from the observations of the stratigraphy, this requires grouping conformable geological
units together as a singla implicit function, mapping the different stratigraphic horizons to a value of
the implicit function and determining the relationship with geological structures such as faults.
In this tutorial the **ProcessInputData** class will be used to convert geologically meaningful datasets to input for LoopStructural.
The **ProcessInputData** class uses:
* stratigraphic contacts* stratigraphic orientations* stratigraphic thickness* stratigraphic order
To build a model of stratigraphic horizons and:* fault locations* fault orientations * fault properties* fault edges
To use incorporate faults into the geological model. """

##############################
# Imports
Expand Down Expand Up @@ -56,14 +66,16 @@
##############################
# Stratigraphic orientations
# ~~~~~~~~~~~~~~~~~~~~~~~~~~
# Stratigraphic orientations needs to have X, Y, Z and either azimuth and dip, dipdirection and dip, strike and dip (RH thumb rule) or the vector components of the normal vector (nx, ny, nz)
# Stratigraphic orientations needs to have X, Y, Z and either azimuth and dip, dipdirection and dip, strike
# and dip (RH thumb rule) or the vector components of the normal vector (nx, ny, nz)

stratigraphic_orientations

##############################
# Stratigraphic thickness
# ~~~~~~~~~~~~~~~~~~~~~~~
# Stratigraphic thickness should be a dictionary containing the unit name (which should be in the contacts table) and the corresponding thickness of this unit.
# Stratigraphic thickness should be a dictionary containing the unit name (which should be in the contacts table)
# and the corresponding thickness of this unit.

thicknesses

Expand All @@ -81,7 +93,8 @@
##############################
# Stratigraphic column
# ~~~~~~~~~~~~~~~~~~~~
# The order of stratrigraphic units is defined a list of tuples containing the name of the group and the order of units within the group. For example there are 7 units in the following example that form two groups.
# The order of stratrigraphic units is defined a list of tuples containing the name of the group and the
# order of units within the group. For example there are 7 units in the following example that form two groups.

# example nested list
[
Expand All @@ -96,7 +109,8 @@
##############################
# Building a stratigraphic model
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# A ProcessInputData onject can be built from these datasets using the argument names. A full list of possible arguments can be found in the documentation.
# A ProcessInputData onject can be built from these datasets using the argument names.
# A full list of possible arguments can be found in the documentation.


processor = ProcessInputData(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@
include_package_data=True,
package_data={
"LoopStructural": [
"datasets/data/fault_trace/*",
"datasets/data/*.csv",
"datasets/data/*.txt",
"datasets/data/fault_trace",
"datasets/data/geological_map_data/*.csv",
"datasets/data/geological_map_data/*.txt",
]
Expand Down

0 comments on commit 994d5dc

Please sign in to comment.