1f. Local data weighting#

LoopStructural primarily uses discrete interpolation methods (e.g. finite differences on a regular grid, or linear/quadratic on tetrahedral meshes). The interpolation is determined by combining a regularisation term and the data weights. The default behaviour is for every data point to be weighted equally, however it is also possible to vary these weights per datapoint.

from LoopStructural import GeologicalModel
from LoopStructural.datasets import load_claudius
from LoopStructural.visualisation import LavaVuModelViewer

Use Cladius case study#

data, bb = load_claudius()
data.head()
Unnamed: 0 X Y Z val feature_name nx ny nz
0 0 550551.810547 7.821922e+06 -9734.299805 250.0 strati NaN NaN NaN
1 1 550551.810547 7.821903e+06 -9731.809570 250.0 strati NaN NaN NaN
2 2 550551.810547 7.821884e+06 -9730.330078 250.0 strati NaN NaN NaN
3 3 550551.810547 7.821865e+06 -9729.330078 250.0 strati NaN NaN NaN
4 4 550551.810547 7.821847e+06 -9729.679688 250.0 strati NaN NaN NaN


Build model with constant weighting#

Build model with weight 1.0 for the control points (cpw) and gradient normal constraints (npw)

model = GeologicalModel(bb[0, :], bb[1, :])
model.data = data
model.create_and_add_foliation("strati", interpolatortype="FDI", cpw=1.0, npw=1.0)
view = LavaVuModelViewer(model)
view.add_isosurface(model["strati"], slices=data["val"].dropna().unique())
view.rotation = [84.24493408203125, -77.89686584472656, -171.99795532226562]
view.display()
plot 7 local weights

Change weights to

model = GeologicalModel(bb[0, :], bb[1, :])
model.data = data
model.create_and_add_foliation("strati", interpolatortype="FDI", cpw=10.0, npw=1.0)
view = LavaVuModelViewer(model)
view.add_isosurface(model["strati"], slices=data["val"].dropna().unique())
view.rotation = [84.24493408203125, -77.89686584472656, -171.99795532226562]
view.display()
plot 7 local weights

Locally vary weights # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add a weight column to the dataframe and decrease the weighting of the points in the North of the model.

data, bb = load_claudius()
data["w"] = 1.0
data.loc[data["Y"] > (bb[1, 1] - bb[0, 1]) * 0.2 + bb[0, 1], "w"] = 0.01
data.sample(10)

# cpw/npw are multipliers for the weight column
model.create_and_add_foliation("strati", cpw=1.0, npw=1)
view = LavaVuModelViewer(model)
view.add_isosurface(model["strati"], slices=data["val"].dropna().unique())
view.rotation = [84.24493408203125, -77.89686584472656, -171.99795532226562]
view.display()
plot 7 local weights

Total running time of the script: (0 minutes 2.454 seconds)

Gallery generated by Sphinx-Gallery