GXKGRD class¶
-
class
GXKGRD
(handle=0)[source]¶ GXKGRD class.
The
GXKGRD
object is used as a storage place for the control parameters that the Krigrid program needs to execute. The Run_KGRD function executes the Krigrid program using theGXKGRD
object.-
clear
()[source]¶ Clears all the parameters in a
GXKGRD
objectNew in version 5.0.
License: Geosoft Extended End-User License
-
classmethod
create
()[source]¶ Create a handle to a Krigrid object
New in version 5.0.
License: Geosoft Extended End-User License
Note: The Krigrid object is initially empty. It will store the control file parameters which the Krigrid program needs to execute. Use the LoadParms_KGRD method to get the control file parameters into the
GXKGRD
object.
-
classmethod
get_defaults
(db, x, y, z, blankingDistance, lowPassDesamplingFactor)[source]¶ Get default blanking distance and low-pass desampling factor.
- Parameters
- Returns
0 OK, 1 Error.
- Return type
int
New in version 2021.2.
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 Krigrid object’s control parameters from a file.
- 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 Krigrid control file will be generated and put into the
GXKGRD
object. Otherwise, the control file’s settings are retrieved from the file and loaded into theGXKGRD
object.
-
run
(zchan, in_dat, out_grd_dat, out_err_dat, in_var_name, out_var_name, vao, vi, vo)[source]¶ Executes the Krigrid program, using the input channel and output file parameters.
- Parameters
zchan (str) – Name of Z Channel to perfrom gridding on
in_dat (GXDAT) – Handle to source
GXDAT
object (from database)out_err_dat (GXDAT) – Handle to output error grid file
GXDAT
((GXDAT
)0) if no error grid requiredin_var_name (str) – Name of input variogram file
out_var_name (str) – Name of output variogram file
vao (int) – Flag of variogram only
vi (int) – Flag of input variogram
vo (int) – Flag of output variogram
- 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, err_grd, in_var, out_var, vao)[source]¶ Executes the Krigrid 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) – KRIGRID control file.
grd (str) – (output grid name (not required if variogram analysis only))
err_grd (str) – (output error file, “” for none)
in_var (str) – (input variogram file, “” for none)
out_var (str) – (output variogram file, “” for none)
vao (int) – 1 if Variogram Analysis Only, other wise 0
- Returns
0 OK, 1 Error.
- Return type
int
New in version 6.0.1.
License: Geosoft Extended End-User License
-
classmethod
run3
(db, x, y, z, ctl, grd, err_grd, in_var, out_var, log_file, vao)[source]¶ Executes the Krigrid program directly on a database and specifies the log file
- Parameters
db (GXDB) – Handle to a database
x (str) – Y Channel
y (str) – X Channel
z (str) – Data channel
ctl (str) – KRIGRID control file.
grd (str) – (output grid name (not required if variogram analysis only))
err_grd (str) – (output error file, “” for none)
in_var (str) – (input variogram file, “” for none)
out_var (str) – (output variogram file, “” for none)
log_file (str) – (log file name, “” for default)
vao (int) – 1 if Variogram Analysis Only, other wise 0
- Returns
0 OK, 1 Error.
- Return type
int
New in version 6.4.
License: Geosoft Extended End-User License
-
save_parms
(name)[source]¶ Puts the Krigrid 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.
-