Skip to content

Commit 0f55b5d

Browse files
committed
docs: updating docs for new visualisation
1 parent 7f976b8 commit 0f55b5d

File tree

3 files changed

+44
-32
lines changed

3 files changed

+44
-32
lines changed

docs/source/index.rst

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,29 @@ Loop Structural
77
===============
88
.. image:: ./images/image823.png
99

10+
.. important:: **Upgrading from 1.5.x to 1.6.x**
11+
12+
Version 1.6.x of LoopStructural has been released and there are a number of changes to how the library is used. The main changes are:
13+
14+
- The `LavaVuModelViewer` class has been removed and the model visualisation has been ported to `pyvista` using a LoopStructural
15+
wrapped `loopstructuralvisualisation`. Many of the functions have been re-named and can be combined with the `pyvista.Plotter` methods for advanced
16+
visualisation. pyvista does not currently allow for interactive plots while using colab notebooks, so `jupyter_backend='static'` is needed.
17+
- Datastructures for representing model input/output have been introduced including the `LoopStructural.datatypes.StructuredGrid`,
18+
:class:`LoopStructural.datatypes.ValuePoints`, :class:`LoopStructural.datatypes.VectorPoints` and :class:`LoopStructural.datatypes.Surface`. These Datastructures
19+
are intended to improve the accessibility of the modelling and allow for easier export into other software packages.
20+
All data objects have a `.save` method that allows the user to save the points into various formats including `json`, `csv`, `vtk` and `geoh5`.
21+
In the future exporters for gocad and other formats will be added. All objects also have a `.vtk()` method to return a `pyvista.PolyData` object.
22+
- The solver options for the interpolators have been removed and only :meth:`scipy.sparse.linalg.cg` and :meth:`scipy.sparse.linalg.lsmr` are supported.
23+
To use an external solver the `external_solver` argument can be provided to the `interpolator.solve` method, usually passed through
24+
the `model.create_and_add*` methods. To specify specific arguments to the solver these can be passed through `solver_kwargs` dict.
25+
- Improvements have been made to how unconformities are handled and their interaction with faults
26+
- A framework for including inequalities into the interpolation has been added but there is no solver that can be used for solving this problem.
27+
- A convenience class :class:`LoopStructural.LoopInterpolator` was added for building an implicit function without requiring the :class:`LoopStructural.GeologicalModel`
28+
**Please report any bugs or issues on the github repository.**
29+
30+
Overview
31+
========
32+
1033
Loop structural is an open source 3D modelling library providing access to multiple interpolation schemes with a
1134
high level and easy to use API for creating geological models. The library has been written for the Loop platform by
1235
Lachlan Grose at Monash University.
@@ -15,17 +38,7 @@ Loop is an open source 3D probabilistic geological and geophysical modelling pla
1538
initiated by Geoscience Australia and the OneGeology consortium. The project is funded by Australian territory,
1639
State and Federal Geological Surveys, the Australian Research Council and the MinEx Collaborative Research Centre.
1740

18-
LoopStructural is the forward geological modelling engine for the loop and contains the classes and functions to manage the various
19-
elements in a 3D geological model. Including stratigraphy, unconformities, fault and folds. LoopStructural contains
20-
three native interpolation algorithms:
21-
22-
1. Piecewise-linear interpolation :cite:p:`Frank2007`
23-
2. Discrete Fold Interpolator :cite:p:`Laurent2016,Grose2017,Grose2018,Grose2019`
24-
3. Finite Difference Interpolation :cite:p:`Irakarama2020`
25-
26-
and a wrapper for the generalised radial basis functions provided by Surfe :cite:`Hillier2014`.
2741

28-
.. bibliography::
2942

3043
.. toctree::
3144
:hidden:

docs/source/user_guide/fault_modelling.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ Fault can be added into LoopStructural using the :meth:`LoopStructural.Geologica
1717
displacement,
1818
fault_slip_vector=None,
1919
fault_center = None,
20-
fault_extent = None,
21-
fault_influence = None,
22-
fault_vectical_radius = None,
20+
fault_major_axis = None,
21+
fault_minor_axis = None,
22+
fault_intermediate_axis = None,
2323
faultfunction = None,
2424
**kwargs
2525
)

docs/source/user_guide/visualisation.rst

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ There are four main ways a GeologicalFeature can be visualised.
1515

1616
.. code-block::
1717
18-
view.add_scalar_field(geological_feature)
18+
view.plot_scalar_field(geological_feature)
1919
2020
2. Surfaces extracted from isovalues of the implicit function
2121

2222
.. code-block::
2323
24-
view.add_isosurface(geological_feature,value=0)
24+
view.plot_surface(geological_feature,value=0)
2525
2626
3. Vector field representing the gradient of the implicit function
2727

2828
.. code-block::
2929
30-
view.add_isosurface(geological_feature)
30+
view.plot_surface(geological_feature)
3131
3232
4. Cross section showing the value of the implicit function at a particular location inside the model
3333

@@ -43,24 +43,23 @@ When adding to the viewer there are a number of common arguments that can be spe
4343

4444
* - Parameter
4545
- Options
46-
* - name
47-
- overwrite the name of the object to be added into the viewer
4846
* - vmin
4947
- minimum value for colourmap
5048
* - vmax
5149
- maximum value for colourmap
5250
* - cmap
5351
- matplotlib colourmap or string with name of matplotlib colourmap e.g. 'rainbow'
52+
* - pyvista_kwargs
53+
- any arguments to be passed to the :meth:`pyvista.Plotter.add_mesh` method
5454

5555
The default behaviour of the viewer can also be modified.
56-
To change the resolution of the scalar field or isosurfacing, either set the number of steps in x,y,z or the total number of elements.
56+
To change the resolution of the scalar field or isosurfacing, either set the number of steps in x,y,z or the total number of elements of tht bounding box
5757

5858
.. code-block::
59-
60-
view.nsteps = np.array([nx,ny,nz])
61-
print(view.nsteps)
62-
view.nelements = 1e6
63-
print(view.nsteps)
59+
model.bounding_box.nsteps = np.array([nx,ny,nz])
60+
print(model.bounding_box.nsteps)
61+
model.bounding_box.nelements = 1e6
62+
print(model.bounding_box.nsteps)
6463
6564
6665
@@ -72,24 +71,24 @@ To add all of the data attached to a GeologicalFeature
7271

7372
.. code-block::
7473
75-
view.add_data(geological_feature,grad=True,value=True,tang=True,interface=True)
74+
view.plot_data(geological_feature,value=True,vector=True,scale=10,pyvista_kwargs={})
7675
7776
Alternatively, points can be added into the model using the:
7877

7978
.. code-block::
8079
81-
view.add_points(xyz,name='name of viewer object')
80+
view.add_points(xyz)
8281
8382
or points with an associated value:
8483

8584
.. code-block::
86-
view.add_value_data(xyz,val,name='name of viewer object')
85+
view.add_points(xyz,scalars=np.array(values))
8786
8887
or points with an associated vector:
8988

9089
.. code-block::
9190
92-
view.add_vector_data(xyz,vec,name='name of viewer object')
91+
view.add_arrows(xyz,direction)
9392
9493
**Warning, you cannot have two objects in the viewer with the same name**
9594

@@ -101,13 +100,13 @@ To add a block model showing the stratigraphic unit distribution, where the valu
101100

102101
.. code-block::
103102
104-
view.add_model()
103+
view.plot_block_model()
105104
106105
alternatively, the surfaces can be added to the visualisation.
107106

108107
.. code-block::
109108
110-
view.add_model_surfaces(faults=True)
109+
view.plot_model_surfaces(faults=True,strati=True)
111110
112111
Where the faults flag allows you to disable visualising the fault surface.
113112
This function will add a surface for every stratigraphic unit in the stratigraphic column.
@@ -124,8 +123,8 @@ The LambdaGeologicalFeature is a class allowing for a function describing the va
124123
def x_function(xyz):
125124
return xyz[:,0]
126125
custom_feature = LambdaGeologicalFeature(x_function,name='x feature')
127-
view.add_isosurface(custom_feature,value)
128-
view.add_scalar_field(custom_feature)
126+
view.plot_surface(custom_feature,value)
127+
view.plot_scalar_field(custom_feature)
129128
130129
The function passed to the LambdaGeologicalFeature can be as simple or complicated as required.
131130
It will be evaluated for the locations within the model that the visualisation requires, usually between the origin and maximum of the geoloical model.

0 commit comments

Comments
 (0)