GXDH class¶
- class GXDH(handle=0)[source]¶
GXDH class.
This class is used for importing and interacting with Drill Hole data files. For detailed information on Drill Hole data, see the documentation for Wholeplot.
Note:
- The
GXDH
class has some defines not used by any functions.
- add_hole(hole)[source]¶
Add a hole and return it’s index.
- Parameters:
hole (str) – Name of hole
- Returns:
x - Hole index
- Return type:
int
New in version 5.0.
License: Geosoft Extended End-User License
- add_survey_table(hole)[source]¶
Add a survey table for a new hole.
- Parameters:
hole (int) – Hole index
New in version 5.1.8.
License: Geosoft Extended End-User License
Note: The information is created from the collar table info. If the survey info already exists, does nothing.
- assay_hole_lst(assay_db, lst)[source]¶
Populate an
GXLST
with holes in an assay databaseNew in version 6.3.
License: Geosoft Extended End-User License
- assay_lst(lst)[source]¶
Return the
GXLST
of from-to and point assay datasetsNew in version 5.1.8.
License: Geosoft Extended End-User License
Note: Assay dataset name is given as
LST_ITEM_NAME
Assay dataset number is given asLST_ITEM_VALUE
Returns an emptyGXLST
if no datasets.
- classmethod auto_select_holes(flag)[source]¶
Use automatic hole selection based on slice.
- Parameters:
flag (int) – Turn on (TRUE) or off (FALSE)
New in version 5.0.
License: Geosoft Extended End-User License
- chan_type(chan_code)[source]¶
Return the data type for a channel code.
- Parameters:
chan_code (str) – Channel code
- Returns:
Channel data type
- Return type:
int
New in version 7.0.
License: Geosoft Extended End-User License
Note: Finds and sorts all the unique non-dummy items for the selected channel.
- clean()[source]¶
Delete extraneous holes from project databases.
New in version 5.1.2.
License: Geosoft Extended End-User License
Note: Removes from Project databases any lines not connected to a line found in the collar table list. If all the database lines would be removed, the database is simply deleted.
- clean_will_delete_db()[source]¶
See if “cleaning” will delete project databases.
- Returns:
1 if calling
clean
will remove all “lines” from one of theGXDH
project databases.- Return type:
int
New in version 5.1.2.
License: Geosoft Extended End-User License
- composite_db(mast_db, comp_db, hol_sel, int_sel, fix_int, lith_ch, int_file, wt_ch, rej1_val, rej2_val, rej3_val, rej3_op, rej3_ch)[source]¶
Make a composite database
- Parameters:
hol_sel (int) – DH_COMPSTDB_HOLSEL constants
int_sel (int) – DH_COMPSTDB_INTSEL constants
fix_int (float) – Fixed interval length
lith_ch (str) – Name of lithology cannel
int_file (str) – Name of interval file
wt_ch (str) – Name of Weight channel
rej1_val (float) – dRej1Val for intervals short than, (
GS_R8DM
for no action)rej2_val (float) – dRej2Val for intervals gap greater than, (
GS_R8DM
for no action)rej3_val (float) – dRej3Val for Rej3Ch with Rej3Op, (
GS_R8DM
for no action)rej3_op (int) – dRej3Op: 0: >, 1: >=, 2: <, 3: <=
rej3_ch (str) – Name of Rej3Ch channel
New in version 5.1.8.
License: Geosoft Extended End-User License
- compositing_tool_gui(map, x, y1, y2)[source]¶
Annotate a strip log map using the compositing tool.
- Parameters:
map (GXMAP) – Current strip log map
x (float) – X location on map of selected strip
y1 (float) – Y End of hole interval in view coords
y2 (float) – Y Other end of hole interval in view coords
- Returns:
- Return type:
int
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: If any of the input X or Y values are dummies the tool uses default values.
- compute_hole_xyz(hole)[source]¶
Computes XYZ for survey and assay data for a single hole.
- Parameters:
hole (int) – Hole index
New in version 7.3.
License: Geosoft Extended End-User License
- compute_sel_extent(e_min, e_max, n_min, n_max, z_min, z_max)[source]¶
Computes the extents for selected holes.
- Parameters:
New in version 5.0.
License: Geosoft Extended End-User License
- compute_xyz()[source]¶
Computes XYZ for survey and assay data.
New in version 5.1.2.
License: Geosoft Extended End-User License
- classmethod convert_old_line_names(db, lst)[source]¶
Convert old “DD001.Assay” type lines to “DD001”
- Parameters:
lst (GXLST) – Names to convert (call
GXDB.symb_lst
).
New in version 6.3.
License: Geosoft Extended End-User License
Note: The input
GXLST
must be filled using a function likeGXDB.symb_lst
, which puts the name and symbol into theGXLST
items. Any names with a period are truncated at the period, and the line name in the database is changed to the new name (just the hole name). TheGXLST
is modified to have the new names. A value is put into theGXDB
GXREG
“DH_CONVERTED_NAMES” parameter so this process is done only once on a database.DO NOT use on old-style single-database Wholeplot projects.
- classmethod convert_oriented_core_dip_dir_for_hole_survey(vv_depth, vv_alpha, vv_beta, vv_survey_x, vv_survey_y, vv_survey_z, vv_survey_depth, top_ref)[source]¶
Converted alpha/beta values in oriented cores to dip/dip direction.
- Parameters:
New in version 9.7.
License: Geosoft Extended End-User License
Note: The input data are the oriented core alpha and beta values, using either top or bottom reference. The values alpha and beta are converted in place to “absolute” dip and dip-direction values, using the desurveyed hole orientations at each depth.
- creat_chan_lst(lst)[source]¶
Fills a
GXLST
with available string and numeric channel code values.New in version 5.1.8.
License: Geosoft Extended End-User License
Note: Channel codes are in the format “[Assay] Au”, where the name in the square brackets is descriptive part of the project database containing the given channel name. The above code might refer to the “Au” channel in the “Tutorial_Assay.gdb” database.
- classmethod create(db)[source]¶
Create
GXDH
.New in version 5.0.
License: Geosoft Extended End-User License
- classmethod create_collar_table(project, chan, db)[source]¶
Create a collar table
GXDB
with channels set up.- Parameters:
project (str) – Project name
chan (int) – Number of channels
db (str_ref) – Collar table name (returned)
New in version 5.1.6.
License: Geosoft Extended End-User License
Note: The database name will be of the form
“d:directoryProject_Collar.gdb”
- classmethod create_collar_table_dir(project, dir, chan, db)[source]¶
Create a collar table in the specified directory.
- Parameters:
project (str) – Project name
dir (str) – Directory to create project in
chan (int) – Number of channels
db (str_ref) – Collar table name (returned)
New in version 5.1.8.
License: Geosoft Extended End-User License
Note: The database name will be of the form
“d:directoryProject_Collar.gdb”
- create_default_job(ini, type)[source]¶
Create a default job from scratch.
- Parameters:
ini (str) – File name of the INI file to create (forces correct suffix)
type (int) – DH_PLOT constants
New in version 5.1.2.
License: Geosoft Extended End-User License
- classmethod create_external(db)[source]¶
Create a
GXDH
from an external process (no montaj running).New in version 5.1.6.
License: Geosoft Extended End-User License
Note: The regular
create
assumes a workspace is open and creates the project from the databases which are currently loaded. This function instead creates the project from all projects in the input databases’s directory.
- classmethod current()[source]¶
Creates a drill project from current environment.
New in version 6.1.
License: Geosoft Extended End-User License
Note: If no
GXDH
database is open the OpenGXDH
ProjectGXGUI
will be displayed which may be cancelled by the user in which case the GX will terminate with cancel.
- classmethod datamine_to_csv(file, proj)[source]¶
Convert a Datamine drillhole file to CSV files ready for import.
- Parameters:
file (str) – Datamine database file to import (
*.dm
)proj (str) – Drillhole project name
New in version 6.3.
License: Geosoft Extended End-User License
Note: Creates three CSV files and the accompanying template files ready for batch ASCII import into a drill project.
Project_Collar.csv, .i3 Project_Survey.csv, .i3 Project_Assay.csv, .i3
- delete_holes(lst)[source]¶
Delete a list of holes from the project.
New in version 5.1.2.
License: Geosoft Extended End-User License
Note: Removes all lines in the input
GXLST
fromGXDH
project databases. If all the database lines would be removed, the database is simply deleted.
- delete_will_delete_db(lst)[source]¶
See if deleting holes will delete project databases.
- Parameters:
- Returns:
1 if deleting the
GXLST
of holes will remove all “lines” from one of theGXDH
project databases.- Return type:
int
New in version 5.1.2.
License: Geosoft Extended End-User License
- depth_data_lst(lst)[source]¶
Fills a
GXLST
with available channel code values from Depth databases.New in version 6.4.
License: Geosoft Extended End-User License
Note: Channel codes are in the format “[Assay] Au”, where the name in the square brackets is descriptive part of the project database containing the given channel name. The above code might refer to the “Au” channel in the “Tutorial_Assay.gdb” database.
- classmethod desurvey(desurvey_method, order, dip_convention, inc, thin, locations, vv_depth, vv_dip, vv_az, x, y, z, top, bottom, vv_x, vv_y, vv_z, vv_d)[source]¶
Calculate survey locations and depth from a hole survey.
- Parameters:
desurvey_method (int) – DH_DESURVEY constants
order (int) – Polynomial order
dip_convention (int) – DIP_CONVENTION constants
inc (float) – Depth increment
thin (bool) – Thin nearly co-linear segments?
locations (bool) – Calculate at predefined depths (inc ignored)
vv_depth (GXVV) – Survey Depth
vv_dip (GXVV) – Survey Dip
vv_az (GXVV) – Survey Azimuth
x (float) – Hole X
y (float) – Hole Y
z (float) – Hole Z
top (float) – Hole Top
bottom (float) – Hole Bottom
vv_x (GXVV) – Out X
vv_y (GXVV) – Out Y
vv_z (GXVV) – Out Z
vv_d (GXVV) – Out Depth
New in version 9.7.
License: Geosoft Extended End-User License
- classmethod desurvey_from_to(desurvey_method, order, dip_convention, inc, thin, vv_from, vv_to, vv_depth, vv_dip, vv_az, x, y, z, top, bottom, vv_x, vv_y, vv_z, vv_d, vv_l)[source]¶
Calculate survey locations and depth from a hole survey using from/to values
- Parameters:
desurvey_method (int) – DH_DESURVEY constants
order (int) – Polynomial order
dip_convention (int) – DIP_CONVENTION constants
inc (float) – Inc
thin (bool) – Thin nearly co-linear segments?
vv_from (GXVV) – From Values
vv_to (GXVV) – To Values
vv_depth (GXVV) – Survey Depth
vv_dip (GXVV) – Survey Dip
vv_az (GXVV) – Survey Azimuth
x (float) – Hole X
y (float) – Hole Y
z (float) – Hole Z
top (float) – Hole Top
bottom (float) – Hole Bottom
vv_x (GXVV) – Out X
vv_y (GXVV) – Out Y
vv_z (GXVV) – Out Z
vv_d (GXVV) – Out Depth
vv_l (GXVV) – From/To segment lengths in output VVs matching each from/to pair
New in version 9.7.
License: Geosoft Extended End-User License
- edit_classification_table_file_gui(chan, class_file, fill_patterns, colors_only)[source]¶
Edit a symbol color/pattern CSV file
- Parameters:
chan (str) – Channel
class_file (str_ref) – CSV filename (in/out can be blank)
fill_patterns (int) – 0 - Collar Symbols -1 - Rock Patterns
colors_only (int) – 0 - Symbols/patterns (2D) -1 - Colors only (3D)
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 9.3.
License: Geosoft Extended End-User License
- export_file(file, type)[source]¶
Exports a Drill Hole database to an external file.
- Parameters:
file (str) – File name
type (int) – DH_EXP constants
New in version 5.0.
License: Geosoft Extended End-User License
- export_geodatabase_lst(lst, file, pre, feat_class, overwrite)[source]¶
Exports whole or part of a Drill Hole database to an ArcGIS Geodatabase as feature class(es).
- Parameters:
lst (GXLST) – Hole Names in the Name and Value parts of the
GXLST
file (str) – File name (.pdb folder for File Geodatabase or .sde connector for SDE)
pre (str) – String to prefix dataset names with
feat_class (str_ref) – Feature class name to export (pass empty for all or name of table, will contain the name of the output dataset for if a rename occurs)
overwrite (int) – Overwrite existing feature classes?
False
will create copies.
New in version 7.1.
License: Geosoft Extended End-User License
Note: A table with metadata about the created feature classes will be written to the Geodatabase. This table will have the same name with the postfix “_Metadata” attached
- export_las(assay_db, hole, interval, file)[source]¶
Exports a Drill Hole database to a LAS v2 file.
- Parameters:
assay_db (int) – Assay database index
hole (int) – Hole index
interval (float) – Interval for output
file (str) – File name
New in version 5.1.8.
License: Geosoft Extended End-User License
- export_lst(lst, file, type)[source]¶
Exports a
GXLST
of holes in a Drill Hole database to an external file.- Parameters:
lst (GXLST) – Hole Names in the Name and Value parts of the
GXLST
file (str) – File name
type (int) – DH_EXP constants
New in version 5.1.8.
License: Geosoft Extended End-User License
Note: Use functions like
GXDB.selected_line_lst
to construct theGXLST
- find_hole(hole)[source]¶
Find a hole and return it’s index.
- Parameters:
hole (str) – Name of hole
- Returns:
x - Hole index -1 - Not found
- Return type:
int
New in version 5.0.
License: Geosoft Extended End-User License
- find_hole_intersection(hole, img, x, y, z)[source]¶
Return XYZ locations of the intersection of a hole with a DEM grid.
- Parameters:
- Returns:
1 if intersection found 0 if no intersection found
- Return type:
int
New in version 7.0.
License: Geosoft Extended End-User License
Note: Input the hole index and an
GXIMG
object. Returns XYZ location of the hole intersection with the DEM. Interpolation inside the DEM uses the nativeGXIMG
interp method. If no intersection is found the returned XYZ locations arerDUMMY
.
- flush_select()[source]¶
Flush all selections to database selection engine.
New in version 5.0.
License: Geosoft Extended End-User License
- from_to_data_lst(assay, lst)[source]¶
Fills a
GXLST
with available string and numeric channel code values from From-To databases.- Parameters:
New in version 6.4.
License: Geosoft Extended End-User License
Note: Channel codes are in the format “[Assay] Au”, where the name in the square brackets is descriptive part of the project database containing the given channel name. The above code might refer to the “Au” channel in the “Tutorial_Assay.gdb” database.
- get_chan_code_info(chan_code, assay_db_index, chan)[source]¶
Return the assay database index and channel name from a channel code string.
- Parameters:
New in version 7.3.
License: Geosoft Extended End-User License
Note: The input channel code is in the form “[Assay] channel”
- get_collar_table_db(db)[source]¶
Get the name of the database containing the collar table.
- Parameters:
db (str_ref) – Returned file name
New in version 5.1.2.
License: Geosoft Extended End-User License
- get_data_type(db, type)[source]¶
Get the type of data in a Wholeplot database.
- Parameters:
type (int_ref) – DH_DATA constants
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: Returns
DH_DATA_UNKNOWN
if it can’t determine the type.
- get_databases_sorted_vv(gvv)[source]¶
Get the names of the project databases in a
GXVV
, same asget_databases_vv
but the list is sorted alphabetically.New in version 8.2.
License: Geosoft Extended End-User License
- get_databases_vv(gvv)[source]¶
Get the names of the project databases in a
GXVV
.New in version 5.1.2.
License: Geosoft Extended End-User License
- get_default_section(az, x1, x2, l, w)[source]¶
Computes default section azimuths, extents for selected holes.
- Parameters:
New in version 5.0.
License: Geosoft Extended End-User License
- get_geology_contacts(lst, chan_code, geology, surface, gap, vv_x, vv_y, vv_z)[source]¶
Return XYZ locations of top or bottom geological surfaces
- Parameters:
chan_code (str) – Channel code
geology (str) – Geology item
surface (int) – DH_SURFACE constants Surface selection (top or bottom)
gap (float) – Max gap to skip when compositing (
GS_R8DM
for none)vv_x (GXVV) – X locations of the contact
vv_y (GXVV) – Y locations of the contact
vv_z (GXVV) – Z locations of the contact
New in version 7.0.
License: Geosoft Extended End-User License
Note: For the input
GXLST
of holes, returns XYZ location of top or bottom contact with the input geology. Those selected holes which do NOT have contacts, returnrDUMMY
for the corresponding locations.
- get_hole_group(hole, assay)[source]¶
Get the Group symbol for this hole/table combination.
- Parameters:
hole (int) – Hole index
assay (str) – Table Name
- Returns:
Hole Symbol
- Return type:
int
New in version 5.0.
License: Geosoft Extended End-User License
- get_hole_survey(hole, vv_x, vv_y, vv_z, vv_d)[source]¶
Get the Survey information of a Hole.
- Parameters:
New in version 5.0.
License: Geosoft Extended End-User License
- get_hole_survey_ex(hole, vv_x, vv_y, vv_z, vv_d, thin)[source]¶
Get the Survey information of a Hole.
- Parameters:
New in version 9.5.
License: Geosoft Extended End-User License
- get_hole_survey_from_to(db, line, vv_x, vv_y, vv_z, vv_d, vv_l, thin)[source]¶
Get the Survey information of a Hole using From/To database.
- Parameters:
New in version 9.5.
License: Geosoft Extended End-User License
- get_info(hole, name, data)[source]¶
Get Collar Information.
- Parameters:
hole (int) – Hole index
name (str) – Name of information
data (str_ref) – Buffer to place information
New in version 5.0.
License: Geosoft Extended End-User License
Note: If the DH_ELEV channel is requested it will also search for the DH_RL channel, which is the new name for the collar elevation.
- get_ipj(ipj)[source]¶
Get the project
GXIPJ
.New in version 5.1.8.
License: Geosoft Extended End-User License
Note: The projection for the project is the projection stored in the DH_EAST channel in the collar table.
- get_map(index)[source]¶
Get a plotting map
New in version 8.0.1.
License: Geosoft Extended End-User License
- get_map_names_vv(vv)[source]¶
Get plotted map names.
New in version 5.1.8.
License: Geosoft Extended End-User License
Note: This will return the currently plotted map name(s) in a
GXVV
. This should only be called after a call towholeplot
. TheGXVV
size is set to the number of maps created.
- classmethod get_mx_deposit_rights_info(has_rights, base_url, api_version_prefix, api_key, user_key, database_id)[source]¶
Get MX Deposit Service API information via Geosoft ID rights.
- Parameters:
New in version 9.6.
License: Geosoft Open License
- get_num_maps()[source]¶
Get the number plotting maps
- Returns:
Number of plotting maps
- Return type:
int
New in version 8.0.1.
License: Geosoft Extended End-User License
- get_oriented_core_dip_dir(lst, alpha, beta, top_ref, dip, dip_dir)[source]¶
Converted alpha/beta values in oriented cores to dip/dip direction.
- Parameters:
alpha (str) – Channel code for input alpha data
beta (str) – Channel code for input beta data
top_ref (int) – 1: Top of core reference 0: Bottom of core reference
dip (str) – Channel name for output dip data
dip_dir (str) – Channel name for output dip direction
New in version 6.4.
License: Geosoft Extended End-User License
Note: The input data are the oriented core alpha and beta values, using either top or bottom reference. The values for each hole in the
GXLST
are converted to “absolute” dip and dip-direction values, using the resurveyed hole orientations at each depth. The alpha and beta data must be from the same database, and the output dip and dip/dir channels are written to the same database.
- get_project_name(project)[source]¶
Get the Wholeplot project name.
- Parameters:
project (str_ref) – Returned string
New in version 5.1.2.
License: Geosoft Extended End-User License
- get_reg()[source]¶
Get the
GXREG
Object used in this project.New in version 5.0.
License: Geosoft Extended End-User License
- classmethod get_section_id(azimuth, east, north, id)[source]¶
Create a section ID based on its location
- Parameters:
azimuth (float) – Section Azimuth
east (float) – Section Easting
north (float) – Section Northing
id (str_ref) – Section ID
New in version 6.1.
License: Geosoft Extended End-User License
- get_selected_holes_vv(vv)[source]¶
Populate a
GXVV
with the indices of all selected holes- Parameters:
vv (GXVV) – Returned hole indices (must be type INT)
New in version 8.0.
License: Geosoft Extended End-User License
- classmethod get_table_default_chan_lst(lst, type)[source]¶
Return list of default channels by collar/assay/survey table type.
- Parameters:
type (int) – DH_DATA constants
New in version 7.3.
License: Geosoft Extended End-User License
Note: Fills a
GXLST
with the default channel names created according to type (Collar, Survey, Assay). Value is in theLST_ITEM_NAME
part.
- classmethod get_template_blob(db, templ, imp_type)[source]¶
Retrieve the import template from the database.
- Parameters:
templ (str) – Name of template file to extract to.
imp_type (int_ref) – The stored import template type DH_DATA constants
- Returns:
0: No template stored in the database 1: Template retrieved and written to a file.
- Return type:
int
New in version 6.0.
License: Geosoft Extended End-User License
Note: The template can be retrieved in order to refresh the database with a call to the DHIMPORT.GX.
The import types correspond to the DHIMPORT.IMPTYPE variable: 0: ASCII, 1: Database/XLS, 2: ODBC
If no template blob exists, templ
- classmethod get_template_blob_no_source_resolve(db, templ, imp_type)[source]¶
Retrieve the import template from the database.
- Parameters:
templ (str) – Name of template file to extract to.
imp_type (int_ref) – The stored import template type DH_DATA constants
- Returns:
0: No template stored in the database 1: Template retrieved and written to a file.
- Return type:
int
New in version 9.7.1.
License: Geosoft Extended End-User License
Note: The template can be retrieved in order to refresh the database with a call to the DHIMPORT.GX.
The import types correspond to the DHIMPORT.IMPTYPE variable: 0: ASCII, 1: Database/XLS, 2: ODBC
If no template blob exists, templ
- classmethod get_template_info(templ, data_type, file, table)[source]¶
Retrieve the file,
GXDH
Table name and type from an import template.- Parameters:
templ (str) – Template name
data_type (int_ref) – DH_DATA constants
file (str_ref) – File name (blank for ODBC, or undefined).
table (str_ref) – Table name (blank for
DH_DATA_UNKNOWN
, or undefined).
New in version 6.0.
License: Geosoft Extended End-User License
Note: As of version 6.0, the import templates (
*.i3, *.i4
) produced by the Wholeplot import wizards contain the following lines:FILE assay.txt (except for ODBC) DRILLTYPE 3 DRILLTABLE Assay
The FILE is normally the input file name, except for ODBC, where it is not defined. The DRILLTYPE is one of DH_DATA_XXX, and the DRILLTABLE is the name of the Wholeplot database table; e.g. Project_Assay.gdb in the above case. The DRILLTABLE is only included in the template for
DH_DATA_FROMTO
andDH_DATA_POINT
, but this function will return the appropriate table names (e.g. Collar, Survey, ENSurvey) for the other types. If the DRILLTYPE is NOT found in the template, a value ofDH_DATA_UNKNOWN
is returned for the data type; likely an indication that this is not a new-style template produced by Wholeplot.
- classmethod get_template_info_ex(templ, data_type, file, table, lst)[source]¶
Retrieve the file,
GXDH
Table name, type and channel list from an import template.- Parameters:
templ (str) – Template name
data_type (int_ref) – DH_DATA constants
file (str_ref) – File name (blank for ODBC, or undefined).
table (str_ref) – Table name (blank for
DH_DATA_UNKNOWN
, or undefined).lst (GXLST) – Channel list (returned)
New in version 7.3.
License: Geosoft Extended End-User License
Note: As of version 6.0, the import templates (
*.i3, *.i4
) produced by the Wholeplot import wizards contain the following lines:FILE assay.txt (except for ODBC) DRILLTYPE 3 DRILLTABLE Assay
The FILE is normally the input file name, except for ODBC, where it is not defined. The DRILLTYPE is one of DH_DATA_XXX, and the DRILLTABLE is the name of the Wholeplot database table; e.g. Project_Assay.gdb in the above case. The DRILLTABLE is only included in the template for
DH_DATA_FROMTO
andDH_DATA_POINT
, but this function will return the appropriate table names (e.g. Collar, Survey, ENSurvey) for the other types. If the DRILLTYPE is NOT found in the template, a value ofDH_DATA_UNKNOWN
is returned for the data type; likely an indication that this is not a new-style template produced by Wholeplot. This version also returns a list of the channels in the template checks can be made to see if the import will exceed the database channel limit.
- get_unique_channel_items(chan_code, selected_holes, vv)[source]¶
Return a
GXVV
with unique items in a channel.- Parameters:
New in version 7.0.
License: Geosoft Extended End-User License
Note: Finds and sorts all the unique non-dummy items for the selected channel.
- get_unique_channel_items_from_collar(chan_name, selected_holes, vv)[source]¶
Return a
GXVV
with unique items in a channel.- Parameters:
New in version 7.3.
License: Geosoft Extended End-User License
Note: Finds and sorts all the unique non-dummy items for the selected channel.
- get_units(units, conv_factor)[source]¶
Get the positional units and conversion factor to m.
New in version 5.0.
License: Geosoft Extended End-User License
- grid_intersection(xi, yi, zi, dip, az, grid, xo, yo, zo)[source]¶
Algorithm to determine the intersection of a straight hole with a surface (DEM) grid.
- Parameters:
xi (float) – Input location on hole X
yi (float) – Input location on hole Y
zi (float) – Input location on hole Z
dip (float) – Dip (positive up) in degrees
az (float) – Azimuth in degrees
grid (str) – DEM grid
xo (float_ref) – Returned intersection point X
yo (float_ref) – Returned intersection point Y
zo (float_ref) – Returned intersection point Z
- Returns:
1 if an intersection is found, 0 if not.
- Return type:
int
New in version 7.3.
License: Geosoft Extended End-User License
Note: Given a point on the hole and the straight hole dip and azimuth, ocate (an) intersection point with the input DEM grid.
- h_assay_db(assay)[source]¶
Database for an assay data set.
- Parameters:
assay (int) – Assay dataset number
- Returns:
x -
GXDB
DB_NULL
if no assay data (no error registered)- Return type:
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: Works for both single and multiple
GXDB
Wholeplots.
- h_assay_symb(assay, hole)[source]¶
Line/Group symbol for a specific assay data set hole.
- Parameters:
assay (int) – Assay dataset number
hole (int) – Hole index number
- Returns:
x - DB_SYMB
NULLSYMB
if no survey data for this hole (no error registered)- Return type:
int
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: Works for both single and multiple
GXDB
Wholeplots.
- h_collar_db()[source]¶
Database for the collar table.
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: Works for both single and multiple
GXDB
Wholeplots.
- h_collar_symb()[source]¶
Line/Group symbol for the collar table.
- Returns:
x - DB_SYMB
NULLSYMB
if no collar table (no error registered)- Return type:
int
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: Works for both single and multiple
GXDB
Wholeplots.
- h_dip_az_survey_db()[source]¶
Database for the Dip-Azimuth survey data
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: Works for both single and multiple
GXDB
Wholeplots.
- h_dip_az_survey_symb(hole)[source]¶
Line/Group symbol for a specific hole Dip-Azimuth survey.
- Parameters:
hole (int) – Hole index number
- Returns:
x - DB_SYMB
NULLSYMB
if no Dip-Azimuth survey data for this hole (no error registered)- Return type:
int
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: Works for both single and multiple
GXDB
Wholeplots.
- h_en_survey_db()[source]¶
Database for the East-North survey data
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: Works for both single and multiple
GXDB
Wholeplots.
- h_en_survey_symb(hole)[source]¶
Line/Group symbol for a specific hole East-North survey.
- Parameters:
hole (int) – Hole index number
- Returns:
x - DB_SYMB
NULLSYMB
if no EN survey data for this hole (no error registered)- Return type:
int
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: Works for both single and multiple
GXDB
Wholeplots.
- classmethod have_current()[source]¶
Returns
True
if a drill project is loaded- Return type:
bool
New in version 6.1.
License: Geosoft Extended End-User License
- classmethod have_current2(db)[source]¶
Returns
True
if a drill project is loaded, and the collar database if it is loaded.- Parameters:
db (str_ref) – Collar table name (returned)
- Return type:
bool
New in version 6.1.
License: Geosoft Extended End-User License
- hole_lst(lst)[source]¶
Populate an
GXLST
with the list of the selected holesNew in version 5.0.
License: Geosoft Extended End-User License
- hole_lst2(lst)[source]¶
Populate an
GXLST
with the list of all the holesNew in version 5.1.2.
License: Geosoft Extended End-User License
- classmethod hole_select_from_list_gui(lst, sel_lst)[source]¶
Select/Deselect holes using the two-panel selection tool.
- Parameters:
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 7.0.
License: Geosoft Extended End-User License
- hole_selection_tool_gui()[source]¶
Select/Deselect holes using plan map tool.
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 5.1.8.
License: Geosoft Extended End-User License
- holes()[source]¶
Return number of holes.
- Returns:
x - Number of holes
- Return type:
int
New in version 5.0.
License: Geosoft Extended End-User License
- classmethod import2(project, db, line, hole, table, type, log)[source]¶
Imports data into a Drill Hole Database (obsolete).
- Parameters:
project (str) – Drill project name
line (int) – Line
hole (int) – Hole channel
table (str) – Table
type (int) – DH_DATA constants
log (str) – Log file name
New in version 7.0.
License: Geosoft Extended End-User License
- import_las(assay, file, interval, interp, wa)[source]¶
Imports LAS Data into a
GXDH
database- Parameters:
assay (str) – Assay database to use
file (str) – LAS file name
interval (float) – Averaging/desampling interval (cm)
interp (int) – Interpolation method
wa (GXWA) – Log file handle
New in version 6.0.1.
License: Geosoft Extended End-User License
Note: The argument for the assay database is the file name without the project name and underscore, e.g. for “Project_Assay.gdb” use “Assay”
- classmethod is_esri()[source]¶
Running inside ArcGIS?
- Returns:
0 - if No 1 - if Yes
- Return type:
int
New in version 5.1.8.
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
- litho_grid_3d(chan_code, tpat, vox, cell_size, gap, non_contact_radius, gridding_type, reg, retain_grid_files)[source]¶
Create a lithology voxel grid with lith codes mapped to single values.
- Parameters:
chan_code (str) – Lithology channel code
tpat (GXTPAT) – Codes, colors etc.
vox (str) – Name of
GXVOX
Persistent Storage filecell_size (float) – Cell Size (
GS_R8DM
for automatic calculation)gap (float) – Max gap to skip when compositing (
GS_R8DM
for none)non_contact_radius (float) – Non-contact radius.
gridding_type (int) – Gridding type (0: Rangrid, 1: TinGrid)
reg (GXREG) – Rangrid control
GXREG
(seeGXRGRD
class for parameters)retain_grid_files (int) – Retain top/bottom grids?
New in version 7.0.
License: Geosoft Extended End-User License
Note: Values in the input channel are assigned the index of the corresponding item found in the input
GXTPAT
. The compositing gap refers to the size of gaps in the data (either a blank lithology or missing from-to interval) which will be ignored when compositing lithologies into contiguous from-to intervals. The non-contact radius is used to dummy out the level grids around holes where the gridded lithology is not found. If not specified (dummy) then half the distance to the nearest contacting hole is used.
- load_data_parameters_ini(db, dir)[source]¶
Load data parameters from INI files..
- Parameters:
db (GXDB) – Source database
dir (str) – Directory to store INI files
New in version 6.0.
License: Geosoft Extended End-User License
Note: Wholeplot data graphing parameters for each channel are stored in the channel
GXREG
. This function lets a user transfer pre-defined settings to individual INI files (eg. cu.ini).
- load_plot_parameters(ini, type)[source]¶
Load parameters from a Job into the Drill object.
- Parameters:
ini (str) – The job file file to read
type (int) – DH_PLOT constants
New in version 6.0.
License: Geosoft Extended End-User License
- load_select(file)[source]¶
Load selections to from a file.
- Parameters:
file (str) – File Name
New in version 5.0.
License: Geosoft Extended End-User License
- mask_ply(pply, ipj, tol, mask, select, append)[source]¶
Set mask channel based on view selection polygon.
- Parameters:
pply (GXPLY) – Masking polygon
ipj (GXIPJ) – Projection from data to polygon coordinates
tol (float) – Slice thickness -
rDUMMY
for no limiting thicknessmask (str) – Name of mask channel
select (int) – DH_HOLES constants
append (int) – DH_MASK constants
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: Data values inside the polygon area, and within the slice thickness have their mask channel values set to 1. If the specified mask channel does not exist, it is created.
DH_MASK_NEW
— Mask is created new for each selected holeDH_MASK_APPEND
— Current selection is added to previous.
- modify3d_gui(ini, page)[source]¶
Modify parameters for a 3D plot.
- Parameters:
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 5.1.6.
License: Geosoft Extended End-User License
- modify_crooked_section_holes_gui(ini, page)[source]¶
Modify parameters to replot holes and hole data to an existing crooked section map.
- Parameters:
ini (str) – Job Name (
*.ins
)page (int_ref) – Tab page ID.
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 7.2.
License: Geosoft Extended End-User License
Note: Will plot to an empty crooked section.
- modify_fence_gui(ini, page)[source]¶
Modify parameters for a section plot.
- Parameters:
ini (str) – Job Name (
*.ins
)page (int_ref) – DH_SECT_PAGE constants
- Returns:
0 - Ok 1 - Interactively define a fence. -1 - User Cancelled
- Return type:
int
New in version 7.0.
License: Geosoft Extended End-User License
Note: The fence section function.
- modify_hole_traces_3d_gui(ini, page)[source]¶
Modify parameters for a hole traces plot to an existing 3D view.
- Parameters:
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 6.1.
License: Geosoft Extended End-User License
- modify_hole_traces_gui(ini, page)[source]¶
Modify parameters for a hole traces plot to a current map.
- Parameters:
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 5.1.2.
License: Geosoft Extended End-User License
- modify_hole_traces_gui2(ini, plot_type, page)[source]¶
Modify parameters for a hole traces plot to a current plan or section view.
- Parameters:
ini (str) – Job Name
plot_type (int) – DH_PLOT constants One of
DH_PLOT_PLAN
orDH_PLOT_SECTION
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 8.3.
License: Geosoft Extended End-User License
Note: Currently supports
DH_PLOT_PLAN
andDH_PLOT_SECTION
- modify_plan_gui(ini, page)[source]¶
Modify parameters for a plan plot.
- Parameters:
ini (str) – Job Name (
*.inp
)page (int_ref) – DH_SECT_PAGE constants
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 5.1.2.
License: Geosoft Extended End-User License
- modify_plan_holes_gui(ini, page)[source]¶
Modify parameters to replot holes and hole data to an existing plan map.
- Parameters:
ini (str) – Job Name (
*.ins
)page (int_ref) – Tab Page ID
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 7.1.
License: Geosoft Extended End-User License
Note: Modifies only hole trace, hole data, topo, voxel slice data.
- classmethod modify_rock_codes_gui(file)[source]¶
Modify/create a rock codes file.
- Parameters:
file (str) – File name
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 5.1.2.
License: Geosoft Extended End-User License
- classmethod modify_rock_codes_gui2(db, file)[source]¶
Modify/create a rock codes file, channel population option.
- Parameters:
db (GXDB) – Database
file (str) – File name
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 6.1.
License: Geosoft Extended End-User License
Note: Same as above, but passes the current database so that the “Populate from channel” button can be used to automatically populate the rock code list. The database should be a Wholeplot database.
- modify_section_gui(ini, page)[source]¶
Modify parameters for a section plot.
- Parameters:
ini (str) – Job Name (
*.ins
)page (int_ref) – DH_SECT_PAGE constants
- Returns:
0 - Ok 1 - Interactively define a NS section 2 - Interactively define an EW section 3 - Interactively define an angled section -1 - User Cancelled
- Return type:
int
New in version 5.1.2.
License: Geosoft Extended End-User License
Note: The stacked section function uses the same control file format, but the plotting of profiles and plan views is disabled, and if multiple sections are requested, they are plotted in a stack on the left side of the same map, not to individual maps.
- modify_section_holes_gui(ini, page)[source]¶
Modify parameters to replot holes and hole data to an existing section map.
- Parameters:
ini (str) – Job Name (
*.ins
)page (int_ref) – Tab page ID.
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 7.1.
License: Geosoft Extended End-User License
Note: Works for both regular and stacked sections. Modifies only hole trace, hole data, topo, voxel slice data.
- modify_stacked_section_gui(ini, page)[source]¶
Modify parameters for a section plot.
- Parameters:
ini (str) – Job Name (
*.ins
)page (int_ref) – DH_SECT_PAGE constants
- Returns:
0 - Ok 1 - Interactively define a NS section 2 - Interactively define an EW section 3 - Interactively define an angled section -1 - User Cancelled
- Return type:
int
New in version 5.1.8.
License: Geosoft Extended End-User License
Note: The stacked section function uses the same control file format, but the plotting of profiles and plan views is disabled, and if multiple sections are requested, they are plotted in a stack on the left side of the same map, not to individual maps.
- modify_strip_log_gui(ini, page)[source]¶
Modify parameters for a strip log plot.
- Parameters:
ini (str) – Job Name (
*.inl
)page (int_ref) – DH_SECT_PAGE constants
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 5.1.3.
License: Geosoft Extended End-User License
- classmethod modify_structure_codes_gui(file)[source]¶
Modify/create a structure codes file.
- Parameters:
file (str) – File name
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 6.1.
License: Geosoft Extended End-User License
- classmethod modify_structure_codes_gui2(db, file)[source]¶
Modify/create a structure codes file, channel population option.
- Parameters:
db (GXDB) – Database
file (str) – File name
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 6.1.
License: Geosoft Extended End-User License
Note: Same as above, but passes the current database so that the “Populate from channel” button can be used to automatically populate the structure code list. The database should be a Wholeplot database.
Navigate to MX Deposit portal
- Parameters:
select_type (str) – Selection Type
select_id (str) – Selection ID
New in version 9.6.
License: Geosoft Open License
- num_assays()[source]¶
Number of assay datasets.
- Returns:
The number of assay datasets.
- Return type:
int
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: Works for both single and multiple
GXDB
Wholeplots.
- num_selected_holes()[source]¶
Returns number of selected holes.
- Returns:
The number of selected holes
- Return type:
int
New in version 5.0.
License: Geosoft Extended End-User License
- numeric_chan_lst(lst)[source]¶
Fills a
GXLST
with available numeric channel code values.New in version 7.2.
License: Geosoft Extended End-User License
Note: Channel codes are in the format “[Assay] Au”, where the name in the square brackets is descriptive part of the project database containing the given channel name. The above code might refer to the “Au” channel in the “Tutorial_Assay.gdb” database.
- numeric_from_to_data_lst(assay, lst)[source]¶
Fills a
GXLST
with available numeric channel code values from From-To databases..- Parameters:
New in version 7.2.
License: Geosoft Extended End-User License
Note: Channel codes are in the format “[Assay] Au”, where the name in the square brackets is descriptive part of the project database containing the given channel name. The above code might refer to the “Au” channel in the “Tutorial_Assay.gdb” database.
- classmethod open(db)[source]¶
Open
GXDH
from collar database and load all associated databases.New in version 7.1.
License: Geosoft Extended End-User License
- open_job(job, type)[source]¶
Open a
GXDH
plotting job- Parameters:
job (str) – Job file name
type (int) – DH_PLOT constants
New in version 5.0.
License: Geosoft Extended End-User License
- plot_hole_traces(map, job)[source]¶
Plot hole traces to a regular (plan) map.
- Parameters:
map (GXMAP) – Map handle
job (str) – Parameter file (INI) name
New in version 5.1.2.
License: Geosoft Extended End-User License
Note: Both the hole traces and data can be plotted. The DHPLANHOLES GX uses the default plan map parameter file “_plan.inp”.
- plot_hole_traces_3d(mview, job)[source]¶
Plot hole traces to an existing 3D map view.
- Parameters:
mview (GXMVIEW) – Existing 3D map view
job (str) – Parameter file (INI) name (normally
*.in3
)
New in version 6.1.
License: Geosoft Extended End-User License
Note: Both the hole traces and data can be plotted. The DH3DHOLES GX uses the default 3D map parameter file “_3D.in3”.
- plot_holes_on_section(job, plot_type, view)[source]¶
Plot the currently selected holes on an existing section view.
- Parameters:
job (str) – Parameter (INI) name
plot_type (int) – DH_PLOT constants Section plot type (
DH_PLOT_SECTION
orDH_PLOT_SECTION_CROOKED
view (str) – View name
New in version 8.3.
License: Geosoft Extended End-User License
Note: Plot the currently selected holes to a section view.
- plot_symbols_3d(mview, job)[source]¶
Plot 3D symbols to an existing 3D map view.
- Parameters:
mview (GXMVIEW) – Existing 3D map view
job (str) – Parameter file (INI) name (normally
*.in3
)
New in version 9.1.
License: Geosoft Extended End-User License
- punch_grid_holes(img, vv_x, vv_y, vv_z, blank_dist)[source]¶
Dummy out locations in a grid around non-contact holes.
- Parameters:
New in version 7.0.
License: Geosoft Extended End-User License
Note: Grid is dummied out to the blanking distance around holes where the input Z value is dummy. If a contacting hole is closer then twice the blanking distance, the blanking distance is reduced accordingly. Distances are measured horizontally (e.g. Z is ignored). If the blanking distance is zero or dummy, the distance is automatically set to half the distance to the closest hole intersection.
- qa_collar(wa)[source]¶
Do QA/QC on Hole Collar data.
New in version 5.1.3.
License: Geosoft Extended End-User License
- qa_collar_lst(lst, wa)[source]¶
Do QA/QC on Hole Collar data -
GXLST
of holes.New in version 7.0.1.
License: Geosoft Extended End-User License
- qa_dip_az_curvature(wa, tolerance)[source]¶
Do QA/QC Curvature checking on Dip Azimuth data.
- Parameters:
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: Checks all holes with Dip-Azimuth survey data
- qa_dip_az_curvature2(wa, tolerance, hole)[source]¶
Do QA/QC Curvature checking on Dip Azimuth data for a single hole.
- Parameters:
New in version 6.4.2.
License: Geosoft Extended End-User License
Note: Checks single hole with Dip-Azimuth survey data
- qa_dip_az_curvature_lst(lst, tolerance, wa)[source]¶
Do QA/QC Curvature checking on Dip Azimuth data for holes in a
GXLST
.- Parameters:
- Returns:
The number of holes found and checked.
- Return type:
int
New in version 7.0.
License: Geosoft Extended End-User License
Note: Checks all holes with Dip-Azimuth survey data
- qa_dip_az_survey(db, wa, line, hole)[source]¶
Do QA/QC on Dip/Az Survey data.
- Parameters:
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: Error if no Dip-Azimuth survey database, or if the requested line does not exist in the database.
- qa_dip_az_survey_lst(lst, wa)[source]¶
Do QA/QC on Dip/Az Survey data for holes in a
GXLST
.- Parameters:
- Returns:
The number of holes found and checked.
- Return type:
int
New in version 7.0.
License: Geosoft Extended End-User License
Note: Error if no Dip-Azimuth survey database, or if a requested hole does not exist in the drill project.
- qa_east_north_curvature(wa, tolerance)[source]¶
Do QA/QC Curvature checking on Dip Azimuth data.
- Parameters:
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: Checks all holes with East-North survey data
- qa_east_north_curvature2(wa, tolerance, hole)[source]¶
Do QA/QC Curvature checking on Dip Azimuth data for a single hole.
- Parameters:
New in version 6.4.2.
License: Geosoft Extended End-User License
Note: Checks single holes with East-North survey data
- qa_east_north_curvature_lst(lst, tolerance, wa)[source]¶
Do QA/QC Curvature checking on Dip Azimuth data for holes in a
GXLST
.- Parameters:
- Returns:
The number of holes found and checked.
- Return type:
int
New in version 7.0.
License: Geosoft Extended End-User License
Note: Checks all holes with East-North survey data
- qa_east_north_survey(db, wa, line, hole)[source]¶
Do QA/QC on East/North Survey data.
- Parameters:
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: Error if no East-North survey database, or if the requested line does not exist in the database.
- qa_east_north_survey_lst(lst, wa)[source]¶
Do QA/QC on East/North Survey data for holes in a
GXLST
.- Parameters:
- Returns:
The number of holes found and checked.
- Return type:
int
New in version 7.0.
License: Geosoft Extended End-User License
Note: Error if no East-North survey database, or if a requested hole does not exist in the drill project.
- qa_from_to_data(db, wa, line, hole)[source]¶
Do QA/QC on From/To data.
- Parameters:
New in version 5.1.3.
License: Geosoft Extended End-User License
- qa_point_data(db, wa, line, hole)[source]¶
Do QA/QC on Point data.
- Parameters:
New in version 5.1.3.
License: Geosoft Extended End-User License
- qa_write_unregistered_holes(db, wa)[source]¶
Write out unregistered holes in a database.
New in version 6.1.
License: Geosoft Extended End-User License
Note: Looks at each line in a database and sees if it is listed in the collar tables’ hole list.
- re_survey_east_north(hole, vv_x, vv_y, vv_z, vv_d, east, north, elev, top, bot)[source]¶
Resurvey an East-North-RL survey.
- Parameters:
hole (str) – Hole ID (for error messages)
vv_x (GXVV) – Input East
vv_y (GXVV) – Input North
vv_z (GXVV) – Input RL
vv_d (GXVV) – Returned depths down the hole
east (float) – Input collar East
north (float) – Input collar North
elev (float) – Input collar RL
top (float) – Input top of hole depth
bot (float_ref) – Returned bottom depth
New in version 5.1.3.
License: Geosoft Extended End-User License
Note: Re-interpolates in X, Y and Z to proper depth interval and returns depths for each point
- re_survey_pol_fit(hole, vv_dip, vv_az, vv_depth, east, north, elev, top, bot, inc, dip_conv, order, vv_x, vv_y, vv_z, vv_d)[source]¶
Use the polynomial fit resurveying method.
- Parameters:
hole (str) – Hole ID (used for error messages)
vv_dip (GXVV) – Dip
vv_az (GXVV) – Azimuth
vv_depth (GXVV) – Depth
east (float) – Collar X (easting) (depth = 0)
north (float) – Collar Y (northing)(depth = 0)
elev (float) – Collar Z (elevation) (depth = 0)
top (float) – Minimum hole depth to start output values
bot (float) – Maximum hole depth for output values
inc (float) – Increment for output values
dip_conv (int) – DIP_CONVENTION constants
order (int) – Polynomial order
vv_x (GXVV) – X (Easting) - Output
vv_y (GXVV) – Y (Northin) - Output
vv_z (GXVV) – Z (Elevation) - Output
vv_d (GXVV) – Depths - Output
New in version 5.1.2.
License: Geosoft Extended End-User License
Note: Uses the polynomial fit method to calculate (X, Y, Z) locations down the hole from azimuth, dip, depth values. The collar is assumed to be at zero depth, and depth is the measure distance down the hole (even if it’s horizontal). A negative dip convention means vertical down is -90 degrees. The polynomial order must be in the range 1-20, with 5 being adequate for most smoothly curving holes. The order is reduced to no more than the number of input points.
- re_survey_rad_curve(hole, vv_dip, vv_az, vv_depth, east, north, elev, top, bot, inc, dip_conv, vv_x, vv_y, vv_z, vv_d)[source]¶
Use radius of curvature resurveying method.
- Parameters:
hole (str) – Hole ID (used for error messages)
vv_dip (GXVV) – Dip
vv_az (GXVV) – Azimuth
vv_depth (GXVV) – Depth
east (float) – Collar X (easting) (depth = 0)
north (float) – Collar Y (northing)(depth = 0)
elev (float) – Collar Z (elevation) (depth = 0)
top (float) – Minimum hole depth to start output values
bot (float) – Maximum hole depth for output values
inc (float) – Increment for output values
dip_conv (int) – DIP_CONVENTION constants
vv_x (GXVV) – X (Easting) - Output
vv_y (GXVV) – Y (Northin) - Output
vv_z (GXVV) – Z (Elevation) - Output
vv_d (GXVV) – Depths - Output
New in version 5.1.2.
License: Geosoft Extended End-User License
Note: Uses the Radius of curvature method to calculate (X, Y, Z) locations down the hole from azimuth, dip, depth values. The collar is assumed to be at zero depth, and depth is the measure distance down the hole (even if it’s horizontal). A negative dip convention means vertical down is -90 degrees.
- re_survey_straight(hole, dip, az, east, north, elev, top, bot, inc, dip_conv, vv_x, vv_y, vv_z, vv_d)[source]¶
Resurvey a straight hole.
- Parameters:
hole (str) – Hole ID (used for error messages)
dip (float) – Collar Dip
az (float) – Collar Azimuth
east (float) – Collar X (easting) (depth = 0)
north (float) – Collar Y (northing)(depth = 0)
elev (float) – Collar Z (elevation) (depth = 0)
top (float) – Minimum hole depth to start output values
bot (float) – Maximum hole depth for output values
inc (float) – Increment for output values
dip_conv (int) – DIP_CONVENTION constants
vv_x (GXVV) – X (Easting) - Output
vv_y (GXVV) – Y (Northin) - Output
vv_z (GXVV) – Z (Elevation) - Output
vv_d (GXVV) – Depths - Output
New in version 5.1.2.
License: Geosoft Extended End-User License
Note: Assumes a straight hole to calculate (X, Y, Z) locations down the hole from azimuth, dip, depth values. The collar is assumed to be at zero depth, and depth is the measure distance down the hole (even if it’s horizontal). A negative dip convention means vertical down is -90 degrees.
- re_survey_straight_seg(hole, vv_dip, vv_az, vv_depth, east, north, elev, top, bot, inc, dip_conv, vv_x, vv_y, vv_z, vv_d)[source]¶
Resurvey a hole with straight segments between locations.
- Parameters:
hole (str) – Hole ID (used for error messages)
vv_dip (GXVV) – Dip
vv_az (GXVV) – Azimuth
vv_depth (GXVV) – Depth
east (float) – Collar X (easting) (depth = 0)
north (float) – Collar Y (northing)(depth = 0)
elev (float) – Collar Z (elevation) (depth = 0)
top (float) – Minimum hole depth to start output values
bot (float) – Maximum hole depth for output values
inc (float) – Increment for output values
dip_conv (int) – DIP_CONVENTION constants
vv_x (GXVV) – X (Easting) - Output
vv_y (GXVV) – Y (Northin) - Output
vv_z (GXVV) – Z (Elevation) - Output
vv_d (GXVV) – Depths - Output
New in version 6.2.
License: Geosoft Extended End-User License
Note: Calculate (X, Y, Z) locations down the hole from azimuth, dip, depth values, assuming each segment is straight, and the hole bends at each successive azimuth, dip, depth value. The collar is assumed to be at zero depth, and depth is the measure distance down the hole (even if it’s horizontal). A negative dip convention means vertical down is -90 degrees.
- replot_holes(job, plot_type)[source]¶
Replot holes on an existing drill map.
- Parameters:
job (str) – Parameter (INI) name
plot_type (int) – DH_PLOT constants
New in version 7.1.
License: Geosoft Extended End-User License
Note: The parameter file must correspond to the plot Type. The hDH->hMAP value must be set first, using
set_map
. Overwrites existing hole and hole data groups. Replots the legend if the legend is enabled. This should only be used on a slightly modified version of the INI file used to create the existing map, or things may not work out (e.g. bad locations etc).
- save_data_parameters_ini(db, dir)[source]¶
Save data parameters to INI files..
- Parameters:
db (GXDB) – Source database
dir (str) – Directory to store INI files
New in version 6.0.
License: Geosoft Extended End-User License
Note: Wholeplot data graphing parameters for each channel are stored in the channel
GXREG
. This function lets a user transfer pre-defined settings to individual INI files (eg. cu.ini). As of v6.3, theGXDH
object is NOT required for this function, and is, in fact, ignored.
- save_job(job, type)[source]¶
Save a
GXDH
plotting job- Parameters:
job (str) – Job file name
type (int) – DH_PLOT constants
New in version 5.0.
License: Geosoft Extended End-User License
- save_select(file)[source]¶
Saves current selections to a file.
- Parameters:
file (str) – File Name
New in version 5.0.
License: Geosoft Extended End-User License
- section_window_size_mm(xmm, ymm)[source]¶
Deterine the size, in mm, of the section window
New in version 6.0.
License: Geosoft Extended End-User License
Note: Given the current selection of windows (e.g. legend, plan), paper size and orientation, return the size in mm of the window used for plotting the section.
- select_all_holes()[source]¶
Select all the holes in a Drill hole project.
New in version 5.0.
License: Geosoft Extended End-User License
- select_holes(gvv, sel)[source]¶
Select holes by hole indices.
New in version 6.3.
License: Geosoft Extended End-User License
Note: Indices less than 0 are skipped. This lets you use this function after a call to
GXLST.find_items
, which returns -1 for indices not located.
- select_name(mask, sel, mode)[source]¶
Select holes using a name mask.
- Parameters:
mask (str) – Mask
sel (int) – 0 - deselect, 1 - select
mode (int) – 0 - overwrite, 1 - append
New in version 5.0.
License: Geosoft Extended End-User License
Note: Overwrite mode - all selections tested and selected or not selected Append mode - only holes matching the mask are selected or not selected.
- select_ply(pply)[source]¶
Select all holes in
GXPLY
(Polygon) object.- Parameters:
pply (GXPLY) – Polygon object
New in version 5.0.
License: Geosoft Extended End-User License
Note: This function operates the same as the
select_ply2
method with parameters(1, 0, 0)
- select_ply2(pply, select, inside, new_mode)[source]¶
Select holes in
GXPLY
(Polygon) object with options.- Parameters:
pply (GXPLY) – Polygon object
select (int) – Select (0) or Deselect (1)
inside (int) – Region (0: inside, 1: outside)
new_mode (int) – Mode (0: Append, 1: New)
New in version 6.1.
License: Geosoft Extended End-User License
Note: The various selection options give the following results:
- New/Select/inside: Unselect all holes, then
select all holes inside the polygon.
- New/Select/outside: Unselect all holes, then
select all holes outside the polygon.
- New/Deselect/inside: Select all holes, then
deselect all holes inside the polygon.
- New/Deselect/outside: Select all holes, then
deselect all holes outside the polygon.
- Append/Select/inside: Select all holes inside the polygon.
Leave selections outside as is.
- Append/Select/outside: Select all holes outside the polygon.
Leave selections inside as is.
- Append/Deselect/inside: Deselect all holes inside the polygon
Leave selections outside as is.
- Append/Deselect/outside: Deselect all holes outside the polygon.
Leave selections inside as is.
- set_crooked_section_ipj(ipj)[source]¶
Pass the Crooked projection required for plotting to a crooked section.
New in version 7.2.
License: Geosoft Extended End-User License
Note: This might be extracted from an existing crooked section view, or created from a database line.
- set_current_view_name(cur_view)[source]¶
Set the current map view name.
- Parameters:
cur_view (str) – View name
New in version 7.2.
License: Geosoft Extended End-User License
Note: Can be used to specify the name of the view to plot into.
- set_info(hole, name, data)[source]¶
Set Collar Information.
- Parameters:
hole (int) – Hole index
name (str) – Name of information
data (str) – Information
New in version 5.0.
License: Geosoft Extended End-User License
Note: If the DH_ELEV channel is requested it will also search for the DH_RL channel, which is the new name for the collar elevation.
- set_ipj(ipj)[source]¶
Set the project
GXIPJ
.New in version 5.1.8.
License: Geosoft Extended End-User License
Note: The projection for the project is the projection stored in the DH_EAST channel in the collar table. This function sets the projection of the (DH_EAST, DH_NORTH) channel pairs in each of the project databases to the input
GXIPJ
. The inputGXIPJ
cannot be a geographic coordinate system or this call will fail with an error message.
- set_map(map)[source]¶
Store the current
GXMAP
to theGXDH
object.New in version 7.1.
License: Geosoft Extended End-User License
Note: Use this before calling the ReplotHoles functions, so that, instead of creating a new map, the plotting functions use the existing one.
- set_new_ipj(db)[source]¶
Set a new project database projection to collar table projection.
- Parameters:
db (str) – Project database name
New in version 5.1.8.
License: Geosoft Extended End-User License
Note: Gets the
GXIPJ
of the collar table current x channel and copies it into the named database (as long as it is in the project!)
- set_selected_holes_vv(vv, append)[source]¶
Set hole selection using hole indices.
- Parameters:
vv (GXVV) – Input hole indices (must be type INT)
append (int) – 0 - overwrite, 1 - append
New in version 8.0.
License: Geosoft Extended End-User License
- classmethod set_template_blob(db, templ, imp_type)[source]¶
Store the import template to the database.
- Parameters:
templ (str) – Import template name
imp_type (int) – DH_DATA constants
New in version 6.0.
License: Geosoft Extended End-User License
Note: The template can later be retrieved in order to refresh the database with a call to the DHIMPORT.GX.
The import types correspond to the DHIMPORT.IMPTYPE variable: 0: ASCII, 1: Database/XLS, 2: ODBC
- significant_intersections_db(mast_db, comp_db, hol_sel, assay_ch, cut_off_grade, clip_grade, min_composite_thickness, min_composite_grade, max_internal_dilution_length, min_internal_dilution_grade, grade_for_missing_assays)[source]¶
Make a report of Significant Intersections
- Parameters:
hol_sel (int) – DH_COMPSTDB_HOLSEL constants
assay_ch (str) – The primary assay channel.
cut_off_grade (float) – Minimum Cut off grade for Primary Assay
clip_grade (float) – Maximum Cut off grade for Primary Assay
min_composite_thickness (float) – Minimum Composite Length
min_composite_grade (float) – Minimum Composite thickness
max_internal_dilution_length (float) – Maximum Internal Dilution
min_internal_dilution_grade (float) – Minimum diluted grade
grade_for_missing_assays (float) – Grade for Missing Assays
New in version 7.2.
License: Geosoft Extended End-User License
- slice_selection_tool_gui(aoix1, aoiy1, aoix2, aoiy2, aoix3, aoiy3, aoix4, aoiy4, x1, y1, x2, y2)[source]¶
Select a slice with the holes in context. An optional 4 point area of interest (AOI) can be added to be represented in the UI too.
- Parameters:
aoix1 (float) – 1st Corner of AOI - X
aoiy1 (float) – 1st Corner of AOI - Y
aoix2 (float) – 2nd Corner of AOI - X
aoiy2 (float) – 2nd Corner of AOI - Y
aoix3 (float) – 3rd Corner of AOI - X
aoiy3 (float) – 3rd Corner of AOI - Y
aoix4 (float) – 4th Corner of AOI - X
aoiy4 (float) – 4th Corner of AOI - Y
x1 (float_ref) – Returned slice 1st point - X
y1 (float_ref) – Returned slice 1st point - Y
x2 (float_ref) – Returned slice 2nd point - X
y2 (float_ref) – Returned slice 2nd point - Y
- Returns:
0 - Ok -1 - User Cancelled
- Return type:
int
New in version 7.2.
License: Geosoft Extended End-User License
- string_chan_lst(lst)[source]¶
Fills a
GXLST
with available string channel code values.New in version 7.2.
License: Geosoft Extended End-User License
Note: Channel codes are in the format “[Assay] Au”, where the name in the square brackets is descriptive part of the project database containing the given channel name. The above code might refer to the “Au” channel in the “Tutorial_Assay.gdb” database.
- string_from_to_data_lst(assay, lst)[source]¶
Fills a
GXLST
with available string-type channel code values from From-To databases.- Parameters:
New in version 7.2.
License: Geosoft Extended End-User License
Note: Channel codes are in the format “[Geology] Lithology”, where the name in the square brackets is descriptive part of the project database containing the given channel name. The above code might refer to the “Lithology” channel in the “Tutorial_Geology.gdb” database.
- surface_intersections(output_db, input_geosurface_or_grid, hole_selection)[source]¶
Determine intersections of drillholes with a surface.
- Parameters:
New in version 8.3.
License: Geosoft Extended End-User License
- test_import_las(assay, file, interval, wa, warn)[source]¶
Tests import of LAS Data for problems.
- Parameters:
New in version 6.0.1.
License: Geosoft Extended End-User License
Note: See
import_las
. Determines if the import of the LAS data will result in data being overwritten, interpolated or resampled. Warnings are written to a log file, as in sImportLAS_DH. Warnings are not registered in cases where data is merely extended at the start or the end with dummies to match a different interval down the hole.
- un_select_all_holes()[source]¶
Unselect all the holes in a Drill hole project.
New in version 5.0.
License: Geosoft Extended End-User License
- un_selected_hole_lst(lst)[source]¶
Populate an
GXLST
with the list of the unselected holesNew in version 6.3.
License: Geosoft Extended End-User License
- update_collar_table()[source]¶
Update all collar table information.
New in version 5.0.
License: Geosoft Extended End-User License
- update_hole_extent(hole)[source]¶
Update extents for one hole.
- Parameters:
hole (int) – Hole index
New in version 5.0.
License: Geosoft Extended End-User License
- update_survey_from_collar(hole)[source]¶
Update the Survey table from the collar info.
- Parameters:
hole (int) – Hole index
- Returns:
0 - No change; there is no survey table, the table was empty, or values were same as collar 1 - Survey table updated; values changed and there is just one row. 2 - Survey table unchanged; there was more than one row in the table, and values were different
- Return type:
int
New in version 7.1.
License: Geosoft Extended End-User License
Note: Call when the collar values are edited to update the survey table values. If the survey contains more than one row, then no changes are applied, and no warning or error is registered.
- classmethod update_template_blob(db, templDestination, templSource, imp_type)[source]¶
Update the import template and store to the database if necessary.
- Parameters:
templDestination (str) – Destination template name
templSource (str) – Source template name
imp_type (int) – DH_DATA constants
New in version 9.10.
License: Geosoft Extended End-User License
Note: The template will be updated using another template.
The import types correspond to the DHIMPORT.IMPTYPE variable: 0: ASCII, 1: Database/XLS, 2: ODBC
- wholeplot(job, plot_type)[source]¶
Run a Wholeplot plot job.
- Parameters:
job (str) – Parameter (INI) name
plot_type (int) – DH_PLOT constants
New in version 5.1.2.
License: Geosoft Extended End-User License
Note: The parameter file must correspond to the plot Type. The INI file contains settings for all of the non-database data related parameters (e.g. Map template, scale, boundaries, section definitions, hole trace parameters etc…)
- The
DH_DEFAULT_FILENAMES constants¶
Default filenames
STR_DH_HOLES constants¶
This declares the size of the string used in various
GXDH
GXs to store all the currently selected holes, as input to the two-panel
selection tool. This should be big enough for 65,000 16-character hole names!
DH_COMP_CHOICE constants¶
Composition
DH_COMPSTDB_HOLSEL constants¶
Composite Hole Selection
DH_COMPSTDB_INTSEL constants¶
Composite Interval
DH_DATA constants¶
What to import
DH_DEFINE_PLAN constants¶
Plans
DH_DEFINE_SECT constants¶
Types of Sections
DH_EXP constants¶
Type of Export
DH_HOLES constants¶
Holes to select
DH_MASK constants¶
Masks
DH_PLOT constants¶
Type of Plot
DH_SECT_PAGE constants¶
Sections
DH_SURFACE constants¶
Surface selection for creation of geological top or bottom surfaces.
DIP_CONVENTION constants¶
Dip convention
DH_DESURVEY constants¶
Desurvey method