fmu.tools.domainconversion package
Submodules
fmu.tools.domainconversion.dconvert module
- class fmu.tools.domainconversion.dconvert.DomainConversion(depth_surfaces, time_surfaces, names=None, template=None, _nlay_cropper=(0, 0))[source]
Bases:
object
Domain conversion, tailored for fmu-sim2seis, but also works as standalone.
The principle is to use matching sets of time and depth surfaces to create a velocity (and slowness) model, and use that further to domain convert either seismic cubes or surfaces, time <=> depth.
- Parameters:
depth_surfaces – List of depth surfaces.
time_surfaces – List of time surfaces.
names – Optional list of names for the surfaces. If not provided, the names will be inferred from the input object, or (if missing) generated as “surf_0”, “surf_1”, etc.
template – Optional template surface to use for resampling the input surfaces. If not provided, the last time surface will be used as template.
Note
The input surfaces must be in the same sorted order, and the number of depth and time surfaces must be equal. The first surface does not need to be MSL. The surfaces must extend the full area of the model, and the subsequent surfaces or cubes to be converted must be inside the area of the surfaces that define the model.
Example
>>> from xtgeo import RegularSurface, Cube >>> from fmu.tools.domainconversion import DomainConversion >>> # read input surfaces into lists... >>> depth_surfaces_list = [xtgeo.surface_from_file("depth1.gri"), ...] >>> time_surfaces_list = [xtgeo.surface_from_file("time1.gri"), ...] >>> dc = DomainConversion(depth_surfaces_list, time_surfaces_list) >>> # read a cube... and convert the cube from time to depth >>> input_cube_in_time = xtgeo.cube_from_file("input_cube.segy") >>> result_cube_in_depth = dc.depth_convert_cube(input_cube_in_time)
- depth_surfaces: list[xtgeo.RegularSurface]
- time_surfaces: list[xtgeo.RegularSurface]
- names: list[str] | None = None
- template: xtgeo.RegularSurface | None = None
- property average_velocity_cube_in_time: xtgeo.Cube | None
- property average_slowness_cube_in_depth: xtgeo.Cube | None
- depth_convert_surfaces(insurfs)[source]
Use the current average velocity model/surfaces to perform depth conversion.
- Parameters:
insurfs – List of xtgeo surface objects (in time domain) to depth convert.
- time_convert_surfaces(insurfs)[source]
Use the average slowness model/cube to perform depth to time conversion.
- Parameters:
insurfs – List of xtgeo surface objects to time convert.
- depth_convert_cube(incube, zinc=None, zmin=None, zmax=None, undefined=-999.25)[source]
Depth convert a cube (time to depth).
- Parameters:
incube (xtgeo.Cube) – Input cube (in time domain) to convert.
zinc (float | None) – Proposed z increment for the output cube.
zmin (float | None) – Proposed z minimum for the output cube.
zmax (float | None) – Proposed z maximum for the output cube.
undefined (float) – Value to use for undefined values in the output cube.
- Return type:
xtgeo.Cube
Note
The proposed zinc, zmin, zmax are optional and will be calculated from the existing input surfaces (making the velocity/slowness model) if not provided. If given, the actual values may differ from the proposed values, for technical reasons.
- time_convert_cube(incube, tinc=None, tmin=None, tmax=None, undefined=-999.25)[source]
Time convert a cube (depth to time).
- Parameters:
incube (xtgeo.Cube) – Input cube (in depth domain) to convert.
tinc (float | None) – Proposed time increment for the output cube.
tmin (float | None) – Proposed time minimum for the output cube.
tmax (float | None) – Proposed time maximum for the output cube.
undefined (float) – Value to use for undefined values in the output cube.
- Return type:
xtgeo.Cube
Note
The proposed tinc, tmin, tmax are optional and will be calculated from the existing input surfaces (making the velocity/slowness model) if not provided. If given, the values may be adjusted for technical reasons.
Module contents
- class fmu.tools.domainconversion.DomainConversion(depth_surfaces, time_surfaces, names=None, template=None, _nlay_cropper=(0, 0))[source]
Bases:
object
Domain conversion, tailored for fmu-sim2seis, but also works as standalone.
The principle is to use matching sets of time and depth surfaces to create a velocity (and slowness) model, and use that further to domain convert either seismic cubes or surfaces, time <=> depth.
- Parameters:
depth_surfaces – List of depth surfaces.
time_surfaces – List of time surfaces.
names – Optional list of names for the surfaces. If not provided, the names will be inferred from the input object, or (if missing) generated as “surf_0”, “surf_1”, etc.
template – Optional template surface to use for resampling the input surfaces. If not provided, the last time surface will be used as template.
Note
The input surfaces must be in the same sorted order, and the number of depth and time surfaces must be equal. The first surface does not need to be MSL. The surfaces must extend the full area of the model, and the subsequent surfaces or cubes to be converted must be inside the area of the surfaces that define the model.
Example
>>> from xtgeo import RegularSurface, Cube >>> from fmu.tools.domainconversion import DomainConversion >>> # read input surfaces into lists... >>> depth_surfaces_list = [xtgeo.surface_from_file("depth1.gri"), ...] >>> time_surfaces_list = [xtgeo.surface_from_file("time1.gri"), ...] >>> dc = DomainConversion(depth_surfaces_list, time_surfaces_list) >>> # read a cube... and convert the cube from time to depth >>> input_cube_in_time = xtgeo.cube_from_file("input_cube.segy") >>> result_cube_in_depth = dc.depth_convert_cube(input_cube_in_time)
- depth_surfaces: list[xtgeo.RegularSurface]
- time_surfaces: list[xtgeo.RegularSurface]
- names: list[str] | None = None
- template: xtgeo.RegularSurface | None = None
- property average_velocity_cube_in_time: xtgeo.Cube | None
- property average_slowness_cube_in_depth: xtgeo.Cube | None
- depth_convert_surfaces(insurfs)[source]
Use the current average velocity model/surfaces to perform depth conversion.
- Parameters:
insurfs – List of xtgeo surface objects (in time domain) to depth convert.
- time_convert_surfaces(insurfs)[source]
Use the average slowness model/cube to perform depth to time conversion.
- Parameters:
insurfs – List of xtgeo surface objects to time convert.
- depth_convert_cube(incube, zinc=None, zmin=None, zmax=None, undefined=-999.25)[source]
Depth convert a cube (time to depth).
- Parameters:
incube (xtgeo.Cube) – Input cube (in time domain) to convert.
zinc (float | None) – Proposed z increment for the output cube.
zmin (float | None) – Proposed z minimum for the output cube.
zmax (float | None) – Proposed z maximum for the output cube.
undefined (float) – Value to use for undefined values in the output cube.
- Return type:
xtgeo.Cube
Note
The proposed zinc, zmin, zmax are optional and will be calculated from the existing input surfaces (making the velocity/slowness model) if not provided. If given, the actual values may differ from the proposed values, for technical reasons.
- time_convert_cube(incube, tinc=None, tmin=None, tmax=None, undefined=-999.25)[source]
Time convert a cube (depth to time).
- Parameters:
incube (xtgeo.Cube) – Input cube (in depth domain) to convert.
tinc (float | None) – Proposed time increment for the output cube.
tmin (float | None) – Proposed time minimum for the output cube.
tmax (float | None) – Proposed time maximum for the output cube.
undefined (float) – Value to use for undefined values in the output cube.
- Return type:
xtgeo.Cube
Note
The proposed tinc, tmin, tmax are optional and will be calculated from the existing input surfaces (making the velocity/slowness model) if not provided. If given, the values may be adjusted for technical reasons.