fmu.tools.utilities package
Submodules
fmu.tools.utilities.sample_attributes module
Sample attributes on grid resolution as dataframe points sets.
This usage is for setting attributes on grid resolution, e.g. a seismic attribute (from a map) combined with a region parameter from the same 3D grid.
This is targeted to the “sim2seis” workflow in FMU.
- class fmu.tools.utilities.sample_attributes.Attrs(value)[source]
Bases:
str
,Enum
An enumeration.
- OBS = 'OBS'
- OBS_ERROR = 'OBS_ERROR'
- REGION = 'REGION'
- VALUES = 'VALUES'
- class fmu.tools.utilities.sample_attributes.Position(value)[source]
Bases:
str
,Enum
An enumeration.
- TOP = 'top'
- CENTER = 'center'
- BASE = 'base'
- fmu.tools.utilities.sample_attributes.sample_attributes_for_sim2seis(grid, attribute, attribute_error=0.05, attribute_error_minimum=None, region=None, zone=None, position=('', <Position.CENTER: 'center'>), **kwargs)[source]
Sample attributes on grid resolution as poinst sets.
This usage is for setting attributes on grid resolution, e.g. a seismic attribute (from a map) combined with a region parameter from the grid.
This is targeted to the “sim2seis” workflow in FMU.
- Parameters:
grid (xtgeo.Grid) – The grid to sample the attributes on.
attribute (xtgeo.RegularSurface) – The seismic (or custom) map/surface to sample the attribute from.
attribute_error (xtgeo.RegularSurface | float) – The error to apply to the attribute (optional). Shall be absolute (positive) values. If the user wants to apply a polygons with different error values, the user can ise surface-polygons functions in xtgeo to achieve this.
attribute_error_minimum (float | None) – The minimum error to apply to the attribute (optional).
region (xtgeo.GridProperty | None) – The region parameter to sample from the grid (optional).
zone (xtgeo.GridProperty | None) – The zone parameter to sample from the grid (optional).
position (tuple[str, Position]) – The position to sample the attributes on the grid. This shall be given as a tuple, as e.g. (“MyZone”, “center”) where the first is zone name, and the second is vertical position (“top”, “center”, “base”) in that zone. Default is (“”, “center”) which will take the middle layer of the total grid. The zone name is case sensitive. If zone is not given, the full grid interval will be applied to determine the layer.
**kwargs (Any) – Additional keywords (developer settings).
- Returns:
Points with the sampled attributes and attributes combined.
- Return type:
pd.Dataframe
Module contents
- fmu.tools.utilities.sample_attributes_for_sim2seis(grid, attribute, attribute_error=0.05, attribute_error_minimum=None, region=None, zone=None, position=('', <Position.CENTER: 'center'>), **kwargs)[source]
Sample attributes on grid resolution as poinst sets.
This usage is for setting attributes on grid resolution, e.g. a seismic attribute (from a map) combined with a region parameter from the grid.
This is targeted to the “sim2seis” workflow in FMU.
- Parameters:
grid (xtgeo.Grid) – The grid to sample the attributes on.
attribute (xtgeo.RegularSurface) – The seismic (or custom) map/surface to sample the attribute from.
attribute_error (xtgeo.RegularSurface | float) – The error to apply to the attribute (optional). Shall be absolute (positive) values. If the user wants to apply a polygons with different error values, the user can ise surface-polygons functions in xtgeo to achieve this.
attribute_error_minimum (float | None) – The minimum error to apply to the attribute (optional).
region (xtgeo.GridProperty | None) – The region parameter to sample from the grid (optional).
zone (xtgeo.GridProperty | None) – The zone parameter to sample from the grid (optional).
position (tuple[str, Position]) – The position to sample the attributes on the grid. This shall be given as a tuple, as e.g. (“MyZone”, “center”) where the first is zone name, and the second is vertical position (“top”, “center”, “base”) in that zone. Default is (“”, “center”) which will take the middle layer of the total grid. The zone name is case sensitive. If zone is not given, the full grid interval will be applied to determine the layer.
**kwargs (Any) – Additional keywords (developer settings).
- Returns:
Points with the sampled attributes and attributes combined.
- Return type:
pd.Dataframe