GXVOX class¶
-
class
GXVOX
(handle=0)[source]¶ GXVOX class.
High Performance 3D Grid. Designed for accessing 3D grids quickly using slices. It designed arround non-uniform multi-resolution compressed storage. To sample a voxel at specific locations, use
GXVOXE
.-
add_generate_by_subset_pg
(pg, dir, offset)[source]¶ Add a subset 3D pagers. These should be “slabs”, 16 wide in the input direction, and the size of the full voxel in the other two directions.
- Parameters
New in version 8.5.
License: Geosoft Open License
Note: See
init_generate_by_subset_pg
andend_generate_by_subset_pg
.
-
calc_stats
(st)[source]¶ Calculate Statistics
New in version 6.2.
License: Geosoft Open License
-
can_append_to
(surface_file)[source]¶ Check if this voxel can append to a surface file.
- Parameters
surface_file (str) – Surface file
- Returns
1 if can append
- Return type
int
New in version 8.0.
License: Geosoft Open License
-
classmethod
compute_cell_size
(min_x, min_y, min_z, max_x, max_y, max_z)[source]¶ Compute the Cell size based on specific Area
- Parameters
min_x (float) – MinX
min_y (float) – MinY
min_z (float) – MinZ
max_x (float) – MaxX
max_y (float) – MaxY
max_z (float) – MaxZ
- Returns
Cell Size
- Return type
float
New in version 6.4.
License: Geosoft Open License
-
convert_density_to_velocity
(input_scaling_factor, input_lower_bound, input_upper_bound, a5, a4, a3, a2, a1, a0, output_scaling_factor, output_voxel_filename)[source]¶ Produces a velocity voxel using the density values in this voxel.
- Parameters
input_scaling_factor (float) – 1.0, if this voxel is in g/cm^3. Otherwise, a value by which each input cell is multiplied to convert it into g/cm^3.
input_lower_bound (float) – Lower bound on velocity values, in g/vm^3. If the input value (after being pre-multiplied by dInputScalingFactor) is less than this value, the output cell value will be DUMMY.
input_upper_bound (float) – Upper bound on velocity values, in g/cm^3. If the input value (after being pre-multiplied by dInputScalingFactor) is greater than this value, the output cell value will be DUMMY.
a5 (float) – Coefficient of fifth-order polynomial term.
a4 (float) – Coefficient of fourth-order polynomial term.
a3 (float) – Coefficient of third-order polynomial term.
a2 (float) – Coefficient of second-order polynomial term.
a1 (float) – Coefficient of first-order polynomial term.
a0 (float) – Constant offset of output.
output_scaling_factor (float) – 1.0, to produce an output voxel that has units of meters per second. If different units are desired, pass in a different value, which will be multiplied into each output voxel cell.
output_voxel_filename (str) – Filename of the output voxel.
New in version 8.4.
License: Geosoft Open License
-
convert_numeric_to_thematic
(vv_translate, output_vox)[source]¶ Convert numeric voxel to thematic (lithology) voxel
- Parameters
New in version 8.4.
License: Geosoft Open License
-
convert_thematic_to_numeric
(vv_translate, output_vox)[source]¶ Convert thematic (lithology) voxel to numeric voxel
- Parameters
New in version 8.4.
License: Geosoft Open License
-
convert_velocity_in_range_to_density
(input_scaling_factor, input_lower_bound, input_upper_bound, a5, a4, a3, a2, a1, a0, output_scaling_factor, output_voxel_filename)[source]¶ Produces a density voxel using the velocity values in this voxel, as long as the velocity values are in range.
- Parameters
input_scaling_factor (float) – 1.0, if this voxel is in meters per second. Otherwise, a value by which each input cell is multiplied to convert it into meters per second.
input_lower_bound (float) – Lower bound on velocity values, in meters per second. If the input value (after being pre-multiplied by dInputScalingFactor) is less than this value, the output cell value will be DUMMY.
input_upper_bound (float) – Upper bound on velocity values, in meters per second. If the input value (after being pre-multiplied by dInputScalingFactor) is greater than this value, the output cell value will be DUMMY.
a5 (float) – Coefficient of fifth-order polynomial term.
a4 (float) – Coefficient of fourth-order polynomial term.
a3 (float) – Coefficient of third-order polynomial term.
a2 (float) – Coefficient of second-order polynomial term.
a1 (float) – Coefficient of first-order polynomial term.
a0 (float) – Constant offset of output.
output_scaling_factor (float) – 1.0, to produce an output voxel that has units of g/cm^3. If different units are desired, pass in a different value, which will be multiplied into each output voxel cell.
output_voxel_filename (str) – Filename of the output voxel.
New in version 8.4.
License: Geosoft Open License
-
convert_velocity_to_density
(input_scaling_factor, a5, a4, a3, a2, a1, a0, output_scaling_factor, output_voxel_filename)[source]¶ Produces a density voxel using the velocity values in this voxel.
- Parameters
input_scaling_factor (float) – 1.0, if this voxel is in meters per second. Otherwise, a value by which each input cell is multiplied to convert it into meters per second.
a5 (float) – Coefficient of fifth-order polynomial term.
a4 (float) – Coefficient of fourth-order polynomial term.
a3 (float) – Coefficient of third-order polynomial term.
a2 (float) – Coefficient of second-order polynomial term.
a1 (float) – Coefficient of first-order polynomial term.
a0 (float) – Constant offset of output.
output_scaling_factor (float) – 1.0, to produce an output voxel that has units of g/cm^3. If different units are desired, pass in a different value, which will be multiplied into each output voxel cell.
output_voxel_filename (str) – Filename of the output voxel.
New in version 8.4.
License: Geosoft Open License
-
classmethod
create
(name)[source]¶ Create a handle to an
GXVOX
object- Parameters
name (str) – File Name
- Returns
GXVOX
handle, terminates if creation fails- Return type
New in version 6.2.
License: Geosoft Open License
-
create_pg
()[source]¶ Create a 3D
GXPG
from aGXVOX
objectNew in version 6.2.
License: Geosoft Open License
-
create_type_pg
(type)[source]¶ Create a 3D
GXPG
from aGXVOX
object with a specific Type- Parameters
type (int) – GS_TYPES constants
- Returns
GXPG
Object- Return type
New in version 6.2.
License: Geosoft Open License
-
dump
(name)[source]¶ Export all layers of this
GXVOX
in all directions.- Parameters
name (str) – Name of grids (each layers adds _Dir_Z to the name)
New in version 6.2.
License: Geosoft Open License
-
classmethod
dw_grid_db
(voxel, db, x, y, z, data, reg)[source]¶ dw_grid_db
Inverse-distance weighting gridding method,GXDB
version, 3D.- Parameters
New in version 8.4.
License: Geosoft End-User License
Note: 3D cells take on the averaged values within a search radius, weighted inversely by distance.
Weighting can be controlled using the power and slope properties;
weighting = 1 / (distance^wtpower + 1/slope) where distance is in units of grid cells (X dimenstion). Default is 0.0,
If the blanking distance is set, all cells whose center point is not within the blanking distance of at least one data point are set to dummy.
GXREG
Parameters:X0, Y0, Z0, DX, DY, DZ: Voxel origin, and cell sizes (required) WT_POWER (default=2), WT_SLOPE (default=1) Weighting function parameters SEARCH_RADIUS: Distance weighting limit (default = 4 * CUBE_ROOT(DX*DY*DZ)) BLANKING_DISTANCE: Dummy values farther from data than this distance. (default = 4 * CUBE_ROOT(DX*DY*DZ)) LOG: Apply log transform to input data before gridding (0:No (default), 1:Yes)? LOG_BASE: One of
VV_LOG_BASE_10
(default) orVV_LOG_BASE_E
LOG_NEGATIVE: One ofVV_LOG_NEGATIVE_NO
(default) orVV_LOG_NEGATIVE_YES
-
end_generate_by_subset_pg
(name, ox, oy, oz, cx, cy, cz, ipj, meta)[source]¶ Output the voxel, after adding all the subset PGs.
- Parameters
New in version 8.5.
License: Geosoft Open License
Note: You must begin by calling
init_generate_by_subset_pg
and add data usingadd_generate_by_subset_pg
.
-
export_db
(db, chan, dir, rev_x, rev_y, rev_z, dummies)[source]¶ Export a Voxel to a database
- Parameters
db (GXDB) – Database
chan (str) – Channel Name
dir (int) – VOX_DIRECTION constants
rev_x (int) – Reverse X ? (0/1)
rev_y (int) – Reverse Y ? (0/1)
rev_z (int) – Reverse Z ? (0/1)
dummies (int) – Write Dummies? (0/1)
New in version 6.3.
License: Geosoft Open License
Note: The database lines contain a slice of the voxel at a time.
-
export_img
(name, dir)[source]¶ Export all layers of this
GXVOX
into grid files.- Parameters
name (str) – Name of grids (each layers adds _Number to the name)
dir (int) – VOX_DIR constants
New in version 6.2.
License: Geosoft Open License
-
classmethod
export_ji_gs_xml
(voxel, file)[source]¶ Export a
GXVOX
to a compressed XML file. Verbose version.- Parameters
voxel (str) – Voxel file name
file (str) – Output XML file
New in version 8.4.
License: Geosoft Open License
-
export_seg_y
(output_segy_filename, sample_interval)[source]¶ Export a voxel to a depth SEG-Y file
- Parameters
output_segy_filename (str) – SEG-Y filename to create
sample_interval (float) – Sampling interval (can be
GS_R8DM
if input voxel has constant Z cell size)
New in version 8.5.
License: Geosoft Open License
-
export_to_grids
(name, dir, start, incr, num, cell_size, interp)[source]¶ Export all layers of this
GXVOX
into grid files, with optional cell size.- Parameters
name (str) – Name of grids (each layers adds _Number to the name)
dir (int) – VOX_DIR constants
start (int) – Starting index
incr (int) – Increment in index
num (int) – Total number of grids (-1 or
iDUMMY
for all)cell_size (float) – Cell size (can be
GS_R8DM
)interp (int) – VOX_SLICE_MODE constants
New in version 7.3.
License: Geosoft Open License
Note: If the cell size is not specified, then: 1. If the cell sizes are uniform in a given direction, that size is used 2. If the cell sizes are variable in a given direction, then the smallest size is used
-
classmethod
export_xml
(voxel, crc, file)[source]¶ Export a
GXVOX
to a compressed XML file- Parameters
voxel (str) – Voxel file name
crc (int_ref) – CRC returned - not implemented - always returns 0.
file (str) – Output XML file
New in version 6.2.
License: Geosoft Open License
-
export_xyz
(xyz, dir, rev_x, rev_y, rev_z, dummies)[source]¶ Export a Voxel to an XYZ File
- Parameters
xyz (str) – File Name
dir (int) – VOX_DIRECTION constants
rev_x (int) – Reverse X ? (0/1)
rev_y (int) – Reverse Y ? (0/1)
rev_z (int) – Reverse Z ? (0/1)
dummies (int) – Write Dummies? (0/1)
New in version 6.3.
License: Geosoft Open License
-
filter
(filter, filter_file, n_passes, interpolate_dummies, output_vox)[source]¶ Apply a 3D filter to a voxel.
- Parameters
filter (int) – VOX_FILTER3D constants
filter_file (str) – Filter file, if filter is
VOX_FILTER3D_FILE
n_passes (int) – Number of filter passes
interpolate_dummies (int) – (1: interpolate dummies)
output_vox (str) – Output voxel file name.
New in version 7.3.
License: Geosoft End-User License
-
classmethod
generate_db
(voxel_file, db, symb)[source]¶ Generate a
GXVOX
from a Database- Parameters
New in version 6.3.
License: Geosoft Open License
-
classmethod
generate_gocad
(name, header, property, ipj)[source]¶ Generate a
GXVOX
from a GOCAD File- Parameters
name (str) – Name of output
GXVOX
header (str) – Name of GOCAD Voxel file
property (str) – Propert name to import
- Returns
GXVOX
Object- Return type
New in version 6.2.
License: Geosoft Open License
-
classmethod
generate_oriented_gocad
(name, header, property, ipj, orientation)[source]¶ Generate a
GXVOX
from a GOCAD File- Parameters
name (str) – Name of output
GXVOX
header (str) – Name of GOCAD Voxel file
property (str) – Propert name to import
orientation (int) – VOX_GOCAD_ORIENTATION constants
- Returns
GXVOX
Object- Return type
New in version 6.3.
License: Geosoft Open License
Note: Allows the Orientation flag to be specified.
-
classmethod
generate_pg
(name, pg, ox, oy, oz, cx, cy, cz, ipj, meta)[source]¶ Generate a
GXVOX
from a 3D Pager- Parameters
- Returns
GXVOX
Object- Return type
New in version 6.2.
License: Geosoft Open License
-
classmethod
generate_pgvv
(name, pg, ox, oy, oz, cx, cy, cz, ipj, meta)[source]¶ Generate a
GXVOX
from a 3D Pager, cells sizes passed in VVs.- Parameters
- Returns
GXVOX
Object- Return type
New in version 8.0.
License: Geosoft Open License
Note: The input cell size VVs’ lengths must match the input
GXPG
dimensions.
-
classmethod
generate_ubc
(name, mesh, mod, dummy, ipj)[source]¶ Generate a
GXVOX
from a UBC File- Parameters
- Returns
GXVOX
Object- Return type
New in version 6.2.
License: Geosoft Open License
-
classmethod
generate_vector_voxel_from_db
(voxel_file, db, type, symb_x, symb_y, symb_z, inc, dec)[source]¶ Generate a vector voxel
GXVOX
from a Database- Parameters
voxel_file (str) – Voxel Name
type (int) – VOX_VECTORVOX_IMPORTImport XYZ, UVW or Amplitude/Inclination/Declination channels
symb_x (int) – Symbol to import X, U or Amplitude data from
symb_y (int) – Symbol to import Y, V or Inclination data from
symb_z (int) – Symbol to import Z, W or Declination data from
inc (float) – Inclination value for
VOX_VECTORVOX_UVW
(-90° to 90°)dec (float) – Declination value for
VOX_VECTORVOX_UVW
(-180° to 180°)
New in version 8.5.
License: Geosoft Open License
-
classmethod
generate_xyz
(name, ra, type, ipj)[source]¶ Generate a
GXVOX
from an XYZ File- Parameters
name (str) – Voxel Name
type (int) – Data Type GS_TYPES constants
ipj (GXIPJ) – Projection
New in version 6.3.
License: Geosoft Open License
-
get_area
(min_x, min_y, min_z, max_x, max_y, max_z)[source]¶ Get the area of the voxel.
- Parameters
New in version 6.2.
License: Geosoft Open License
-
get_cell_size_strings
(loc_x, loc_y, loc_z, scale_x, scale_y, scale_z)[source]¶ Get the Location Strings
- Parameters
New in version 6.3.1.
License: Geosoft Open License
-
get_double_location
(origin_x, origin_y, origin_z, vect_xx, vect_xy, vect_xz, vect_yx, vect_yy, vect_yz, vect_zx, vect_zy, vect_zz)[source]¶ Get the location of a voxel with origin and scaled xyz vectors
- Parameters
origin_x (float_ref) – Origin X
origin_y (float_ref) – Origin Y
origin_z (float_ref) – Origin Z
vect_xx (float_ref) – VectX X
vect_xy (float_ref) – VectX Y
vect_xz (float_ref) – VectX Z
vect_yx (float_ref) – VectY X
vect_yy (float_ref) – VectY Y
vect_yz (float_ref) – VectY Z
vect_zx (float_ref) – VectZ X
vect_zy (float_ref) – VectZ Y
vect_zz (float_ref) – VectZ Z
New in version 6.3.
License: Geosoft Open License
-
get_gocad_location
(origin_x, origin_y, origin_z, vect_xx, vect_xy, vect_xz, vect_yx, vect_yy, vect_yz, vect_zx, vect_zy, vect_zz)[source]¶ Get the location of a voxel with origin and scaled xyz vectors for use with GOCAD.
- Parameters
origin_x (float_ref) – Origin X
origin_y (float_ref) – Origin Y
origin_z (float_ref) – Origin Z
vect_xx (float_ref) – VectX X
vect_xy (float_ref) – VectX Y
vect_xz (float_ref) – VectX Z
vect_yx (float_ref) – VectY X
vect_yy (float_ref) – VectY Y
vect_yz (float_ref) – VectY Z
vect_zx (float_ref) – VectZ X
vect_zy (float_ref) – VectZ Y
vect_zz (float_ref) – VectZ Z
New in version 7.0.
License: Geosoft Open License
Note: This is used for GOCAD voxel calculations, and begins with the origin at (0,0,0), not the actual location of the corner point.
-
get_grid_section_cell_sizes
(az, cell_size_x, cell_size_y)[source]¶ Get default cell sizes in X and Y for a section grid.
- Parameters
New in version 6.4.
License: Geosoft Open License
Note: This function determines default cell sizes for a vertical grid slicing a voxel. It tries to match the “X” and “Y” sizes (in the grid coordinates) with the projection of the voxel’s cells onto the grid plane. It uses a few simple rules:
If the voxel is rotated about a horizontal axis (i.e. if its own “Z” axis is not vertical, then both cell sizes are set to the smallest voxel dimension (a single volume pixel) in X, Y and Z.
If the voxel is “horizontal”, then the angle between the section azimuth and the voxel’s own X and Y axes is used to calculate a value which varies between the minimum X size and the minimum Y size, and this is used for the grid’s “X” cell size. (in other words, if the section is parallel to the voxel “X” axis, then the returned “X” cells size is equal to the voxel’s minimum “Y” cell size. The grid’s “Y” cell size is set to the voxel’s minimum “Z” cell size.
-
get_info
(type, array, x, y, z)[source]¶ Get information about a voxel.
- Parameters
New in version 6.2.
License: Geosoft Open License
-
get_ipj
(ipj)[source]¶ Get the projection of the voxel.
New in version 6.2.
License: Geosoft Open License
-
get_limits
(min_x, min_y, min_z, max_x, max_y, max_z)[source]¶ Get the range of indices with non-dummy data.
- Parameters
min_x (int_ref) – Index of minimum valid data in X.
min_y (int_ref) – Index of minimum valid data in Y.
min_z (int_ref) – Index of minimum valid data in Z.
max_x (int_ref) – Index of maximum valid data in X.
max_y (int_ref) – Index of maximum valid data in Y.
max_z (int_ref) – Index of maximum valid data in Z.
New in version 6.4.
License: Geosoft Open License
Note: Find the non-dummy volume of a
GXVOX
object. If the voxel is all dummies, returnsiMAX
for the minima, andiMIN
for the maxima.
-
get_limits_xyz
(min_x, min_y, min_z, max_x, max_y, max_z)[source]¶ Get the range in true XYZ of non-dummy data.
- Parameters
New in version 6.4.
License: Geosoft Open License
Note: Find the non-dummy volume of a
GXVOX
in true (X, Y, Z). This method works for voxels which are rotated or oriented in 3D, and returns the true min and max X, Y and Z limits in the data. The bounds are the bounds for the voxel center points. If the voxel is all dummies, returnsrMAX
for the minima, andrMIN
for the maxima.
-
get_location
(origin_x, origin_y, origin_z, vv_x, vv_y, vv_z)[source]¶ Get Location information
- Parameters
New in version 6.2.
License: Geosoft Open License
-
get_location_points
(vv_x, vv_y, vv_z)[source]¶ Get the computed location points.
New in version 6.3.
License: Geosoft Open License
-
get_meta
(meta)[source]¶ Get the metadata of a voxel.
New in version 6.2.
License: Geosoft Open License
-
classmethod
get_multi_voxset_guid
(voxel_file, p_uuid_string)[source]¶ Get the UUID
- Parameters
voxel_file (str) – Input Voxel file
p_uuid_string (str_ref) – UUID string returned
New in version 9.3.
License: Geosoft Open License
-
get_simple_location
(origin_x, origin_y, origin_z, cell_x, cell_y, cell_z)[source]¶ Get Simple Location information
- Parameters
New in version 6.2.
License: Geosoft Open License
-
get_stats
()[source]¶ Get precomputed statistics on this object.
New in version 6.2.
License: Geosoft Open License
-
get_tpat
(tpat)[source]¶ Get a copy of a thematic voxel’s
GXTPAT
object.New in version 7.0.
License: Geosoft Open License
Note: Each row in the
GXTPAT
object corresponds to a stored index value in the thematic voxel. TheGXTPAT
should NOT be modified by the addition or deletion of items, if it is to be restored into theGXVOX
object, but the CODE, LABEL, DESCRIPTION or COLOR info can be changed. TheGXTPAT
object is stored inside theGXVOX
GXMETA
object.
-
classmethod
grid_points
(name, error, cell_size, var_only, min_radius, max_radius, min_points, max_points, model, power, slope, range, nugget, sill, type, vv_x, vv_y, vv_z, vv_d, ipj)[source]¶ Grid a
GXVOX
from pointGXVV
’s.- Parameters
name (str) – Name of output
GXVOX
error (str) – Name of error
GXVOX
(“” for none)cell_size (float) – Cell size (DUMMY for default)
var_only (int) – Variogram Only
min_radius (float) – Minimum Search Radius (DUMMY for none)
max_radius (float) – Maximum Search Radius (DUMMY for none)
min_points (int) – Minimum Search Points
max_points (int) – Maximum Search Points
model (int) – Model number 1-power, 2-sperical, 3-gaussian, 4-exponential
power (float) – Power
slope (float) – Slope
range (float) – Range
nugget (float) – Nugget
sill (float) – Sill
type (int) – GS_TYPES constants
- Returns
GXVOX
Object- Return type
New in version 6.2.
License: Geosoft Open License
-
classmethod
grid_points_z
(name, error, cell_size, cell_size_z, var_only, min_radius, max_radius, min_points, max_points, model, power, slope, range, nugget, sill, type, vv_x, vv_y, vv_z, vv_d, ipj)[source]¶ Grid a
GXVOX
from pointGXVV
’s (using variable Z’s)- Parameters
name (str) – Name of output
GXVOX
error (str) – Name of error
GXVOX
(“” for none)cell_size (float) – Cell size (DUMMY for default)
cell_size_z (str) – Cell size in Z (“” for default)
var_only (int) – Variogram Only
min_radius (float) – Minimum Search Radius (DUMMY for none)
max_radius (float) – Maximum Search Radius (DUMMY for none)
min_points (int) – Minimum Search Points
max_points (int) – Maximum Search Points
model (int) – Model number 1-power, 2-sperical, 3-gaussian, 4-exponential
power (float) – Power
slope (float) – Slope
range (float) – Range
nugget (float) – Nugget
sill (float) – Sill
type (int) – GS_TYPES constants
- Returns
GXVOX
Object- Return type
New in version 6.4.
License: Geosoft Open License
-
classmethod
grid_points_z_ex
(name, error, cell_size, cell_size_z, var_only, min_radius, max_radius, min_points, max_points, model, power, slope, range, nugget, sill, strike, dip, plunge, along_strike_weight, down_dip_weight, type, vv_x, vv_y, vv_z, vv_d, ipj)[source]¶ Grid a
GXVOX
from pointGXVV
’s (using variable Z’s)- Parameters
name (str) – Name of output
GXVOX
error (str) – Name of error
GXVOX
(“” for none)cell_size (float) – Cell size (DUMMY for default)
cell_size_z (str) – Cell size in Z (“” for default)
var_only (int) – Variogram Only
min_radius (float) – Minimum Search Radius (DUMMY for none)
max_radius (float) – Maximum Search Radius (DUMMY for none)
min_points (int) – Minimum Search Points
max_points (int) – Maximum Search Points
model (int) – Model number 1-power, 2-sperical, 3-gaussian, 4-exponential
power (float) – Power
slope (float_ref) – Slope
range (float_ref) – Range
nugget (float) – Nugget
sill (float_ref) – Sill
strike (float) – Strike
dip (float) – Dip
plunge (float) – Plunge
along_strike_weight (float) – Strike Weight
down_dip_weight (float) – Dip Plane Weight
type (int) – GS_TYPES constants
- Returns
GXVOX
Object- Return type
New in version 6.4.
License: Geosoft Open License
-
classmethod
init_generate_by_subset_pg
(data_type, nx, ny, nz)[source]¶ Initialize the generate of a
GXVOX
from a series of 3D subset pagers- Parameters
data_type (int) – GS_TYPES constants
nx (int) – Points in X
ny (int) – Points in Y
nz (int) – Points in Z
- Returns
GXVOX
Object- Return type
New in version 8.5.
License: Geosoft Open License
Note: Call
init_generate_by_subset_pg
first, then add a series of subset PGs usingadd_generate_by_subset_pg
, and finally serialize usingend_generate_by_subset_pg
-
invert_z
(output_voxel_filename)[source]¶ Convert an inverted voxel to normal orientation
- Parameters
output_voxel_filename (str) – Output voxel file name.
New in version 8.4.
License: Geosoft Open License
-
is_null
()[source]¶ Check if this is a null (undefined) instance
- Returns
True if this is a null (undefined) instance, False otherwise.
- Return type
bool
-
is_thematic
()[source]¶ Is this a thematic voxel?
- Returns
1 if
GXVOX
is thematic- Return type
int
New in version 7.0.
License: Geosoft Open License
Note: A thematic voxel is one where the stored integer values represent indices into an internally stored
GXTPAT
object. Thematic voxels contain their own color definitions, and normal numerical operations, such as applying ITRs for display, are not valid.
-
is_vector_voxel
()[source]¶ Is this a vector voxel?
- Returns
1 if
GXVOX
is a vector voxel- Return type
int
New in version 8.2.
License: Geosoft Open License
Note: A vector voxel is one where each data element consists of 3 4-byte float values. Vector voxels normally have the file type “geosoft_vectorvoxel”.
-
classmethod
krig
(name, cell_size, type, vv_x, vv_y, vv_z, vv_d, ipj, reg)[source]¶ A more compact and extensible form of
log_grid_points_z_ex
.- Parameters
- Returns
GXVOX
Object- Return type
New in version 8.2.
License: Geosoft Open License
Note: Optional Parameters.
If these values are not set in the
GXREG
, then default parameters will be used.ERROR_VOXEL: Name of error
GXVOX
(“” for none) CELLSIZEZ: Z Cell size string (space delimited, “” for default) RADIUS_MIN: Minimum Search Radius (REAL) (Default = 4) (Blanking Distance) RADIUS_MAX: Maximum Search Radius (REAL) (Default = 16) SEARCH_MIN: Minimum Search Points (INT) (Default = 16) SEARCH_MAX: Maximum Search Points (INT) (Default = 32) VARIOGRAM_ONLY: Set to 1 to calculate the variogram only (INT) (Default = 0) MODEL: Variogram Model number 1-power, 2-sperical, 3-gaussian, 4-exponential (INT) (Default = 2) POWER: Power (Default = DUMMY) SLOPE: Slope (REAL) (if input is DUMMY, value calculated and set on return) RANGE: Range (REAL) (if input is DUMMY, value calculated and set on return) SILL : Sill (REAL) (if input is DUMMY, value calculated and set on return) STRIKE: Strike (REAL) (Default = 0) DIP: Dip (REAL) (Default = 90) PLUNGE: Plunge (REAL) (Default = 0) STRIKE WEIGHT: Along-Strike Weight (REAL) (Default = 1) DIP_WEIGHT: Down-Dip Weight (REAL) (Default = 1) LOG_OPT: One of VOX_GRID_LOGOPT constants (Default = 0) MIN_LOG: Log Minimum (REAL) (Default = 1) MIN_X: Minimum X (REAL) (default = DUMMY to determine from the data. If input, nearest lt. or eq. multiple of cell size chosen) MAX_X: Maximum X (REAL) (default = DUMMY to determine from the data. If input, nearest gt. or eq. multiple of cell size chosen) MIN_Y: Minimum Y (REAL) (default = DUMMY to determine from the data. If input, nearest lt. or eq. external multiple of cell size chosen) MAX_Y: Maximum Y (REAL) (default = DUMMY to determine from the data. If input, nearest gt. or eq. multiple of cell size chosen) MIN_Z: Minimum Z (REAL) (default = DUMMY to determine from the data. If input, nearest lt. or eq. multiple of cell size chosen) MAX_Z: Maximum Z (REAL) (default = DUMMY to determine from the data. If input, nearest gt. or eq. multiple of cell size chosen)A more compact and extensible form oflog_grid_points_z_ex
. Only the most basic parameters are entered directly. Optional parameters are passed via aGXREG
object.
-
classmethod
list_gocad_properties
(header, lst)[source]¶ List all the properties available in this GOCAD file.
- Parameters
header (str) – Name of GOCAD Voxel file
lst (GXLST) – List object to populate
New in version 6.2.
License: Geosoft Open License
-
classmethod
log_grid_points_z_ex
(name, error, cell_size, cell_size_z, var_only, min_radius, max_radius, min_points, max_points, model, power, slope, range, nugget, sill, strike, dip, plunge, along_strike_weight, down_dip_weight, log_opt, min_log, type, vv_x, vv_y, vv_z, vv_d, ipj)[source]¶ Log grid a
GXVOX
from pointGXVV
’s (using variable Z’s)- Parameters
name (str) – Name of output
GXVOX
error (str) – Name of error
GXVOX
(“” for none)cell_size (float) – Cell size (DUMMY for default)
cell_size_z (str) – Cell size in Z (“” for default)
var_only (int) – Variogram Only
min_radius (float) – Minimum Search Radius (DUMMY for none)
max_radius (float) – Maximum Search Radius (DUMMY for none)
min_points (int) – Minimum Search Points
max_points (int) – Maximum Search Points
model (int) – Model number 1-power, 2-sperical, 3-gaussian, 4-exponential
power (float) – Power
slope (float_ref) – Slope
range (float_ref) – Range
nugget (float) – Nugget
sill (float_ref) – Sill
strike (float) – Strike
dip (float) – Dip
plunge (float) – Plunge
along_strike_weight (float) – Strike Weight
down_dip_weight (float) – Dip Plane Weight
log_opt (int) – VOX_GRID_LOGOPT constants Log Option
min_log (float) – Minimum log
type (int) – GS_TYPES constants
- Returns
GXVOX
Object- Return type
New in version 7.2.
License: Geosoft Open License
-
classmethod
math
(master, mastervar, output, outvar, formula, lst)[source]¶ Produces a new voxes using a formula on existing voxels/Grids
- Parameters
- Returns
VOXEL handle
- Return type
New in version 6.3.
License: Geosoft Open License
Note: The input voxels must all be of the same type.
-
merge
(vox2, reg, output_vox)[source]¶ Merge two Voxels.
- Parameters
New in version 7.3.
License: Geosoft End-User License
-
classmethod
nearest_neighbour_grid
(name, cell_size, max_radius, type, vv_x, vv_y, vv_z, vv_d, ipj)[source]¶ Grid a
GXVOX
from pointGXVV
’s using the Nearest Neighbours method.- Parameters
- Returns
GXVOX
Object- Return type
New in version 7.0.
License: Geosoft Open License
-
re_grid
(vox_to_regrid, reg, output_vox)[source]¶ Regrid a Voxel.
- Parameters
New in version 7.3.
License: Geosoft End-User License
-
resample_pg
(ipj, orig_x, orig_y, orig_z, spacing_x, spacing_y, spacing_z, size_x, size_y, size_z, min_z, max_z, interp)[source]¶ Resample a voxel over an input volume to a
GXPG
.- Parameters
ipj (GXIPJ) – Projection to use for Origin, Spacing values
orig_x (float) – Origin X
orig_y (float) – Origin Y
orig_z (float) – Origin Z
spacing_x (float) – Spacing in X
spacing_y (float) – Spacing in Y
spacing_z (float) – Spacing in Z
size_x (int) – Samples in X
size_y (int) – Samples in Y
size_z (int) – Samples in Z
min_z (float) – Minimum Z to resample (can be
rDUMMY
)max_z (float) – Maximum Z to resample (can be
rDUMMY
)interp (int) – VOX_SLICE_MODE constants
- Returns
GXPG
object, terminates on error- Return type
New in version 8.0.
License: Geosoft Open License
Note: Creates and dummies a
GXPG
object based on the input dimensions, then resamples the voxel to the pager at the locations determined by input projection, origin and spacings.
-
rescale_cell_sizes
(scale)[source]¶ Multiply all cell sizes by a fixed factor.
- Parameters
scale (float) – Scaling factor (>0)
New in version 7.3.
License: Geosoft Open License
Note: This is useful, for instance for converting sizes in one unit to sizes in another unit if changing the projection and the projection’s unit changes, since the voxel inherits its projection’s units.
-
sample_cdi
(db, line, x_ch, y_ch, elev_ch, negative_depths_down, topo_ch, mode, out_ch)[source]¶ Sample a voxel at locations/elevations in a CDI database.
- Parameters
db (GXDB) – CDI Database handle
line (int) – Line handle
x_ch (int) – X channel handle
y_ch (int) – Y channel handle
elev_ch (int) – Depth array channel handle
negative_depths_down (int) – Depths sign: 0 - positive down, 1 - negative down
topo_ch (int) – Elevation channel handle (can be
NULLSYMB
)mode (int) – Interpolation mode: 0 - linear, 1 - nearest
out_ch (str) – Output channel name
New in version 7.2.
License: Geosoft Open License
Note: A “CDI” database does not need to be conductivity/depth. It normally contains an array channel of depth values for each (X, Y) location, with corresponding data array channels of values taken at those (X, Y, Z) locations. If the optional elevation channel is used, its value is used as an offset to the depth channel values. Depths are positive down by default; use the “Negative depths down” parameter if the depths become more negative as you go deeper.
-
sample_cdi_to_topography
(db, line, x_ch, y_ch, zvv, mode, out_ch, topo_ch)[source]¶ Sample a voxel at fixed elevations along a path in a CDI database, and output them to an array channel, deleting leading dummy values, and writing the elevation of the first non-dummy item to a topography channel.
- Parameters
db (GXDB) – CDI Database handle
line (int) – Line handle
x_ch (int) – X channel handle
y_ch (int) – Y channel handle
zvv (GXVV) – Z values to sample at each X, Y
mode (int) – Interpolation mode: 0 - linear, 1 - nearest
out_ch (str) – Output data array channel name
topo_ch (str) – Output topography channel name
New in version 8.2.
License: Geosoft Open License
-
sample_vv
(xvv, yvv, zvv, interp, dvv)[source]¶ Sample a voxel at multiple locations.
- Parameters
New in version 8.2.
License: Geosoft Open License
Note: Sample at voxel at XYZ locations input in VVs. Values returned in a
GXVV
.
-
set_cell_size_strings
(loc_x, loc_y, loc_z)[source]¶ Set the Location Strings
- Parameters
loc_x (str) – X String
loc_y (str) – Y String
loc_z (str) – Z String
- Returns
0 - Ok 1 - Invalid data
- Return type
int
New in version 6.3.1.
License: Geosoft Open License
-
set_ipj
(ipj)[source]¶ Set the projection of the voxel.
New in version 6.2.
License: Geosoft Open License
-
set_location
(origin_x, origin_y, origin_z, vv_x, vv_y, vv_z)[source]¶ Set Location information
- Parameters
New in version 6.2.
License: Geosoft Open License
-
set_meta
(meta)[source]¶ Set the metadata of a voxel.
New in version 6.2.
License: Geosoft Open License
-
set_origin
(origin, origin_x, origin_y, origin_z)[source]¶ Set the Voxel Origin
- Parameters
origin (int) – Type of origin being set VOX_ORIGIN constants
origin_x (float) – Origin X
origin_y (float) – Origin Y
origin_z (float) – Origin Z
New in version 6.3.1.
License: Geosoft Open License
-
set_simple_location
(origin_x, origin_y, origin_z, cell_x, cell_y, cell_z)[source]¶ Set Simple Location information
- Parameters
New in version 6.2.
License: Geosoft Open License
-
set_tpat
(tpat)[source]¶ Set a thematic voxel’s
GXTPAT
object.New in version 7.0.
License: Geosoft Open License
Note: Each row in the
GXTPAT
object corresponds to a stored index value in the thematic voxel. TheGXTPAT
should NOT be modified by the addition or deletion of items, if it is to be restored into theGXVOX
object, but the CODE, LABEL, DESCRIPTION or COLOR info can be changed. TheGXTPAT
object is stored inside theGXVOX
GXMETA
object.
-
slice_ipj
(name, ipj, mode, orig_x, orig_y, cell_size_x, cell_size_y, size_x, size_y)[source]¶ Extract a slice of a voxel based on an
GXIPJ
- Parameters
name (str) – Grid Name
mode (int) – VOX_SLICE_MODE constants
orig_x (float) – Grid Origin X
orig_y (float) – Grid Origin Y
cell_size_x (float) – Grid Cell Size in X
cell_size_y (float) – Grid Cell Size in Y
size_x (int) – Grid cells in X
size_y (int) – Grid cells in Y
New in version 6.3.
License: Geosoft Open License
-
slice_multi_layer_ipj
(name, ipj, mode, orig_x, orig_y, cell_size_x, cell_size_y, size_x, size_y, layers, start_elev, elev_inc)[source]¶ Extract multiple slices of a voxel based on an
GXIPJ
- Parameters
name (str) – Grid Name
mode (int) – VOX_SLICE_MODE constants
orig_x (float) – Grid Origin X
orig_y (float) – Grid Origin Y
cell_size_x (float) – Grid Cell Size in X
cell_size_y (float) – Grid Cell Size in Y
size_x (int) – Grid cells in X
size_y (int) – Grid cells in Y
layers (int) – Number of layers to extract
start_elev (float) – Start elevation
elev_inc (float) – Elevation increment
New in version 8.4.
License: Geosoft Open License
-
subset_to_double_extents
(output_vox)[source]¶ Subset a
GXVOX
to real extents.- Parameters
output_vox (str) – Output voxel file name.
New in version 7.3.
License: Geosoft End-User License
-
classmethod
sync
(name)[source]¶ Syncronize the Metadata for this Voxel
- Parameters
name (str) – Voxel name
New in version 7.0.
License: Geosoft Open License
-
classmethod
tin_grid_db
(voxel, db, x, y, z, data, method, z_cell, reg)[source]¶ tin_grid_db
GXTIN
-Gridding,GXDB
version, 3D.- Parameters
voxel (str) – Output voxel name
db (GXDB) – Database
x (int) – X Channel [READONLY]
y (int) – Y Channel [READONLY]
z (int) – Z Channel [READONLY]
data (int) – Data Channel [READONLY]
method (int) – Gridding method (0: Linear, 1: Natural Neighbour, 2: Nearest Neightbour
z_cell (GXVV) – Z Cell sizes (bottom to top)
reg (GXREG) – Parameters (see above)
New in version 8.5.
License: Geosoft End-User License
Note: Designed for data in array channels position vertically at single XY locations. Creates a
GXTIN
using the XY locations and uses the coefficients for the top layer on each layer below to make it efficient.GXREG
Parameters:X0, Y0, Z0, DX, DY, DZ: Voxel origin, and cell sizes (required) NX, NY, NZ: Voxel dimensions. DZ and NZ are used only if the input cell sizes
GXVV
is of zero length.
-
window_ply
(pply, mask, min_z, max_z, output_vox, clip_dummies)[source]¶ Window a
GXVOX
to aGXPLY
file and Z.- Parameters
New in version 7.3.
License: Geosoft End-User License
Note: The voxel is windowed horizontally to the input
GXPLY
file. Optionally, it will be windowed to the input Z range as well. The output can be clipped to the non-dummied cells.
-
window_xyz
(min_x, min_y, min_z, max_x, max_y, max_z, output_vox, clip_dummies)[source]¶ Window a
GXVOX
to ranges in X, Y and Z.- Parameters
min_x (float) – Minimum X (optional,
rDUMMY
for no minimum)min_y (float) – Minimum Y (optional,
rDUMMY
for no minimum)min_z (float) – Minimum Z (optional,
rDUMMY
for no minimum)max_x (float) – Maximum X (optional,
rDUMMY
for no maximun)max_y (float) – Maximum Y (optional,
rDUMMY
for no maximun)max_z (float) – Maximum Z (optional,
rDUMMY
for no maximun)output_vox (str) – Output voxel file name.
clip_dummies (int) – Clip extents to remove dummies (0: no (same size), 1: yes (smaller))
New in version 7.3.
License: Geosoft End-User License
Note: The six minima and maxima are optional. The output can be clipped to the non-dummied cells.
-
write_xml
(file)[source]¶ Export the
GXVOX
to XML- Parameters
file (str) – XML file to create
New in version 6.2.
License: Geosoft Open License
-
VOX_DIR constants¶
Voxel direction
VOX_DIRECTION constants¶
Voxel export direction
VOX_FILTER3D constants¶
Voxel filter type
VOX_GOCAD_ORIENTATION constants¶
GOCAD Orientations
VOX_GRID_LOGOPT constants¶
Voxel log gridding options
VOX_ORIGIN constants¶
Voxel origin
VOX_SLICE_MODE constants¶
Voxel export direction