gempy.core.data.Surfaces

class gempy.core.data.Surfaces(series, surface_names=None, values_array=None, properties_names=None)[source]

Class that contains the surfaces of the model and the values of each of them.

Parameters
  • surface_names (list or np.ndarray) – list containing the names of the surfaces

  • series (Series) – [s0]

  • values_array (np.ndarray) – 2D array with the values of each surface

  • names (properties) – list containing the names of each properties

df

Pandas data frame containing the surfaces names mapped to series and the value used for each voxel in the final model.

Type

pn.core.frame.DataFrames

series
Type

Series

colors
Type

Colors

Examples using Surfaces

Methods

__init__(series[, surface_names, …])

Initialize self.

add_surface(surface_list[, update_df])

Add surface to the df.

add_surfaces_values(values_array[, …])

Add values to be interpolated for each surfaces.

background_color(value)

delete_surface(indices[, update_id])

[s1] Drop specified labels from rows or columns.

delete_surface_values(properties_names)

Delete a property or several properties column.

map_faults()

map_series([mapping_object])

Method to map to which series every surface belongs to.

modify_order_surfaces(new_value, idx[, …])

Replace to the new location the old series

modify_surface_values(idx, properties_names, …)

Method to modify values using loc of pandas.

rename_surfaces(to_replace, **kwargs)

Replace values given in to_replace with value.

reset_order_surfaces()

set_basement()

Set isBasement property to true to the last series of the df.

set_default_surface_name()

Set the minimum number of surfaces to compute a model i.e. surfaces_names: surface1 and basement.

set_surfaces_names(surfaces_list[, update_df])

Method to set the names of the surfaces in order.

set_surfaces_names_from_surface_points(…)

Set surfaces names from a Surface_points object.

set_surfaces_values(values_array[, …])

Set values to be interpolated for each surfaces.

sort_surfaces()

Sort surfaces by series and order_surfaces

update_id([id_list])

Set id of the layers (1 based) :param id_list: :type id_list: list

__init__(series, surface_names=None, values_array=None, properties_names=None)[source]

Initialize self. See help(type(self)) for accurate signature.

update_id(id_list: list = None)[source]

Set id of the layers (1 based) :param id_list: :type id_list: list

Returns

Return type

Surfaces

set_surfaces_names(surfaces_list: list, update_df=True)[source]

Method to set the names of the surfaces in order. This applies in the surface column of the df

Parameters
  • surfaces_list (list[str]) – list of names of surfaces. They are ordered.

  • update_df (bool) – Update Surfaces.df columns with the default values

Returns

Return type

Surfaces

set_default_surface_name()[source]

Set the minimum number of surfaces to compute a model i.e. surfaces_names: surface1 and basement

Returns

Return type

Surfaces

set_surfaces_names_from_surface_points(surface_points)[source]

Set surfaces names from a Surface_points object. This can be useful if the surface points are imported from a table.

Parameters

surface_points (Surface_points) –

Returns:

add_surface(surface_list: Union[str, list], update_df=True)[source]

Add surface to the df.

Parameters
  • surface_list (str, list) – name or list of names of the surfaces to apply the functionality

  • update_df (bool) – Update Surfaces.df columns with the default values

Returns

gempy.core.data.Surfaces

delete_surface(indices: Union[int, str, list, numpy.ndarray], update_id=True)[source]

[s1] Drop specified labels from rows or columns.

Parameters
  • indices (str, list) – name or list of names of the series to apply the functionality

  • update_id (bool) – if true [s0] Set id of the layers (1 based) Args: id_list (list):

Returns

Return type

Surfaces

rename_surfaces(to_replace: Union[str, list, dict], **kwargs)[source]

Replace values given in to_replace with value.

Parameters
Returns

gempy.core.data.Surfaces

modify_order_surfaces(new_value: int, idx: int, series_name: str = None)[source]

Replace to the new location the old series

Parameters
  • new_value (int) – New location

  • idx (int) – Index of the surface to be moved

  • series_name (str) – name of the series to be moved

Returns

gempy.core.data.Surfaces

sort_surfaces()[source]

Sort surfaces by series and order_surfaces

set_basement()[source]

Set isBasement property to true to the last series of the df.

Returns

Return type

Surfaces

map_series(mapping_object: Union[dict, pandas.core.frame.DataFrame] = None)[source]

Method to map to which series every surface belongs to. This step is necessary to assign differenct tectonics such as unconformities or faults.

Parameters

mapping_object (dict, pn.DataFrame) –

  • dict: keys are the series and values the surfaces belonging to that series

  • pn.DataFrame: Dataframe with surfaces as index and a column series with the correspondent series name of each surface

Returns

Surfaces

add_surfaces_values(values_array: Union[numpy.ndarray, list], properties_names: list = array([], dtype=float64))[source]

Add values to be interpolated for each surfaces.

Parameters
  • values_array (np.ndarray, list) – array-like of the same length as number of surfaces. This functionality can be used to assign different geophysical properties to each layer

  • properties_names (list) – list of names for each values_array columns. This must be of same size as values_array axis 1. By default properties will take the column name: ‘value_X’.

Returns

gempy.core.data.Surfaces

delete_surface_values(properties_names: Union[str, list])[source]

Delete a property or several properties column.

Parameters

properties_names (str, list[str]) – Name of the property to delete

Returns

gempy.core.data.Surfaces

set_surfaces_values(values_array: Union[numpy.ndarray, list], properties_names: list = array([], dtype=float64))[source]

Set values to be interpolated for each surfaces. This method will delete the previous values.

Parameters
  • values_array (np.ndarray, list) – array-like of the same length as number of surfaces. This functionality can be used to assign different geophysical properties to each layer

  • properties_names (list) – list of names for each values_array columns. This must be of same size as values_array axis 1. By default properties will take the column name: ‘value_X’.

Returns

gempy.core.data.Surfaces

modify_surface_values(idx, properties_names, values)[source]

Method to modify values using loc of pandas.

Parameters
Returns

gempy.core.data.Surfaces