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 isBasement property to true to the last series of the df.
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 a
Surface_points
object.set_surfaces_values
(values_array[, …])Set values to be interpolated for each 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
Attributes
basement
properties_val
-
__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: Optional[list] = None)[source]¶ Set id of the layers (1 based) :param id_list: :type id_list: list
- Returns
- Return type
-
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
-
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
-
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
- Returns
-
delete_surface
(indices: Union[int, str, list, numpy.ndarray], update_id=True)[source]¶ [s1] Drop specified labels from rows or columns.
-
rename_surfaces
(to_replace: Union[str, list, dict], **kwargs)[source]¶ Replace values given in to_replace with value.
- Parameters
- Returns
See also
-
modify_order_surfaces
(new_value: int, idx: int, series_name: Optional[str] = None)[source]¶ Replace to the new location the old series
- Parameters
- Returns
-
set_basement
()[source]¶ Set isBasement property to true to the last series of the df.
- Returns
- Return type
-
map_series
(mapping_object: Optional[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
-
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
-
delete_surface_values
(properties_names: Union[str, list])[source]¶ Delete a property or several properties column.
-
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