GXRGRD class

class GXRGRD(handle=0)

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.

clear()

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()

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)

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)

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()

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)

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()

A null (undefined) instance of GXRGRD

Returns:A null GXRGRD
Return type:GXRGRD
run(in_dat, out_dat)

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)

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_vv(vv_x, vv_y, vv_z, ipj, ctl, grd)

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)

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.