LoopStructural.visualisation.lavavu.GeologicalFeature#

class LoopStructural.visualisation.lavavu.GeologicalFeature(name: str, interpolator: GeologicalInterpolator, builder=None, regions: list = [], faults: list = [], model=None)#

Bases: BaseFeature

Geological feature is class that is used to represent a geometrical element in a geological model. For example foliations, fault planes, fold rotation angles etc.

name#

should be a unique name for the geological feature

Type:

string

support#

holds the property values for the feature and links to the support geometry

Type:

a ScalarField

data#

list containing geological data

Type:

list

region#

list of boolean functions defining whether the feature is active

Type:

list

faults#

list of FaultSegments that affect this feature

Type:

list

Default constructor for geological feature

Parameters:
__init__(name: str, interpolator: GeologicalInterpolator, builder=None, regions: list = [], faults: list = [], model=None)#

Default constructor for geological feature

Parameters:

Methods

__init__(name, interpolator[, builder, ...])

Default constructor for geological feature

add_region(region)

Adds a region where the geological feature is active to the model.

copy([name])

evaluate_gradient(pos)

param locations:

location where the gradient is being evaluated

evaluate_gradient_misfit()

returns:

misfit (np.array(N,dtype=double)) -- dot product between interpolated gradient and constraints

evaluate_normalised_value(pos)

Evaluate the feature value scaling between 0 and 1

evaluate_value(evaluation_points)

Evaluate the scalar field value of the geological feature at the locations specified

evaluate_value_misfit()

returns:

misfit (np.array(N,dtype=double)) -- difference between interpolated scalar field and value constraints

is_valid()

max()

Calculate the maximum value of the geological feature in the model

min()

Calculate the min value of the geological feature in the model

set_model(model)

to_json()

Returns a json representation of the geological feature

toggle_faults()

Turn the fault off for a feature This function is only really used for debugging or creating methods explanation figures

Attributes

faults

model

add_region(region)#

Adds a region where the geological feature is active to the model.

Parameters:

region (boolean function(x,y,z)) – returns true if inside region, false if outside can be passed as a lambda function e.g. lambda pos : feature.evaluate_value(pos) > 0

evaluate_gradient(pos: ndarray) ndarray#
Parameters:

locations (numpy array) – location where the gradient is being evaluated

evaluate_gradient_misfit()#
Returns:

misfit (np.array(N,dtype=double)) – dot product between interpolated gradient and constraints

evaluate_normalised_value(pos: Number | List[Number])#

Evaluate the feature value scaling between 0 and 1

Parameters:

pos (NumericInput) – An array or arraylike object with locations

evaluate_value(evaluation_points: ndarray) ndarray#

Evaluate the scalar field value of the geological feature at the locations specified

Parameters:

evaluation_points (np.ndarray) – location to evaluate the scalar value

Returns:

values (numpy array) – numpy array containing evaluated values

evaluate_value_misfit()#
Returns:

misfit (np.array(N,dtype=double)) – difference between interpolated scalar field and value constraints

max()#

Calculate the maximum value of the geological feature in the model

Returns:

maximum, float – max value of the feature evaluated on a regular grid in the model domain

min()#

Calculate the min value of the geological feature in the model

Returns:

minimum, float – min value of the feature evaluated on a regular grid in the model domain

to_json()#

Returns a json representation of the geological feature

Returns:

json (dict) – json representation of the geological feature

toggle_faults()#

Turn the fault off for a feature This function is only really used for debugging or creating methods explanation figures