LoopStructural.visualisation.model_plotter.BaseFeature#

class LoopStructural.visualisation.model_plotter.BaseFeature(name: str, model=None, faults: list = [], regions: list = [], builder=None)#

Bases: object

Base class for geological features.

Base geological feature, this is a virtual class and should not be used directly. Inheret from this to implement a new type of geological feature or use one of the exisitng implementations

Parameters:
  • name – Name of the geological feature to add

  • model (GeologicalModel, optional) – the model the feature is associated with, by default None

  • faults (list, optional) – any faults that fault this feature, by default []

  • regions (list, optional) – any regions that affect this feature, by default []

  • builder (GeologicalFeatureBuilder, optional) – the builder of the feature, by default None

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

Base geological feature, this is a virtual class and should not be used directly. Inheret from this to implement a new type of geological feature or use one of the exisitng implementations

Parameters:
  • name – Name of the geological feature to add

  • model (GeologicalModel, optional) – the model the feature is associated with, by default None

  • faults (list, optional) – any faults that fault this feature, by default []

  • regions (list, optional) – any regions that affect this feature, by default []

  • builder (GeologicalFeatureBuilder, optional) – the builder of the feature, by default None

Methods

__init__(name[, model, faults, regions, builder])

Base geological feature, this is a virtual class and should not be used directly.

add_region(region)

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

evaluate_gradient(pos)

Evaluate the gradient of the feature at a given position.

evaluate_normalised_value(pos)

Evaluate the feature value scaling between 0 and 1

evaluate_value(pos)

Evaluate the feature at a given position.

max()

Calculate the maximum value of the geological feature in the model

min()

Calculate the min value of the geological feature in the 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

abstract evaluate_gradient(pos)#

Evaluate the gradient of the feature at a given position.

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

abstract evaluate_value(pos)#

Evaluate the feature at a given position.

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