GXMULTIGRID3D class

class GXMULTIGRID3D(handle=0)[source]

GXMULTIGRID3D class.

High Performance 3D Grid.

__init__(handle=0)[source]

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

classmethod create(name, size_x, size_y, size_z)[source]

Creates a new Multivoxset

Parameters
  • name (str) – File Name

  • size_x (int) – Size in X.

  • size_y (int) – Size in Y.

  • size_z (int) – Size in Z.

Returns

GXMULTIGRID3D handle, terminates if creation fails

Return type

GXMULTIGRID3D

New in version 9.4.

License: Geosoft Open License

create_default(type)[source]

Get the default voxset

Parameters

type (int) – GRID3D_TYPE constants

Returns

GXGRID3D handle, terminates if creation fails

Return type

GXGRID3D

New in version 9.4.

License: Geosoft Open License

duplicate(name)[source]

Creates an MULTIGRID3D with identical geometry to the input

Parameters

name (str) – File Name

Returns

GXMULTIGRID3D handle, terminates if creation fails

Return type

GXMULTIGRID3D

New in version 9.4.

License: Geosoft Open License

export_to_binary(binary_file, dir, rev_x, rev_y, rev_z, swap, output_type)[source]

Export contents of GXMULTIGRID3D to a Binary File.

Parameters
  • binary_file (str) – Binary file to write to

  • dir (int) – DIRECTION3D constants

  • rev_x (bool) – Reverse X?

  • rev_y (bool) – Reverse Y?

  • rev_z (bool) – Reverse Z?

  • swap (bool) – Swap Bytes?

  • output_type (int) – Output Type (Geosoft Type)

New in version 9.4.

License: Geosoft End-User License

export_to_binary_ex(binary_file, dir, rev_x, rev_y, rev_z, swap, dummy, output_type)[source]

Export contents of GXMULTIGRID3D to a Binary File, with dummy replacement.

Parameters
  • binary_file (str) – Binary file to write to

  • dir (int) – DIRECTION3D constants

  • rev_x (bool) – Reverse X?

  • rev_y (bool) – Reverse Y?

  • rev_z (bool) – Reverse Z?

  • swap (bool) – Swap Bytes?

  • dummy (float) – Replace dummy values with this value on export

  • output_type (int) – Output Type (Geosoft Type)

New in version 9.7.

License: Geosoft End-User License

export_to_gdb(db, chan, dir, rev_x, rev_y, rev_z, dummies)[source]

Export To GDB

Parameters
  • db (GXDB) – Database

  • chan (str) – Channel Name

  • dir (int) – DIRECTION3D constants

  • rev_x (bool) – Reverse X?

  • rev_y (bool) – Reverse Y?

  • rev_z (bool) – Reverse Z?

  • dummies (bool) – Write Dummies?

New in version 9.4.

License: Geosoft Open License

export_to_pg()[source]

Export a MULTIGRID3D To a PG

Returns

GXPG Object

Return type

GXPG

New in version 9.4.

License: Geosoft Open License

export_to_wa(wa, dir, rev_x, rev_y, rev_z, dummy)[source]

Export To GDB

Parameters
  • wa (GXWA) – GXWA File

  • dir (int) – DIRECTION3D constants

  • rev_x (bool) – Reverse X?

  • rev_y (bool) – Reverse Y?

  • rev_z (bool) – Reverse Z?

  • dummy (str) – The Dummy string to write

New in version 9.4.

License: Geosoft Open License

export_to_xml(xml_file)[source]

Export a GXMULTIGRID3D to XML

Parameters

xml_file (str) – XML file

New in version 9.4.

License: Geosoft Open License

export_to_xyz(xyz, dir, rev_x, rev_y, rev_z, dummies)[source]

Export a GXMULTIGRID3D to an XYZ File

Parameters
  • xyz (str) – File Name

  • dir (int) – DIRECTION3D constants

  • rev_x (bool) – Reverse X?

  • rev_y (bool) – Reverse Y?

  • rev_z (bool) – Reverse Z?

  • dummies (bool) – Write Dummies?

New in version 9.4.

License: Geosoft Open License

fill(output_file, method, fill_value)[source]

Fill a grid3d.

Parameters

New in version 9.4.

License: Geosoft End-User License

get_bounding_box(min_x, min_y, min_z, max_x, max_y, max_z)[source]

Get the bounding box

Parameters

New in version 9.4.

License: Geosoft Open License

get_cell_sizes_x(vv)[source]

Get the cell sizes in the X direction

Parameters

vv (GXVV) – X GXVV

New in version 9.4.

License: Geosoft Open License

get_cell_sizes_y(vv)[source]

Get the cell sizes in the Y direction

Parameters

vv (GXVV) – Y GXVV

New in version 9.4.

License: Geosoft Open License

get_cell_sizes_z(vv)[source]

Get the cell sizes in the Z direction

Parameters

vv (GXVV) – Z GXVV

New in version 9.4.

License: Geosoft Open License

get_data_extents(min_x, min_y, min_z, max_x, max_y, max_z)[source]

Get the voxel size that has 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 9.5.

License: Geosoft Open License

Note: Find the non-dummy volume of a GXMULTIGRID3D object. If the voxel is all dummies, returns iMAX for the minima, and iMIN for the maxima.

get_data_ground_extents(min_x, min_y, min_z, max_x, max_y, max_z)[source]

Get the voxel size in ground units that has non-dummy data.

Parameters
  • min_x (float_ref) – Ground location of minimum valid data in X.

  • min_y (float_ref) – Ground location of minimum valid data in Y.

  • min_z (float_ref) – Ground location of minimum valid data in Z.

  • max_x (float_ref) – Ground location of maximum valid data in X.

  • max_y (float_ref) – Ground location of maximum valid data in Y.

  • max_z (float_ref) – Ground location of maximum valid data in Z.

New in version 9.5.

License: Geosoft Open License

Note: Find the non-dummy volume of a GXMULTIGRID3D object. If the voxel is all dummies, returns iMAX for the minima, and iMIN for the maxima.

get_default()[source]

Get the default voxset

Returns

GXGRID3D handle, terminates if creation fails

Return type

GXGRID3D

New in version 9.4.

License: Geosoft Open License

get_ipj(ipj)[source]

Get the projection of the multigrid3d.

Parameters

ipj (GXIPJ) – GXIPJ object

New in version 9.4.

License: Geosoft Open License

get_oriented_data_extents(oriented_origin_x, oriented_origin_y, oriented_origin_z, X_vector_x, X_vector_y, X_vector_z, Y_vector_x, Y_vector_y, Y_vector_z, Z_vector_x, Z_vector_y, Z_vector_z, p1_x, p1_y, p1_z, p2_x, p2_y, p2_z)[source]

Get the data extents based on an orientation

Parameters
  • oriented_origin_x (float) – oriented_origin_x

  • oriented_origin_y (float) – oriented_origin_y

  • oriented_origin_z (float) – oriented_origin_z

  • X_vector_x (float) – X Vector x

  • X_vector_y (float) – X Vector y

  • X_vector_z (float) – X Vector z

  • Y_vector_x (float) – Y Vector x

  • Y_vector_y (float) – Y Vector y

  • Y_vector_z (float) – Y Vector z

  • Z_vector_x (float) – Z Vector x

  • Z_vector_y (float) – Z Vector y

  • Z_vector_z (float) – Z Vector z

  • p1_x (float_ref) – Point1 x

  • p1_y (float_ref) – Point1 y

  • p1_z (float_ref) – Point1 z

  • p2_x (float_ref) – Point2 x

  • p2_y (float_ref) – Point2 y

  • p2_z (float_ref) – Point2 z

New in version 9.4.

License: Geosoft Open License

get_origin(origin_x, origin_y, origin_z)[source]

Get the origin

Parameters

New in version 9.4.

License: Geosoft Open License

get_section_cell_sizes(azimuth, scale, origin_x, origin_y, origin_z, cell_size_x, cell_size_y)[source]

Get the cell sizes of a section

Parameters
  • azimuth (float) – azimuth

  • scale (float) – scale

  • origin_x (float) – x origin

  • origin_y (float) – y origin

  • origin_z (float) – z origin

  • cell_size_x (float_ref) – cell size in x

  • cell_size_y (float_ref) – cell size in y

New in version 9.4.

License: Geosoft Open License

get_size_x()[source]

Get the number of cells in the X direction

Return type

int

New in version 9.4.

License: Geosoft Open License

get_size_y()[source]

Get the number of cells in the X direction

Return type

int

New in version 9.4.

License: Geosoft Open License

get_size_z()[source]

Get the number of cells in the X direction

Return type

int

New in version 9.4.

License: Geosoft Open License

get_uniform_cell_size_x()[source]

Get the uniform cell size in the X direction

Return type

float

New in version 9.4.

License: Geosoft Open License

get_uniform_cell_size_y()[source]

Get the uniform cell size in the Y direction

Return type

float

New in version 9.4.

License: Geosoft Open License

get_uniform_cell_size_z()[source]

Get the uniform cell size in the Z direction

Return type

float

New in version 9.4.

License: Geosoft Open License

get_vector_orientation(inc, dec, cell_size_y)[source]

Get the vector voxel orientation

Parameters

New in version 9.5.

License: Geosoft Open License

get_volume_vectors(origin_x, origin_y, origin_z, X_vector_x, X_vector_y, X_vector_z, Y_vector_x, Y_vector_y, Y_vector_z, Z_vector_x, Z_vector_y, Z_vector_z)[source]

Get the direction of the volume

Parameters

New in version 9.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_uniform_cell_size_x()[source]

Is the cell uniform in the X direction

Return type

bool

New in version 9.4.

License: Geosoft Open License

is_uniform_cell_size_y()[source]

Is the cell uniform in the Y direction

Return type

bool

New in version 9.4.

License: Geosoft Open License

is_uniform_cell_size_z()[source]

Is the cell uniform in the Z direction

Return type

bool

New in version 9.4.

License: Geosoft Open License

classmethod modify(name)[source]

Opens an existing Multivoxset with an plan to modify it

Parameters

name (str) – File Name

Returns

GXMULTIGRID3D handle, terminates if creation fails

Return type

GXMULTIGRID3D

New in version 9.4.

License: Geosoft Open License

classmethod null()[source]

A null (undefined) instance of GXMULTIGRID3D

Returns

A null GXMULTIGRID3D

Return type

GXMULTIGRID3D

classmethod open(name)[source]

Opens an existing Multivoxset

Parameters

name (str) – File Name

Returns

GXMULTIGRID3D handle, terminates if creation fails

Return type

GXMULTIGRID3D

New in version 9.4.

License: Geosoft Open License

set_cell_sizes_x(vv)[source]

Set the cell sizes in the X direction

Parameters

vv (GXVV) – X GXVV

New in version 9.4.

License: Geosoft Open License

set_cell_sizes_y(vv)[source]

Set the cell sizes in the Y direction

Parameters

vv (GXVV) – Y GXVV

New in version 9.4.

License: Geosoft Open License

set_cell_sizes_z(vv)[source]

Set the cell sizes in the Z direction

Parameters

vv (GXVV) – Z GXVV

New in version 9.4.

License: Geosoft Open License

set_ipj(ipj)[source]

Set the projection of the multigrid3d.

Parameters

ipj (GXIPJ) – GXIPJ object

New in version 9.4.

License: Geosoft Open License

set_origin(origin_x, origin_y, origin_z)[source]

Set the origin

Parameters
  • origin_x (float) – x

  • origin_y (float) – y

  • origin_z (float) – z

New in version 9.4.

License: Geosoft Open License

set_uniform_cell_size_x(cellsize)[source]

Set the uniform cell size in the X direction

Parameters

cellsize (float) – cell size

New in version 9.4.

License: Geosoft Open License

set_uniform_cell_size_y(cellsize)[source]

Get the uniform cell size in the Y direction

Parameters

cellsize (float) – cell size

New in version 9.4.

License: Geosoft Open License

set_uniform_cell_size_z(cellsize)[source]

Get the uniform cell size in the Z direction

Parameters

cellsize (float) – cell size

New in version 9.4.

License: Geosoft Open License

DIRECTION3D constants

Direction in 3D

DIRECTION3D_XYZ

XYZ

gxapi.DIRECTION3D_XYZ = 0
DIRECTION3D_YXZ

YXZ

gxapi.DIRECTION3D_YXZ = 1
DIRECTION3D_XZY

XZY

gxapi.DIRECTION3D_XZY = 2
DIRECTION3D_YZX

YZX

gxapi.DIRECTION3D_YZX = 3
DIRECTION3D_ZXY

ZXY

gxapi.DIRECTION3D_ZXY = 4
DIRECTION3D_ZYX

ZYX

gxapi.DIRECTION3D_ZYX = 5

GOCAD_ORIENTATION constants

GOCAD Orientations

GOCAD_ORIENTATIONS_NORMAL

Normal

gxapi.GOCAD_ORIENTATIONS_NORMAL = 0
GOCAD_ORIENTATIONS_INVERTED

Inverted (Z)

gxapi.GOCAD_ORIENTATIONS_INVERTED = 1
GOCAD_ORIENTATIONS_NORMAL_ZFIRST

Normal (ZFirst)

gxapi.GOCAD_ORIENTATIONS_NORMAL_ZFIRST = 2
GOCAD_ORIENTATIONS_INVERTED_ZFIRST

Inverted (Z) (ZFirst)

gxapi.GOCAD_ORIENTATIONS_INVERTED_ZFIRST = 3

VECTOR_IMPORT constants

Vector grid3d import direction

VECTOR_IMPORT_XYZ

X, Y and Z

gxapi.VECTOR_IMPORT_XYZ = 0
VECTOR_IMPORT_UVW

U, V and W

gxapi.VECTOR_IMPORT_UVW = 1
VECTOR_IMPORT_AID

Amplitude, Inclination and Declination

gxapi.VECTOR_IMPORT_AID = 2

FILTER3D constants

Voxel filter type

FILTER3D_FILE

Specify a file containing the 27-point filter

gxapi.FILTER3D_FILE = 0
FILTER3D_SMOOTHING

Smoothing filter

gxapi.FILTER3D_SMOOTHING = 1
FILTER3D_LAPLACE

Laplace filter

gxapi.FILTER3D_LAPLACE = 2
FILTER3D_X_GRADIENT

X-Gradient filter

gxapi.FILTER3D_X_GRADIENT = 3
FILTER3D_Y_GRADIENT

Y-Gradient filter

gxapi.FILTER3D_Y_GRADIENT = 4
FILTER3D_Z_GRADIENT

Z-Gradient filter

gxapi.FILTER3D_Z_GRADIENT = 5
FILTER3D_TOTAL_GRADIENT

Total-Gradient filter

gxapi.FILTER3D_TOTAL_GRADIENT = 6

MULTIGRID3D_DIRECTGRID_METHOD constants

How to calculate the cell values for direct gridding.

MULTIGRID3D_DIRECTGRID_MINIMUM

Select the minimum value found in each cell

gxapi.MULTIGRID3D_DIRECTGRID_MINIMUM = 0
MULTIGRID3D_DIRECTGRID_MAXIMUM

Select the maximum value found in each cell

gxapi.MULTIGRID3D_DIRECTGRID_MAXIMUM = 1
MULTIGRID3D_DIRECTGRID_MEAN

Select the mean of all values found in each cell

gxapi.MULTIGRID3D_DIRECTGRID_MEAN = 2
MULTIGRID3D_DIRECTGRID_ITEMS

The number of valid (non-dummy) items found in each cell - 0 if no items found

gxapi.MULTIGRID3D_DIRECTGRID_ITEMS = 3
MULTIGRID3D_DIRECTGRID_DUMMYITEMS

The number of valid (non-dummy) items found in each cell - DUMMY if no items found

gxapi.MULTIGRID3D_DIRECTGRID_DUMMYITEMS = 4