gempy.core.data.GeoModel

class gempy.core.data.GeoModel(*, meta: GeoModelMeta, structural_frame: StructuralFrame, grid: Grid = None, geophysics_input: GeophysicsInput | None = None, input_transform: Transform = None, interpolation_grid: EngineGrid = None)[source]

Class representing a geological model.

Examples using gempy.core.data.GeoModel

Video Tutorial “code-along”: Modeling step by step

Video Tutorial "code-along": Modeling step by step

Video Tutorial “code-along”: Faults

Video Tutorial "code-along": Faults

Video Tutorial “code-along”: Onlap relations

Video Tutorial "code-along": Onlap relations

Basics: Data Classes and Modeling API

Basics: Data Classes and Modeling API

Building a Model from Scratch

Building a Model from Scratch

Grids: Regular, Octree, and Custom

Grids: Regular, Octree, and Custom

2D Visualization: Sections and Custom Plots

2D Visualization: Sections and Custom Plots

3D Visualization: Interactive Model and Custom Plots

3D Visualization: Interactive Model and Custom Plots

Forward Gravity Modeling

Forward Gravity Modeling

Populating a Structural Model with Properties

Populating a Structural Model with Properties

Analyzing Geomodel Topology

Analyzing Geomodel Topology

Model 1 - Horizontal Stratigraphy

Model 1 - Horizontal Stratigraphy

Model 2 - Anticline

Model 2 - Anticline

Model 3 - Recumbent Fold

Model 3 - Recumbent Fold

Model 4 - Pinchout

Model 4 - Pinchout

Model 5 - Fault

Model 5 - Fault

Model 6 - Unconformity

Model 6 - Unconformity

Model 7 - Combination

Model 7 - Combination

Alès Basin, France

Alès Basin, France

Claudius, Queensland, Australia

Claudius, Queensland, Australia

Sandstone Greenstone Belt, Western Australia

Sandstone Greenstone Belt, Western Australia

Hecho, Spanish Pyrenees

Hecho, Spanish Pyrenees

Mourèze, France

Mourèze, France

Perth Basin, Western Australia

Perth Basin, Western Australia

Methods

__init__(**data)

Create a new model by parsing and validating input data from keyword arguments.

add_surface_points(X, Y, Z, surface[, nugget])

construct([_fields_set])

copy(*[, include, exclude, update, deep])

Returns a copy of the model.

deserialize_properties(data, constructor)

dict(*[, include, exclude, by_alias, ...])

from_args(name, structural_frame, grid, ...)

from_orm(obj)

json(*[, include, exclude, by_alias, ...])

model_construct([_fields_set])

Creates a new instance of the Model class with validated data.

model_copy(*[, update, deep])

!!! abstract "Usage Documentation"

model_dump(*[, mode, include, exclude, ...])

!!! abstract "Usage Documentation"

model_dump_json(*[, indent, ensure_ascii, ...])

!!! abstract "Usage Documentation"

model_json_schema(by_alias, ref_template, ...)

Generates a JSON schema for a model class.

model_parametrized_name(params)

Compute the class name for parametrizations of generic classes.

model_post_init(context, /)

This function is meant to behave like a BaseModel method to initialize private attributes.

model_rebuild(*[, force, raise_errors, ...])

Try to rebuild the pydantic-core schema for the model.

model_validate(obj, *[, strict, extra, ...])

Validate a pydantic model instance.

model_validate_json(json_data, *[, strict, ...])

!!! abstract "Usage Documentation"

model_validate_strings(obj, *[, strict, ...])

Validate the given object with string data against the Pydantic model.

parse_file(path, *[, content_type, ...])

parse_obj(obj)

parse_raw(b, *[, content_type, encoding, ...])

schema([by_alias, ref_template])

schema_json(*[, by_alias, ref_template])

update_forward_refs(**localns)

update_transform([auto_anisotropy, ...])

Update the transformation of the geological model.

validate()

Run semantic validation checks on the model.

Attributes

extent_transformed_transformed_by_input

input_data_descriptor

interpolation_input_copy

interpolation_options

model_computed_fields

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_extra

Get extra fields set during validation.

model_fields

model_fields_set

Returns the set of fields that have been explicitly set on this model instance.

orientations

orientations_copy

This is a copy! Returns a OrientationsTable for all orientations across the structural elements

orientations_copy_transformed

project_bounds

regular_grid_coordinates

regular_grid_coordinates_transformed

solutions

surface_points

surface_points_copy

This is a copy! Returns a SurfacePointsTable for all surface points across the structural elements

surface_points_copy_transformed

taped_interpolation_input

meta

Meta-information about the geological model, like its name, creation and modification dates, and owner.

structural_frame

The structural information of the geological model.

grid

The general grid used in the geological model.

geophysics_input

The geophysics input of the geological model.

input_transform

The transformation used in the geological model for input points.

interpolation_grid

ptional grid used for interpolation.

meta: GeoModelMeta

Meta-information about the geological model, like its name, creation and modification dates, and owner.

structural_frame: StructuralFrame

The structural information of the geological model.

grid: Grid

The general grid used in the geological model.

geophysics_input: GeophysicsInput | None

The geophysics input of the geological model.

input_transform: Transform

The transformation used in the geological model for input points.

interpolation_grid: EngineGrid

ptional grid used for interpolation. Can be seen as a cache field.

property surface_points_copy

This is a copy! Returns a SurfacePointsTable for all surface points across the structural elements

property orientations_copy: OrientationsTable

This is a copy! Returns a OrientationsTable for all orientations across the structural elements

update_transform(auto_anisotropy: GlobalAnisotropy = GlobalAnisotropy.NONE, anisotropy_limit: ndarray | None = None)[source]

Update the transformation of the geological model.

This function updates the transformation of the geological model using the provided surface points and orientations. It also applies anisotropy based on the specified type and limit.

Parameters:
  • auto_anisotropy (GlobalAnisotropy) – The type of anisotropy to apply. Defaults to GlobalAnisotropy.NONE.

  • anisotropy_limit (Optional[np.ndarray]) – Anisotropy limit values. If None, no limit is applied.

model_post_init(context: Any, /) None

This function is meant to behave like a BaseModel method to initialize private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

model_config = {'arbitrary_types_allowed': True, 'json_encoders': {<class 'numpy.ndarray'>: <function encode_numpy_array>}, 'use_enum_values': False}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

validate() None[source]

Run semantic validation checks on the model.

Raises ModelValidationError on the first violation found.