GXRGRD class

class GXRGRD(handle=0)[source]

GXRGRD class.

The GXRGRD object is used as a storage place for the control parameters which the Rangrid (minimum curvature) program needs to execute. The Run_RGRD function executes the Rangrid program using the GXRGRD object.

__init__(handle=0)[source]

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

clear()[source]

Clears all the parameters in a GXRGRD object

New in version 5.0.

License: Geosoft Extended End-User License

Note: DLL name clear

classmethod create()[source]

Create a handle to a Rangrid object

Returns

GXRGRD Object

Return type

GXRGRD

New in version 5.0.

License: Geosoft Extended End-User License

Note: The Rangrid object is initially empty. It will store the control file parameters which the Rangrid program needs to execute. Use the LoadParms_RGRD method to get the control file parameters into the GXRGRD object.

classmethod create_img(vv_x, vv_y, vv_z, ipj, ctl, grid)[source]

Run Rangrid directly on XYZ GXVV data, output to an GXIMG.

Parameters
  • vv_x (GXVV) – X data (any numeric GXVV type)

  • vv_y (GXVV) – Y data (any numeric GXVV type)

  • vv_z (GXVV) – Z (grid value) data (any numeric GXVV type)

  • ipj (GXIPJ) – Projection to apply to the output GXIMG

  • ctl (str) – RANGRID control file.

  • grid (str) – Output grid name (optional)

Returns

GXIMG object

Return type

GXIMG

New in version 7.0.1.

License: Geosoft Extended End-User License

Note: If the grid file name is defined, the GXIMG is tied to a new output file. If the grid file name is not defined, the GXIMG is memory-based; not tied to a file.

default(zchan, in_dat)[source]

Set the defaults.

Parameters
  • zchan (str) – Name of Z Channel to perfrom gridding on

  • in_dat (GXDAT) – Handle to source GXDAT object (from database)

Returns

0 OK, 1 Error.

Return type

int

New in version 6.0.1.

License: Geosoft Extended End-User 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

load_parms(file)[source]

Retrieves a Rangrid object’s control parameters from a file, or sets the parameters to default if the file doesn’t exist.

Parameters

file (str) – Name of file to get the parameter settings from

Returns

0 OK, 1 Error.

Return type

int

New in version 6.0.1.

License: Geosoft Extended End-User License

Note: If the control file name passed into this function is a file which does not exist, then the defaults for a Rangrid control file will be generated and put into the GXRGRD object. Otherwise, the control file’s settings are retrieved from the file and loaded into the GXRGRD object.

classmethod null()[source]

A null (undefined) instance of GXRGRD

Returns

A null GXRGRD

Return type

GXRGRD

run(in_dat, out_dat)[source]

Executes the Rangrid program, using the input channel and output file parameters.

Parameters
  • in_dat (GXDAT) – Handle to source GXDAT object (from database)

  • out_dat (GXDAT) – Handle to output grid file GXDAT

Returns

0 OK, 1 Error.

Return type

int

New in version 6.0.1.

License: Geosoft Extended End-User License

classmethod run2(db, x, y, z, ctl, grd)[source]

Executes the Rangrid program directly on a database.

Parameters
  • db (GXDB) – Handle to a database

  • x (str) – Y Channel

  • y (str) – X Channel

  • z (str) – Data channel

  • ctl (str) – RANGRID control file.

  • grd (str) – Output grid name

Returns

0, always.

Return type

int

New in version 6.0.1.

License: Geosoft Extended End-User License

classmethod run_list(dbs, zch, ipj, ctl, grd)[source]

Executes the Rangrid program from a list of databases.

Parameters
  • dbs (str) – List of databases (using | separator)

  • zch (str) – Z Channel

  • ipj (GXIPJ) – Projection to put into grid

  • ctl (str) – RANGRID control file.

  • grd (str) – Output grid name

New in version 9.4.

License: Geosoft Extended End-User License

classmethod run_vv(vv_x, vv_y, vv_z, ipj, ctl, grd)[source]

Executes the Rangrid program directly on input data VVs.

Parameters
  • vv_x (GXVV) – X data

  • vv_y (GXVV) – Y data

  • vv_z (GXVV) – Z (grid value) data

  • ipj (GXIPJ) – Projection to put into grid

  • ctl (str) – RANGRID control file.

  • grd (str) – Output grid name

New in version 6.3.

License: Geosoft Extended End-User License

save_parms(name)[source]

Puts the Rangrid object’s control parameters back into its control file.

Parameters

name (str) – Name of file to put the parameter settings into

Returns

0 OK, 1 Error.

Return type

int

New in version 6.0.1.

License: Geosoft Extended End-User License

Note: If the control file did not previously exist, it will be created. Otherwise, the old file will be overwritten.