GXDU class¶
-
class
GXDU
(handle=0)[source]¶ GXDU class.
GXDU
functions provide a variety of common utilities that can be applied efficiently to the contents of a database. MostGXDU
library functions take as their first argument aGXDB
object, and apply standard processes to data stored in an OASIS database, including import and export functions.Note:
The following defines are used by GX functions but are not required for any methods:
-
classmethod
ado_table_names
(connect, vv)[source]¶ Scans a ADO-compliant database and returns the table names in a
GXVV
New in version 5.0.8.
License: Geosoft End-User License
Note: The
GXVV
must be created to hold strings of lengthSTR_DB_SYMBOL
; i.e. use Creat_VV(-STR_DB_SYMBOL
, 0), or it will assert.
-
classmethod
an_sig
(db, line, i_ch, o_ch)[source]¶ Calculate the Analytic Signal of a channel.
- Parameters
db (GXDB) – Database
line (int) – Line handle
i_ch (int) – Input channel [
DB_LOCK_READONLY
]o_ch (int) – Output Analytic Signal channel [
DB_LOCK_READWRITE
]
New in version 5.0.
License: Geosoft End-User License
-
classmethod
append
(d_bi, d_bo, ignore)[source]¶ Append a source database onto a destination database.
- Parameters
New in version 5.0.
License: Geosoft End-User License
Note: If the source database and destination database have channels with the same name, then data is appended onto the end of the channel in lines which have the same number.
If a channel in the destination database is not also in the source database, it is ignored.
-
classmethod
avg_azimuth
(db, precision, azimuth)[source]¶ Returns average azimuth of selected lines.
- Parameters
New in version 5.0.
License: Geosoft End-User License
Note: Direction in degrees azimuth (clockwise relative the +Y direction). The result is in the range -90 < azimuth <= 90. The method handles lines going in opposite directions (they do not average to 0!) The method takes a precision, which is used to generate a series of “test” angles. The dot product of the line directions is taken with each of the test angles, and the absolute values summed. The maximum value occurs at the angle which most closely approximates the trend direction of the lines.
-
classmethod
b_spline
(db, line, i_ch, o_ch, sd, rou, tau)[source]¶ B-spline Interpolate a Channel.
- Parameters
db (GXDB) – Database
line (int) – Line handle
i_ch (int) – Channel to interpolate [
DB_LOCK_READONLY
]o_ch (int) – Output interpolated channel [
DB_LOCK_READWRITE
]sd (float) – Data error (Std Dev > 0.0)
rou (float) – Roughness (Rou > 0.0)
tau (float) – Tension (0.<= Tension <=1.)
New in version 5.0.
License: Geosoft End-User License
See also
-
classmethod
base_data
(db, line, in_ch, time_ch, out_ch, tb)[source]¶ This method corrects an entire database line using a time-based correction table. It is given 2 input channel tokens and 1 output channel token as well as the table object to use.
- Parameters
db (GXDB) – Database
line (int) – Line Handle to apply correction to
in_ch (int) – Input Channel Token [
DB_LOCK_READONLY
]time_ch (int) – Time Channel Token [
DB_LOCK_READONLY
]out_ch (int) – Output Channel Token [
DB_LOCK_READWRITE
]tb (GXTB) – Table Object (a Date/Time/Correction Table)
New in version 5.0.
License: Geosoft End-User License
-
classmethod
base_data_ex
(db, line, in_ch, time_ch, out_ch, tb, flag)[source]¶ This method corrects an entire database line using a time-based correction table. It is given 2 input channel tokens and 1 output channel token as well as the table object to use (table sort flag=1 for sort, =0 for no sort).
- Parameters
db (GXDB) – Database
line (int) – Line Handle to apply correction to
in_ch (int) – Input Channel Token [
DB_LOCK_READONLY
]time_ch (int) – Time Channel Token [
DB_LOCK_READONLY
]out_ch (int) – Output Channel Token [
DB_LOCK_READWRITE
]tb (GXTB) – Table Object (a Date/Time/Correction Table)
flag (int) – Table sort flag: 0 - do not sort, 1 - do sort.
New in version 5.1.8.
License: Geosoft End-User License
-
classmethod
bound_line
(db, line, x_chan, y_chan, pply)[source]¶ Set map boundary clip limits.
- Parameters
db (GXDB) – Database
line (int) – Line Handle [
DB_LOCK_READWRITE
]x_chan (int) – X Channel [
DB_LOCK_READONLY
]y_chan (int) – Y Channel [
DB_LOCK_READONLY
]pply (GXPLY) – Polygon Object to use
New in version 5.0.
License: Geosoft End-User License
-
classmethod
bp_filt
(db, line, i_ch, o_ch, sw, lw, filt_len)[source]¶ This method applies a band-pass filter to the specified line/channel and places the output in the output channel.
- Parameters
db (GXDB) – Database
line (int) – Line handle
i_ch (int) – Input channel to filter [
DB_LOCK_READONLY
]o_ch (int) – Output filtered channel [
DB_LOCK_READWRITE
]sw (float) – Short wavelength cutoff, 0 for highpass
lw (float) – Long wavelength cutoff, 0 for lowpass
filt_len (int) – Filter Length, 0 for default length
New in version 5.0.
License: Geosoft End-User License
Note: If the short and long wavelengths are <= 0, the input channel is simply copied to the output channel without filtering.
-
classmethod
break_line
(db, line, chan)[source]¶ Break up a line based on line numbers in a channel.
- Parameters
db (GXDB) – Database
line (int) – Line to be broken up [
DB_LOCK_READONLY
]chan (int) – Channel containing line numbers [
DB_LOCK_READONLY
]
New in version 5.0.
License: Geosoft End-User License
-
classmethod
break_line2
(db, line, chan, reset_fi_ds)[source]¶ Break up a line based on line numbers in a channel.
- Parameters
db (GXDB) – Database
line (int) – Line to be broken up [
DB_LOCK_READONLY
]chan (int) – Channel containing line numbers [
DB_LOCK_READONLY
]reset_fi_ds (int) – Reset starting fiducials to zero (0: No, 1: Yes)
New in version 8.4.
License: Geosoft End-User License
Note: The same as BreakLine, but with an option to reset each line’s starting fiducial to zero.
-
classmethod
break_line_to_groups
(db, line, chan, cl)[source]¶ Break up a line into group-lines based on a channel.
- Parameters
db (GXDB) – Database
line (int) – Line to be broken up [
DB_LOCK_READONLY
]chan (int) – Channel containing line numbers [
DB_LOCK_READONLY
]cl (str) – Class name for new group lines (can be “”)
New in version 5.1.8.
License: Geosoft End-User License
Note: The original line will be deleted. This is similar to
break_line
, but the output lines are “group” lines, without the line type letters at the start. (See db.gxh for information of Group Lines). All channels are associated with each group line, and the input class name is assigned to each group. Class names for groups ensure that (for instance) if you add a new channel to one group of a given class, it will get added to all other groups in the same class. If the class name is left empty, then this will NOT be true. (Groups without class names are treated as isolated entities for the purposes of channel loading).
-
classmethod
break_line_to_groups2
(db, line, chan, cl, reset_fi_ds)[source]¶ Break up a line into group-lines based on a channel.
- Parameters
db (GXDB) – Database
line (int) – Line to be broken up [
DB_LOCK_READONLY
]chan (int) – Channel containing line numbers [
DB_LOCK_READONLY
]cl (str) – Class name for new group lines (can be “”)
reset_fi_ds (int) – Reset starting fiducials to zero (0: No, 1: Yes)
New in version 8.4.
License: Geosoft End-User License
Note: The same as BreakLineToGroups, but with an option to reset each line’s starting fiducial to zero.
-
classmethod
calculate_draped_survey_altitude
(db, line, x_ch, y_ch, img, z_ch, ascent, descent, drape_height, n_hanning, hanning_width, min_curvature)[source]¶ Calculate a draped flight path, enforcing maximum descent and ascent rates.
- Parameters
db (GXDB) – Database
line (int) – Line [
DB_LOCK_READONLY
]x_ch (int) – X Channel [
DB_LOCK_READONLY
]y_ch (int) – Y Channel [
DB_LOCK_READONLY
]img (GXIMG) – Topography grid
z_ch (int) – Output draped altitude channel [
DB_LOCK_READWRITE
]ascent (float) – Maximum rate of ascent (%)
descent (float) – Maximum rate of descent (%)
drape_height (float) – Minimum terrain clearance (drape height)
n_hanning (int) – Number of times to apply Hanning Filter
hanning_width (float) – Width of Hanning Filter
min_curvature (float) – Minimum radius of curvature down slopes and at valley bottoms (
rDUMMY
to disable)
New in version 8.3.
License: Geosoft End-User License
Note: Calculate a draped flight path, enforcing maximum descent and ascent rates. Additional Inputs are the sample distance along the line and a topography grid.
-
classmethod
calculate_draped_survey_altitude2
(db, line, x_ch, y_ch, img, dem_ch, z_ch, ascent, descent, drape_height, min_drape_height, n_hanning, hanning_width, min_curvature)[source]¶ Calculate a draped flight path, enforcing maximum descent and ascent rates.
- Parameters
db (GXDB) – Database
line (int) – Line [
DB_LOCK_READONLY
]x_ch (int) – X Channel [
DB_LOCK_READONLY
]y_ch (int) – Y Channel [
DB_LOCK_READONLY
]img (GXIMG) – Topography grid
dem_ch (int) – Output DEM channel [
DB_LOCK_READWRITE
] (can beNULLSYMB
if not required)z_ch (int) – Output draped altitude channel [
DB_LOCK_READWRITE
]ascent (float) – Maximum rate of ascent (%)
descent (float) – Maximum rate of descent (%)
drape_height (float) – Nominal terrain clearance (drape height)
min_drape_height (float) – Minimum terrain clearance (hard minimum drape height)
n_hanning (int) – Number of times to apply Hanning Filter
hanning_width (float) – Width of Hanning Filter
min_curvature (float) – Minimum radius of curvature down slopes and at valley bottoms (
rDUMMY
to disable)
New in version 8.4.
License: Geosoft End-User License
Note: Calculate a draped flight path, enforcing maximum descent and ascent rates. Set both a nominal and minimum drape height. Additional Inputs are the sample distance along the line and a topography grid.
-
classmethod
closest_point
(db, x, y, xp, yp, line, fid)[source]¶ Return closest data point to input location.
- Parameters
New in version 6.2.
License: Geosoft End-User License
Note: Selected lines are scanned for the (X, Y) location which is closest to the input location. The line and fiducial of the point are returned.
Will register an error if no valid (X, Y) locations are found.
-
classmethod
copy_line
(db, i_line, o_line)[source]¶ Copy a line.
- Parameters
db (GXDB) – Database
i_line (int) – Input Line [
DB_LOCK_READONLY
]o_line (int) – Output Line [
DB_LOCK_READWRITE
]
New in version 5.0.
License: Geosoft End-User License
Note: Existing channels in the output line will be replaced by copied channels.
-
classmethod
copy_line_across
(idb, i_line, odb, o_line)[source]¶ Copy a line from one database to another.
- Parameters
idb (GXDB) – Input Database
i_line (int) – Input Line [
DB_LOCK_READONLY
]odb (GXDB) – Output Database
o_line (int) – Output Line [
DB_LOCK_READWRITE
]
New in version 5.0.
License: Geosoft Open License
Note: Existing channels in the output line will be replaced by copied channels.
See also
copy_line_chan_across
function
-
classmethod
copy_line_chan_across
(idb, i_line, vv_chan, odb, o_line)[source]¶ Copy a list of channels in a line from one database to another.
- Parameters
idb (GXDB) – Input Database
i_line (int) – Input Line [
DB_LOCK_READONLY
]vv_chan (GXVV) –
GXVV
containing a list of channel symbols, must be of INTodb (GXDB) – Output Database
o_line (int) – Output Line [
DB_LOCK_READWRITE
]
New in version 5.0.
License: Geosoft Open License
Note: Existing channels in the output line will be replaced by copied channels.
See also
copy_line_across
function
-
classmethod
copy_line_masked
(db, i_line, mask, prune, o_line)[source]¶ Copy a line, prune items based on a mask channel
- Parameters
db (GXDB) – Database Object
i_line (int) – Input Line Symbol [
DB_LOCK_READONLY
]mask (int) – Mask Channel Symbol [
DB_LOCK_READONLY
]prune (int) – VVU_PRUNE constants
o_line (int) – Output Line Symbol [
DB_LOCK_READWRITE
]
New in version 5.0.8.
License: Geosoft Open License
Note: The input line’s channel data is ReFidded to the mask channel, and then pruned from the output line data, based on the value of the VVU_PRUNE_XXX variable. For
VVU_PRUNE_DUMMY
, only those items where the mask channel value is not a dummy are retained, while the complement is retained for VV_PRUNE_VALID.
-
classmethod
create_drillhole_parameter_weight_constraint_database
(db, ch, reg, database)[source]¶ Used for weighting inversion models.
- Parameters
db (GXDB) – Database (selected lines used)
ch (int) – Property channel handle [
DB_LOCK_READONLY
]reg (GXREG) – Parameters (see notes)
database (str) – Output database
New in version 8.2.
License: Geosoft End-User License
Note: Control parameters are passed in the
GXREG
(to allow for future expansion without the need to modify the wrappers). The input drillhole database must contain current X, Y and Z channels. Drillhole data should be equally spaced (or nearly so) down the hole. Weights are calculated on a circle perpendicular to the hole at each point.RADIUS - Maximum radius from drillhole to create weighting points (Default = 100). INCRMENENT - Grid cell size in weighting circle (Default = 10). MINIMUM - the minimum weighting value to apply, at the radius (Default = 0.0001). POWER - Exponential power to use in the weighting function (negative of this is used) (Default = 2).
-
classmethod
dao_table_names
(file, type, vv)[source]¶ Scans a DAO-compliant database and returns the table names in a
GXVV
- Parameters
New in version 5.0.
License: Geosoft End-User License
Note: The
GXVV
must be created to hold strings of lengthSTR_DB_SYMBOL
; i.e. use Creat_VV(-STR_DB_SYMBOL
, 0), or it will assert.
-
classmethod
decimate
(db, line, i_ch, o_ch, n)[source]¶ Copy and decimate a channel
- Parameters
db (GXDB) – Database
line (int) – Line handle
i_ch (int) – Origin Channel [
DB_LOCK_READONLY
]o_ch (int) – Destination Channel [
DB_LOCK_READWRITE
]n (int) – Decimation factor
New in version 5.0.
License: Geosoft End-User License
-
classmethod
diff
(db, line, i_ch, o_ch, n)[source]¶ Calculate differences within a channel.
- Parameters
db (GXDB) – Database
line (int) – Line handle
i_ch (int) – Origin Channel [
DB_LOCK_READONLY
]o_ch (int) – Destination Channel [
DB_LOCK_READWRITE
]n (int) – Number of differences
New in version 5.0.
License: Geosoft End-User License
Note: Differences with dummies result in dummies. An even number of differences locates data accurately. An odd number of differences locates result 1/2 element lower in the
GXVV
.
-
classmethod
direct_grid_data_to_voxel
(db, x_channel, y_channel, z_channel, data_channel, output_voxel_filename, origin_x, origin_y, origin_z, cell_count_x, cell_count_y, cell_count_z, cell_size_x, cell_size_y, cell_size_z, method)[source]¶ Create a voxel using direct gridding.
- Parameters
db (GXDB) – Database
x_channel (int) – X channel [
DB_LOCK_READONLY
]y_channel (int) – Y channel [
DB_LOCK_READONLY
]z_channel (int) – Z channel [
DB_LOCK_READONLY
]data_channel (int) – Data channel [
DB_LOCK_READONLY
]output_voxel_filename (str) – Output voxel filename
origin_x (float) – Voxel origin X
origin_y (float) – Voxel origin Y
origin_z (float) – Voxel origin Z
cell_count_x (int) – Voxel cell count X
cell_count_y (int) – Voxel cell count Y
cell_count_z (int) – Voxel cell count Z
cell_size_x (float) – Voxel cell size X
cell_size_y (float) – Voxel cell size Y
cell_size_z (float) – Voxel cell size Z
method (int) – DU_DIRECTGRID_METHOD constants
New in version 8.4.
License: Geosoft End-User License
Note: The Z and Data channels may be array channels. If they are, the array sizes must match.
-
classmethod
direct_grid_item_counts_to_voxel
(db, x_channel, y_channel, z_channel, data_channel, output_voxel_filename, origin_x, origin_y, origin_z, cell_count_x, cell_count_y, cell_count_z, cell_size_x, cell_size_y, cell_size_z, pb_replace_zeroes_with_dummy)[source]¶ Create a voxel using direct gridding containing the number of data points in each cell.
- Parameters
db (GXDB) – Database
x_channel (int) – X channel [
DB_LOCK_READONLY
]y_channel (int) – Y channel [
DB_LOCK_READONLY
]z_channel (int) – Z channel [
DB_LOCK_READONLY
]data_channel (int) – Data channel [
DB_LOCK_READONLY
]output_voxel_filename (str) – Output voxel filename
origin_x (float) – Voxel origin X
origin_y (float) – Voxel origin Y
origin_z (float) – Voxel origin Z
cell_count_x (int) – Voxel cell count X
cell_count_y (int) – Voxel cell count Y
cell_count_z (int) – Voxel cell count Z
cell_size_x (float) – Voxel cell size X
cell_size_y (float) – Voxel cell size Y
cell_size_z (float) – Voxel cell size Z
pb_replace_zeroes_with_dummy (bool) – Replace zero values in output with DUMMY?
New in version 8.4.
License: Geosoft End-User License
Note: The Z and Data channels may be array channels. If they are, the array sizes must match.
-
classmethod
direction
(db, line, x_ch, y_ch)[source]¶ Returns the direction of a line.
- Parameters
db (GXDB) – Database Object
line (int) – Line Symbol
x_ch (int) – X reference channel [
DB_LOCK_READONLY
]y_ch (int) – Y reference channel [
DB_LOCK_READONLY
]
- Returns
direction in degrees azimuth (clockwise relative the +Y direction).
GS_R8DM
if the line has no data, or if there is a problem. Problems will register errors.- Return type
float
New in version 5.0.
License: Geosoft Open License
Note: The direction is calculated from the first and last non-dummy locations in the X and Y reference channels.
-
classmethod
distance
(db, line, x_ch, y_ch, o_ch)[source]¶ Create a distance channel from X and Y.
- Parameters
db (GXDB) – Database
line (int) – Line symbol
x_ch (int) – X channel [
DB_LOCK_READONLY
]y_ch (int) – Y channel [
DB_LOCK_READONLY
]o_ch (int) – Output Distance channel [
DB_LOCK_READWRITE
]
New in version 5.0.
License: Geosoft End-User License
-
classmethod
distance_3d
(db, line, x_ch, y_ch, z_ch, type, o_ch)[source]¶ Create a distance channel from XY or XYZ with direction options.
- Parameters
db (GXDB) – Database
line (int) – Line symbol
x_ch (int) – X channel [
DB_LOCK_READONLY
]y_ch (int) – Y channel [
DB_LOCK_READONLY
]z_ch (int) – Z channel [
DB_LOCK_READONLY
] (can beNULLSYMB
)type (int) – DU_DISTANCE_CHANNEL_TYPE constants
o_ch (int) – Output Distance channel [
DB_LOCK_READWRITE
]
New in version 8.1.
License: Geosoft End-User License
-
classmethod
distline
(db, line, x_ch, y_ch, dist)[source]¶ Calculate cummulative distance for a line.
- Parameters
db (GXDB) – Database
line (int) – Line symbol
x_ch (int) – X channel [
DB_LOCK_READONLY
]y_ch (int) – Y channel [
DB_LOCK_READONLY
]dist (float_ref) – Cummulative distance (retruned)
New in version 5.0.
License: Geosoft End-User License
-
classmethod
dup_chan_locks
(d_bi, d_bo)[source]¶ Duplicate all channels protect-info from input
GXDB
.New in version 5.0.
License: Geosoft Open License
-
classmethod
dup_chans
(d_bi, d_bo)[source]¶ Duplicate all channels from input
GXDB
.New in version 5.0.
License: Geosoft Open License
-
classmethod
edit_duplicates
(db, line, x_ch, y_ch, option, single, fid_num)[source]¶ Edit duplicate readings at individual location
- Parameters
db (GXDB) – Database
line (int) – Line
x_ch (int) – Channel X, unlocked
y_ch (int) – Channel Y, unlocked
option (int) – DB_DUP constants
single (int) – DB_DUPEDIT constants
fid_num (float) – Fiducial number (required if
DB_DUPEDIT_SINGLE
)
New in version 5.0.
License: Geosoft End-User License
Note: All the channels must be of the same fid incr/start and length. Protected channels are modified automatically.
-
classmethod
em_tau_automatic
(hVVobs, hVVtime, hVVnoise, lWindow, dTau0, dA0, dItrTol, lItrMax, plItr, pdTau, pdA, pdMisfit, iError, hVVcalcVV)[source]¶ Automatic fitting EM Tau
- Parameters
hVVobs (GXVV) – Observed EM [READONLY]
hVVtime (GXVV) – Time [READONLY]
hVVnoise (GXVV) – Noise [READONLY]
lWindow (int) – Time window [READONLY]
dTau0 (float) – Starting Tau [READONLY]
dA0 (float) – Starting coeff. A [READONLY]
dItrTol (float) – Iterarion tolerance [READONLY]
lItrMax (int) – Maximum iteration [READONLY]
plItr (int_ref) – Number of iterations
pdTau (float_ref) – Calculated Tau
pdA (float_ref) – Calculated coeff. A
pdMisfit (float_ref) – Calculated misfit
iError (int_ref) – Error message code 0 (No error), 1 (Insufficient points above noise threshold) 2 (No convergence in 30 svdcmp iterations)
hVVcalcVV (GXVV) – Calculated EM
- Returns
0 - OK 1 - if error
- Return type
int
New in version 9.4.
License: Geosoft End-User License
-
classmethod
em_tau_calc
(hVVobs, hVVtime, dTau0, dA0, dItrTol, lItrMax, plItr, pdTau, pdA, pdMisfit, iError, hVVcalcVV)[source]¶ Fitting f(t) = A * e^(-t/Tau) = e^s0 * e^(-s1*t), where s0=lnA, s1=1/Tau
- Parameters
hVVobs (GXVV) – Observed EM [READONLY]
hVVtime (GXVV) – Time [READONLY]
dTau0 (float) – Starting Tau [READONLY]
dA0 (float) – Starting coeff. A [READONLY]
dItrTol (float) – Iterarion tolerance [READONLY]
lItrMax (int) – Maximum iteration [READONLY]
plItr (int_ref) – Number of iterations
pdTau (float_ref) – Calculated Tau
pdA (float_ref) – Calculated coeff. A
pdMisfit (float_ref) – Calculated misfit
iError (int_ref) – Error message code 0 (No error), 1 (Insufficient points above noise threshold) 2 (No convergence in 30 svdcmp iterations)
hVVcalcVV (GXVV) – Calculated EM
- Returns
0 - OK 1 - if error
- Return type
int
New in version 9.4.
License: Geosoft End-User License
-
classmethod
em_tau_late_time
(hVVobs, hVVtime, hVVnoise, lWindow, TauProcess, dMaxTau, dTau0, dA0, dItrTol, lItrMax, plItr, pdTau, pdA, pdMisfit, iError, hVVcalcVV)[source]¶ Automatic fitting EM Tau
- Parameters
hVVobs (GXVV) – Observed EM [READONLY]
hVVtime (GXVV) – Time [READONLY]
hVVnoise (GXVV) – Noise [READONLY]
lWindow (int) – Time window [READONLY]
TauProcess (int) – 1-TauProcess: 2-MoveWindow [READONLY]
dMaxTau (float) – Max Tau [READONLY]
dTau0 (float) – Starting Tau [READONLY]
dA0 (float) – Starting coeff. A [READONLY]
dItrTol (float) – Iterarion tolerance [READONLY]
lItrMax (int) – Maximum iteration [READONLY]
plItr (int_ref) – Number of iterations
pdTau (float_ref) – Calculated Tau
pdA (float_ref) – Calculated coeff. A
pdMisfit (float_ref) – Calculated misfit
iError (int_ref) – Error message code 0 (No error), 1 (Insufficient points above noise threshold) 2 (No convergence in 30 svdcmp iterations)
hVVcalcVV (GXVV) – Calculated EM
- Returns
0 - OK 1 - if error
- Return type
int
New in version 9.4.
License: Geosoft End-User License
-
classmethod
em_tau_manual
(hVVobs, hVVtime, hVVnoise, dMinTime, dMaxTime, dTau0, dA0, dItrTol, lItrMax, plItr, pdTau, pdA, pdMisfit, iError, hVVcalcVV)[source]¶ Automatic fitting EM Tau
- Parameters
hVVobs (GXVV) – Observed EM [READONLY]
hVVtime (GXVV) – Time [READONLY]
hVVnoise (GXVV) – Noise [READONLY]
dMinTime (float) – Minimum time [READONLY]
dMaxTime (float) – Maximum time [READONLY]
dTau0 (float) – Starting Tau [READONLY]
dA0 (float) – Starting coeff. A [READONLY]
dItrTol (float) – Iterarion tolerance [READONLY]
lItrMax (int) – Maximum iteration [READONLY]
plItr (int_ref) – Number of iterations
pdTau (float_ref) – Calculated Tau
pdA (float_ref) – Calculated coeff. A
pdMisfit (float_ref) – Calculated misfit
iError (int_ref) – Error message code 0 (No error), 1 (Insufficient points above noise threshold) 2 (No convergence in 30 svdcmp iterations)
hVVcalcVV (GXVV) – Calculated EM
- Returns
0 - OK 1 - if error
- Return type
int
New in version 9.4.
License: Geosoft End-User License
-
classmethod
em_tau_trend_window
(hVVobs, hVVtime, nWindows, hVVtau, hVVfitError)[source]¶ Automatic fitting EM Tau
- Parameters
New in version 9.5.
License: Geosoft End-User License
-
classmethod
export1
(db, format, cur_line, chan_vv, chan, data, dummies, header)[source]¶ Export to a specific format.
- Parameters
db (GXDB) – Database
format (int) – DU_EXPORT constants
cur_line (str) – Current line
chan_vv (GXVV) – List of channels - channel symbols stored as INT
chan (int) – DU_CHANNELS constants
data (str) – Data file name
dummies (int) – Write out dummies?
header (int) – Include a header with channel names?
New in version 5.0.
License: Geosoft Open License
Note: For databases with both groups and lines: If both lines and groups are selected, save only the lines. If no lines are selected, (only groups), save the current line if it is (1) a group and (2) selected, else save the first selected group. — Option to filter out data where one of the channels has a dummy in it. Option to allow a header with the channel names.
The
DU_CHANNELS_DISPLAYED
option can be used to export any selection of channels, listed by the symbols (DB_SYMB) values, cast to int values and stored in aGXVV
.
-
classmethod
export2
(db, format, cur_line, chan_vv, chan, data, dummies, header, line_names)[source]¶ Like
export1
, but include line names as data.- Parameters
db (GXDB) – Database
format (int) – DU_EXPORT constants
cur_line (str) – Current line
chan_vv (GXVV) – List of channels - channel symbols stored as INT
chan (int) – DU_CHANNELS constants
data (str) – Data file name
dummies (int) – Write out dummies?
header (int) – Include a header with channel names?
line_names (int) – Include line names as data?
New in version 5.1.6.
License: Geosoft Open License
Note: See
export1
. The line names are printed as the first column of data exported.
-
classmethod
export_amira
(db, wa, one_cols_ch, array_ch, time_ch, errors_ch, datatype, units, config, instrument, frequency)[source]¶ Export to database an AMIRA data file.
- Parameters
db (GXDB) – Database
wa (GXWA) – AMIRA data file handle
one_cols_ch (str) – Single column channel names, supporting comma (,) separated names of multiple channels, maximum 32 channels
array_ch (str) –
GXVA
channel name, requiredtime_ch (str) – Optional Time channel name (must be
GXVA
channel and same array size as aboveGXVA
channel)errors_ch (str) – Optional Errors channel name (must be
GXVA
channel and same array size as aboveGXVA
channel)datatype (str) – Mandatory fields: DATATYPE
units (str) – UNITS
config (str) – CONFIG
instrument (str) – INSTRUMENT
frequency (str) – FREQUENCY
New in version 5.0.
License: Geosoft Open License
Note: Other defined FIELDS stored in the database (see
import_amira
function) will be automatically included in the export
-
classmethod
export_aseg
(db, cur_line, chan_vv, chan, defn, data)[source]¶ Export to ASEG-GDF format file(s).
- Parameters
db (GXDB) – Database
cur_line (str) – Current line
chan_vv (GXVV) – Displayed channels
chan (int) – DU_CHANNELS constants
defn (str) – Header file name
data (str) – Data file name
New in version 5.0.
License: Geosoft Open License
Note: At least one of the header file or data file names must be set. (Unset names will get the same file name, but with the extensions .dfn (header) or .dat (data). For databases with both groups and lines: If both lines and groups are selected, save only the lines. If no lines are selected, (only groups), save the current line if it is (1) a group and (2) selected, else save the first selected group. —
-
classmethod
export_aseg_proj
(db, cur_line, chan_vv, chan, defn, data, proj, ipj)[source]¶ Export to ASEG-GDF format file(s) (supports projections).
- Parameters
db (GXDB) – Database
cur_line (str) – Current line
chan_vv (GXVV) – Displayed channels
chan (int) – DU_CHANNELS constants
defn (str) – Export header file name
data (str) – Export data file name
proj (str) – Export projection file name
ipj (GXIPJ) – Projection handle
New in version 5.0.1.
License: Geosoft Open License
Note: At least one of the header file or data file names must be set. (Unset names will get the same file name, but with the extensions .dfn (header) or .dat (data). For databases with both groups and lines: If both lines and groups are selected, save only the lines. If no lines are selected, (only groups), save the current line if it is (1) a group and (2) selected, else save the first selected group. —
This version supports projections
-
classmethod
export_chan_crc
(db, symb, crc, file)[source]¶ Export a channel as XML and compute a CRC value.
- Parameters
New in version 6.0.
License: Geosoft End-User License
Note: The output file is an XML describing the channel. The CRC is of the channel data ONLY. To compute a CRC of the full channel (include metadata) do a CRC of the generated file.
-
classmethod
export_csv
(db, cur_line, chan_vv, chan, data, dummies, header)[source]¶ Export to a CSV file.
- Parameters
db (GXDB) – Database
cur_line (str) – Current line
chan_vv (GXVV) – Displayed channels
chan (int) – DU_CHANNELS constants
data (str) – Data file name
dummies (int) – Write out dummies?
header (int) – Include a header with channel names?
New in version 5.0.
License: Geosoft End-User License
Note: For databases with both groups and lines: If both lines and groups are selected, save only the lines. If no lines are selected, (only groups), save the current line if it is (1) a group and (2) selected, else save the first selected group. — Option to filter out data where one of the channels has a dummy in it. Option to allow a header with the channel names.
-
classmethod
export_database_crc
(db, crc, file)[source]¶ Export a channel as XML and compute a CRC value.
- Parameters
New in version 6.0.
License: Geosoft End-User License
Note: The output file is an XML describing the channel. The CRC is of the channel data ONLY. To compute a CRC of the full channel (include metadata) do a CRC of the generated file.
-
classmethod
export_gbn
(db, vv, data)[source]¶ Export to a GBN data file.
- Parameters
New in version 5.0.
License: Geosoft Open License
Note: The iDispChanList_DBE or
GXDB.symb_list
methods can be used to obtain a list of channels.
-
classmethod
export_geodatabase
(db, feature_class_name, cur_line, chan_vv, chan, output, single, data)[source]¶ Export to a ESRI Geodatabase file.
- Parameters
db (GXDB) – Database
feature_class_name (str) – Feature class name
cur_line (str) – Current line
chan_vv (GXVV) – Displayed channels
chan (int) – DU_CHANNELS constants
output (int) – DU_FEATURE_TYPE_OUTPUT constants
single (int) – DU_LINEOUT constants
data (str) – Export data file name
New in version 8.0.
License: Geosoft End-User License
Note: Similar to
export_gbn
, with the addition that Groups go to individual tables, and lines go to a single table, or individual tables, based on the value of DU_LINEOUT constants
-
classmethod
export_mdb
(db, cur_line, chan_vv, chan, single, data)[source]¶ Export to a Microsoft Access Database (MDB) file.
- Parameters
db (GXDB) – Database
cur_line (str) – Current line
chan_vv (GXVV) – Displayed channels
chan (int) – DU_CHANNELS constants
single (int) – DU_LINEOUT constants
data (str) – Export data file name
New in version 5.0.
License: Geosoft Open License
Note: Similar to
export_gbn
, with the addition that Groups go to individual tables, and lines go to a single table, or individual tables, based on the value of DU_LINEOUT constants
-
classmethod
export_shp
(db, cur_line, chan_vv, chan, single, data, lst)[source]¶ Export to a shape file or files.
- Parameters
db (GXDB) – Database
cur_line (str) – Current line
chan_vv (GXVV) – Displayed channels
chan (int) – DU_CHANNELS constants
single (int) – DU_LINEOUT constants
data (str) – Export shape file name or base filename (shp assumed if no extension given)
lst (GXLST) –
GXLST
object will be filled with shape files created
New in version 6.1.
License: Geosoft Open License
Note: Similar to
export_mdb
, with the addition that groups go to indiviual files with group name suffixes, and lines go to a single file, or multiple files with line name suffixes, based on the value of DU_LINEOUT constants.
-
classmethod
export_xyz
(db, data, templ)[source]¶ Export XYZdata from a database to an XYZ file.
- Parameters
db (GXDB) – Database
data (str) – Export data file name
templ (str) – Export template name
New in version 5.0.
License: Geosoft Open License
Note: 1. The export template can be in the local directory or the GEOSOFT directory. The import data file must include the path if it is not in the local directory.
Both the import template and data file must exist.
Sample Template file
[EXPORT XYZ] EXPORT CHAN {,FORMAT} {,WIDTH} {,DECIMAL} WRITEDUMMY YES CLIPMAP YES MAXPOINTS 1000 INCREMENT .5
4. This can be used to export a group, but the group must be the currently displayed line, and only that group will be exported.
-
classmethod
export_xyz2
(db, wa, ra)[source]¶ Export XYZdata from a database to an XYZ file, using file handles.
- Parameters
New in version 5.0.
License: Geosoft Open License
See also
-
classmethod
fft
(db, line, s_ch, r_ch, i_ch)[source]¶ Apply an
GXFFT
to space data.- Parameters
db (GXDB) – Database
line (int) – Line handle
s_ch (int) – Space Channel [
DB_LOCK_READONLY
]r_ch (int) – Real Channel [
DB_LOCK_READWRITE
]i_ch (int) – Imaginary Channel [
DB_LOCK_READWRITE
]
New in version 5.0.
License: Geosoft End-User License
-
classmethod
filter
(db, line, i_ch, o_ch, flt)[source]¶ Apply a convolution filter to a channel.
- Parameters
db (GXDB) – Database
line (int) – Line handle
i_ch (int) – Input channel [
DB_LOCK_READONLY
]o_ch (int) – Output filtered channel [
DB_LOCK_READWRITE
]flt (int) – Filter handle (
GXFLT
)
New in version 5.0.
License: Geosoft End-User License
-
classmethod
footprint_coverage_dynamic
(dat, area, channel_name, segments, thinning_threshold, covered_area, total_area, result)[source]¶ Compute the footprint of a survey
- Parameters
dat (GXDAT) – Input DAT for the dataset
area (GXPLY) – The input area including exclusion regions
channel_name (str) – Channel that defines the radius
segments (int) – Number of segments to define a circle (default 30)
thinning_threshold (float) – The maxium change in circumference allowed to reduce polygon complexity
covered_area (float_ref) – Computed Covered Area
total_area (float_ref) – Computed Total Area
result (GXMPLY) – Computed coverted polygon and its exclusion regions
New in version 9.5.
License: Geosoft Extended End-User License
-
classmethod
footprint_coverage_static
(dat, area, radius, segments, thinning_threshold, covered_area, total_area, result)[source]¶ Compute the footprint of a survey
- Parameters
dat (GXDAT) – Input DAT for the dataset
area (GXPLY) – The input area including exclusion regions
radius (float) – The radius of the instrument
segments (int) – Number of segments to define a circle (default 30)
thinning_threshold (float) – The maxium change in circumference allowed to reduce polygon complexity
covered_area (float_ref) – Computed Covered Area
total_area (float_ref) – Computed Total Area
result (GXMPLY) – Computed coverted polygon and its exclusion regions
New in version 9.5.
License: Geosoft Extended End-User License
-
classmethod
gen_lev
(db, in_file, out_file, max_dz, m0)[source]¶ Generate a Level table from an Intersection Table.
- Parameters
db (GXDB) – Database
in_file (str) – Input Table file Name
out_file (str) – Output Table file Name
max_dz (float) – Max. gradient
m0 (int) – DU_LEVEL constants
New in version 5.0.
License: Geosoft End-User License
-
classmethod
gen_lev_db
(db, out_file, max_dz, m0)[source]¶ Generate a Level table from an Intersection Database
- Parameters
db (GXDB) – Input intersection database object
out_file (str) – Output Table File Name
max_dz (float) – Max. gradient
m0 (int) – DU_LEVEL constants
New in version 7.1.
License: Geosoft End-User License
Note: Requires channels with the following names:
ine, TFid, TZ, TDZ Line, LFid, LZ, LDZ Mask
-
classmethod
gen_xyz_temp
(xyz, temp)[source]¶ Generate default XYZ template for a XYZ file.
- Parameters
xyz (str) – Xyz file name
temp (str) – Template file name to create
New in version 5.0.
License: Geosoft Open License
-
classmethod
get_chan_data_lst
(db, chan, mask, lst)[source]¶ Populate a
GXLST
with unique items in a channel.- Parameters
New in version 6.1.
License: Geosoft End-User License
Note: Items from all selected lines are collected, sorted, and duplicates removed. The output
GXLST
name and value are set to the item values. Non-string channels are converted internally to string values using Copy_VV, so results may differ from what you may expect given the current channel’s display width and number of decimals. If a mask channel is selected, then only those items where the mask channel is not a dummy are collected.
-
classmethod
get_chan_data_vv
(db, chan, mask, vv)[source]¶ Populate a
GXVV
with unique items in a channel.- Parameters
New in version 6.1.
License: Geosoft End-User License
Note: Items from all selected lines are collected, sorted, and duplicates removed. The data is collected in the channel’s data type, so normal
GXVV.sort
rules apply. If the outputGXVV
and channel type are not the same, then the data is converted using the Copy_VV function, so see that for conversion rules. If a mask channel is selected, then only those items where the mask channel is not a dummy are collected.
-
classmethod
get_existing_feature_classes_in_geodatabase
(db, geodatabase, lst, vv)[source]¶ Searches the geodatabases for an existing Feature class.
- Parameters
- Returns
0 - Feature class does not exist 1 - Feature class exists
- Return type
int
New in version 8.0.
License: Geosoft End-User License
Note: Searches the geodatabases for an existing Feature class
-
classmethod
get_xyz_num_fields
(xyz, num_fields)[source]¶ Get the number of fields in the XYZ file.
- Parameters
xyz (str) – Xyz file name
num_fields (int_ref) – Returned number of fields
New in version 9.1.
License: Geosoft Open License
-
classmethod
gradient
(dbi, dbo, ix_ch, iy_ch, iz_ch, ig_ch, ox_ch, oy_ch, oz_ch, angle, width)[source]¶ This method takes 4 channels from input database and duplicats each line twice to output database) (input and Output can be the same channel).
- Parameters
dbi (GXDB) – Database InPut
dbo (GXDB) – DAtabase Output
ix_ch (int) – X Input Channel [
DB_LOCK_READONLY
]iy_ch (int) – Y Input Channel [
DB_LOCK_READONLY
]iz_ch (int) – Z Input Channel [
DB_LOCK_READONLY
]ig_ch (int) – G Input Channel [
DB_LOCK_READONLY
]ox_ch (int) – X Output Channel [
DB_LOCK_READWRITE
]oy_ch (int) – Y Output Channel [
DB_LOCK_READWRITE
]oz_ch (int) – Z Output Channel [
DB_LOCK_READWRITE
]angle (float) – Angle
width (float) – Width
New in version 5.0.
License: Geosoft End-User License
-
classmethod
grav_drift
(db, line, date, time, read, base, clos)[source]¶ Calculate base loop closure and correct for drift.
- Parameters
db (GXDB) – Database
line (int) – Line [
DB_LOCK_READONLY
]date (int) – Date [
DB_LOCK_READONLY
]time (int) – Local time (on date) [
DB_LOCK_READONLY
]read (int) – Reading [
DB_LOCK_READONLY
]base (int) – Base [
DB_LOCK_READWRITE
]clos (int) – Closure error [
DB_LOCK_READWRITE
]
New in version 5.0.
License: Geosoft End-User License
-
classmethod
grav_drift2
(db, line, date, time, read, base, clos, corr)[source]¶ Calculate base loop closure, calculate drift correction and correct for drift.
- Parameters
db (GXDB) – Database
line (int) – Line [
DB_LOCK_READONLY
]date (int) – Date [
DB_LOCK_READONLY
]time (int) – Local time (on date) [
DB_LOCK_READONLY
]read (int) – Reading [
DB_LOCK_READONLY
]base (int) – Base [
DB_LOCK_READWRITE
]clos (int) – Closure error [
DB_LOCK_READWRITE
]corr (int) – Drift correction [
DB_LOCK_READWRITE
]
New in version 9.6.
License: Geosoft End-User License
-
classmethod
grav_tide
(db, line, lat, lon, date, time, gmt, tide)[source]¶ Calculate earth tide gravity correction.
- Parameters
db (GXDB) – Database
line (int) – Line
lat (int) – Lat [
DB_LOCK_READONLY
]lon (int) – Long [
DB_LOCK_READONLY
]date (int) – Date [
DB_LOCK_READONLY
]time (int) – Local time (on date) [
DB_LOCK_READONLY
]gmt (float) – GMT difference (added to time to give GMT)
tide (int) – Calculated tide [
DB_LOCK_READWRITE
]
New in version 5.0.
License: Geosoft End-User License
-
classmethod
grid_load
(db, img, xdec, ydec, trim_dum, create_index)[source]¶ Load grid data to a database.
- Parameters
New in version 5.0.
License: Geosoft End-User License
-
classmethod
grid_load_xyz
(db, img, ch_x, ch_y, ch_z, ch_data, xdec, ydec, trim_dum, index_ch)[source]¶ Load grid data to a database using specified channels
- Parameters
db (GXDB) – Database
img (GXIMG) – Grid img
ch_x (int) – X Channel
ch_y (int) – Y Channel
ch_z (int) – Z Channel
ch_data (int) – Data Channel
xdec (int) – X decimation factor
ydec (int) – Y decimation factor
trim_dum (int) – 0 trim leading/trailing dummies (default), 1 trim all dummies, 2 leave all dummies
index_ch (int) – Flag for creating index channel: 0 no (default), 1 yes.
New in version 5.0.
License: Geosoft End-User License
-
classmethod
head
(db, line, i_ch, o_ch, tb, dir)[source]¶ Applies a heading correction.
- Parameters
db (GXDB) – Database object
line (int) – Line Symbol
i_ch (int) – Channel to correct [
DB_LOCK_READONLY
]o_ch (int) – Corrected channel [
DB_LOCK_READWRITE
]tb (GXTB) – Heading table
dir (float) – Line direction
New in version 5.0.
License: Geosoft End-User License
Note: Updates channel with Direction in degrees azimuth (counter-clockwise relative the +Y direction).
GS_R8DM
if the line has no data, or if there is a problem.
-
classmethod
imp_cb_ply
(db, pj, file, x_chan, y_chan)[source]¶ Import concession boundary polygon file into a database
- Parameters
New in version 5.0.
License: Geosoft End-User License
Note: The polygon file is provided by Ana Christina in Brazil.
-
classmethod
import_ado
(db, connect, table, templ, line)[source]¶ Import an external database table into a group using ADO.
- Parameters
db (GXDB) – Database
connect (str) – Import database connection string (overrides template value)
table (str) – Imported table in database file (overrides template value)
templ (str) – Import template name
line (str) – Oasis montaj line name to create (overrides template value)
New in version 5.0.8.
License: Geosoft Open License
Note: 1. The import template can be in the local directory or the GEOSOFT directory.
2. Only the import template must be specified. The database connection string, the database table and Oasis line name are normally taken from the template file itself, but if these values are provided, they will override those found in the template.
If the line already exists, the data will overwrite the existing data.
-
classmethod
import_all_ado
(db, connect, storage)[source]¶ Import an entire external database using ADO.
- Parameters
db (GXDB) – Database
connect (str) – Import database connection string
storage (int) – DU_STORAGE constants
New in version 5.0.8.
License: Geosoft Open License
Note: 1. For group storage, the table names are imported “as is”. For line storage, if the table names are valid Geosoft line names, they are used as is. Otherwise, line names will be created with type LINE_NORMAL, starting at L0 and incrementing by 10 (L10, L20 etc.)
If the line exists, the data will overwrite the existing data.
All tables and fields will be imported.
4. If connection string is of type “FILENAME=…” the connection will attempt to resolve it as a file database. (see also ODBCFileConnect_GUI)
-
classmethod
import_all_dao
(db, data, type, storage)[source]¶ Import an entire external database using DAO.
- Parameters
db (GXDB) – Database
data (str) – Import data file name
type (str) – Database type
storage (int) – DU_STORAGE constants
New in version 5.0.
License: Geosoft Open License
Note: 1. The file is assumed to be a DAO compliant database.
2. The import data file must include the path if it is not in the local directory.
3. For group storage, the table names are imported “as is”. For line storage, if the table names are valid Geosoft line names, they are used as is. Otherwise, line names will be created with type LINE_NORMAL, starting at L0 and incrementing by 10 (L10, L20 etc.)
If the line exists, the data will overwrite the existing data.
All tables and fields will be imported.
The following are valid type strings for DAO:
MSJET : Microsoft Access ODBC : ODBC source dBASE III dBASE IV dBASE 5 FoxPro 2.0 FoxPro 2.5 FoxPro 2.6 Paradox 3.x Paradox 4.x Paradox 5.x
-
classmethod
import_amira
(db, ra, wa)[source]¶ Import an AMIRA data file.
New in version 5.0.
License: Geosoft Open License
Note: All the constant declarations are stored within the database under TEMCONSTANTS. The format is as follows:
Lines stored in the file beginning with “/” are comments
Each constant occupies a line in the file. It uses the format: CONSTANT=VALUE
-
classmethod
import_aseg
(db, templ, file, data, flc, chans)[source]¶ Import an ASEG-GDF data file.
- Parameters
db (GXDB) – Database
templ (str) – Template file name
file (str) – Header file name
data (str) – Data file name
flc (str) – Flight Line Channel name
chans (int) – Number of channels to import at one time
New in version 5.0.
License: Geosoft Open License
-
classmethod
import_aseg_proj
(db, templ, file, data, flc, chans, proj, x_ch, y_ch)[source]¶ Import an ASEG-GDF data file (supports projections).
- Parameters
db (GXDB) – Database
templ (str) – Template file name
file (str) – Header file name
data (str) – Data file name
flc (str) – Flight Line Channel name
chans (int) – Number of channels to import at one time
proj (str) – Projection file name
x_ch (str) – Channel pair to associate projection
y_ch (str) – Channel pair to associate projection
New in version 5.0.1.
License: Geosoft Open License
Note: This version supports projections
-
classmethod
import_bin
(db, data, templ, line, flight, date)[source]¶ Import blocked binary or archive ASCII data
- Parameters
db (GXDB) – Database
data (str) – Import data file name
templ (str) – Import template name
line (str) – Optional Line name (see note 3.)
flight (int) – Optional Flight number
date (float) – Optional date
New in version 5.0.
License: Geosoft Open License
Note: 1. Binary import templates have extension .I2 by convention. See BINARY.I2 for a description of the template format. Archive import templates have extension .I3 by convention. See ARCHIVE.I3 for a description of the template format.
Both the import template and data file must exist.
3. If a line already exists in the database, a new version is created unless a line name is passed in. In this case, the specified name is used and the imported channels on the previous line will be destroyed.
See also
-
classmethod
import_bin2
(db, data, templ, line, flight, date, wa)[source]¶ Import blocked binary or archive ASCII data with data error display
- Parameters
db (GXDB) – Database
data (str) – Import data file name
templ (str) – Import template name
line (str) – Optional Line name (see note 3.)
flight (int) – Optional Flight number
date (float) – Optional date
New in version 5.1.6.
License: Geosoft Open License
Note: 1. Binary import templates have extension .I2 by convention. See BINARY.I2 for a description of the template format. Archive import templates have extension .I3 by convention. See ARCHIVE.I3 for a description of the template format.
Both the import template and data file must exist.
3. If a line already exists in the database, a new version is created unless a line name is passed in. In this case, the specified name is used and the imported channels on the previous line will be destroyed.
See also
-
classmethod
import_bin3
(db, data, templ, line, flight, date, wa)[source]¶ Same as
import_bin2
, but returns the name of the imported line.- Parameters
New in version 6.1.
License: Geosoft Open License
Note: See
import_bin2
. Because the name of the created line is not necessarily the value passed in (and the value passed in can be blank), this version returns the name of the line to which the data is actually imported.See also
-
classmethod
import_bin4
(db, mode, data, templ, line, flight, date, wa)[source]¶ Same as
import_bin2
but with an import mode- Parameters
db (GXDB) – Database
mode (int) – DU_IMPORT constants
data (str) – Import data file name
templ (str) – Import template name
line (str) – Optional Line name (see note 3.)
flight (int) – Optional Flight number
date (float) – Optional date
New in version 9.1.
License: Geosoft Open License
Note: Same as
import_bin2
but with an import modeSee also
-
classmethod
import_daarc500_serial
(db, line, file, channel, type)[source]¶ Import Serial data from the RMS Instruments DAARC500.
- Parameters
db (GXDB) – Database object
line (int) – Output line (
DB_LOCK_READWRITE
)file (str) – Name of file to import
channel (int) – Channel to import, 1-8
type (int) – GU_DAARC500_DATATYPE constants
New in version 7.2.
License: Geosoft Open License
Note: Imports data stored in a serial channel recorded by the RMS Instruments DAARC500 instrument, and outputs the data to a line in the database. The channels created depend on the input data type
-
classmethod
import_daarc500_serial_gps
(db, line, file, channel)[source]¶ Import Serial GPS data from the RMS Instruments DAARC500.
- Parameters
db (GXDB) – Database object
line (int) – Output line (
DB_LOCK_READWRITE
)file (str) – Name of file to import
channel (int) – Channel to import, 1-8
New in version 7.2.
License: Geosoft Open License
Note: Imports GPS data stored in a serial channel recorded by the RMS Instruments DAARC500 instrument, and outputs the data to a line in the database. Makes the following channels:
Fid, UTC_Time, Latitude, Longitude, Altitude, GPS_Quality, NumSat (Number of satellites), GPS_HDOP (Horizontal Dilution of Position), Undulation, GPS_DiffAge (Age of differential channel).
-
classmethod
import_dao
(db, data, type, table, templ, line)[source]¶ Import an external database table into a group using DAO.
- Parameters
db (GXDB) – Database
data (str) – Import database file name (overrides template value)
type (str) – Import data file type (overrides template value)
table (str) – Imported table in database file (overrides template value)
templ (str) – Import template name
line (str) – Oasis Montaj line name to create (overrides template value)
New in version 5.0.
License: Geosoft Open License
Note: 1. The import template can be in the local directory or the GEOSOFT directory. The import data file must include the path if it is not in the local directory.
2. Only the import template must be specified. The database file name, file type, the database table and Oasis line name are normally taken from the template file itself, but if these values are provided, they will override those found in the template.
If the line already exists, the data will overwrite the existing data.
-
classmethod
import_esri
(db, connect, templ, line)[source]¶ Import an ArcGIS Geodatabase table or feature class into a GDB group
- Parameters
db (GXDB) – Database
connect (str) – Import database connection string (e.g. “d:Personaltest.mdb|Table” or “d:Filetest.gdb|FeatureClass, overrides template value)
templ (str) – Import template name
line (str) – Oasis montaj line name to create (overrides template value)
New in version 7.1.
License: Geosoft Open License
Note: 1. The import template can be in the local directory or the GEOSOFT directory.
2. Only the import template must be specified. The Geodatabase connection string and Oasis line name are normally taken from the template file itself, but if these values are provided, they will override those found in the template.
If the line already exists, the data will overwrite the existing data.
-
classmethod
import_gbn
(db, file)[source]¶ Import GBN data file.
- Parameters
db (GXDB) – Database
file (str) – File name of the GBN file to import
New in version 5.0.
License: Geosoft Open License
-
classmethod
import_io_gas
(db, data_csv, templ)[source]¶ Import data columns from an ioGAS data file.
- Parameters
db (GXDB) – Database
data_csv (str) – Input data.csv file name
templ (str) – Input template file name
New in version 8.5.
License: Geosoft Open License
Note: 1. All columns in the speficied ioGAS data file will be imported. 2. If a line already exists, the data will overwrite the existing data.
-
classmethod
import_oddf
(db, file)[source]¶ Import ODDF data file.
- Parameters
db (GXDB) – Database
file (str) – File name of the ODDF file to import
New in version 5.0.
License: Geosoft Open License
-
classmethod
import_pico
(db, templ, data, chans)[source]¶ Import a Picodas data file.
- Parameters
db (GXDB) – Database
templ (str) – Template file name
data (str) – Data file name
chans (int) – Number of channels to import at one time
New in version 5.0.
License: Geosoft Open License
-
classmethod
import_ubc_mod_msh
(db, mesh, mods, dir, dummy)[source]¶ Import UBC Mod and Msh files.
- Parameters
db (GXDB) – Database Object
mesh (str) – Mesh file
mods (str) – 1-5 Mod files, delimited with “|”
dir (int) – Import slice direction (0-2 for X,Y and Z)
dummy (float) – Value to interpret as dummy
New in version 6.0.
License: Geosoft Open License
Note: Each slice in X,Y or Z is imported to its own line in the database beginning with L0.
-
classmethod
import_usgs_post
(db, file)[source]¶ Import USGS Post data file.
- Parameters
db (GXDB) – Database
file (str) – File name of the USGS post file to import
New in version 5.0.
License: Geosoft Open License
-
classmethod
import_xyz
(db, mode, data, templ)[source]¶ Import XYZ data into the database.
- Parameters
db (GXDB) – Database
mode (int) – DU_IMPORT constants
data (str) – Import data file name
templ (str) – Import template name
New in version 5.0.
License: Geosoft Open License
Note: 1. The import template can be in the local directory or the GEOSOFT directory. The import data file must include the path if it is not in the local directory.
Both the import template and data file must exist.
-
classmethod
import_xyz2
(db, mode, data, templ, wa)[source]¶ Import XYZ data into the database.
- Parameters
db (GXDB) – Database
mode (int) – DU_IMPORT constants
data (str) – Import data file name
templ (str) – Import template name
New in version 5.1.6.
License: Geosoft Open License
Note: 1. The import template can be in the local directory or the GEOSOFT directory. The import data file must include the path if it is not in the local directory.
Both the import template and data file must exist.
-
classmethod
index_order
(db, line, in_ch, ch)[source]¶ Change the order of a channel using an index channel.
- Parameters
db (GXDB) – Database
line (int) – Line symbol
in_ch (int) – Ordered index channel (should be int) [
DB_LOCK_READONLY
]ch (int) – Channel to reorder [
DB_LOCK_READWRITE
]
New in version 5.0.
License: Geosoft End-User License
-
classmethod
interp
(db, line, i_ch, o_ch, inside, outside)[source]¶ Replace all dummies by interpolating from valid data.
- Parameters
db (GXDB) – Database
line (int) – Line handle
i_ch (int) – Channel to interpolate [
DB_LOCK_READONLY
]o_ch (int) – Output interpolated channel [
DB_LOCK_READWRITE
]inside (int) – DU_INTERP constants
outside (int) – DU_INTERP_EDGE constants
New in version 5.0.
License: Geosoft End-User License
-
classmethod
interp_gap
(db, line, i_ch, o_ch, inside, outside, gap, extend)[source]¶ Replace all dummies by interpolating from valid data.
- Parameters
db (GXDB) – Database
line (int) – Line handle
i_ch (int) – Channel to interpolate [
DB_LOCK_READONLY
]o_ch (int) – Output interpolated channel [
DB_LOCK_READWRITE
]inside (int) – DU_INTERP constants
outside (int) – DU_INTERP_EDGE constants
gap (int) – Maximum gap to interpolate (fiducials)
extend (int) – Maximum items to extend at ends.
New in version 8.4.
License: Geosoft End-User License
-
classmethod
intersect
(db, x_chan, y_chan, z_chan, tol, file)[source]¶ Create Tie Line & Normal Line intersect table.
- Parameters
db (GXDB) – Database
x_chan (int) – X Channel [
DB_LOCK_READONLY
]y_chan (int) – Y Channel [
DB_LOCK_READONLY
]z_chan (int) – Z Channel [
DB_LOCK_READONLY
]tol (float) – Intersection tolerance
file (str) – Output Table file Name
New in version 5.0.
License: Geosoft End-User License
-
classmethod
intersect_all
(db, x_chan, y_chan, z_chan, tol, file)[source]¶ Create line intersect table from all lines.
- Parameters
db (GXDB) – Database
x_chan (int) – X Channel [
DB_LOCK_READONLY
]y_chan (int) – Y Channel [
DB_LOCK_READONLY
]z_chan (int) – Z Channel [
DB_LOCK_READONLY
]tol (float) – Intersection tolerance
file (str) – Output Table file Name
New in version 5.0.
License: Geosoft End-User License
-
classmethod
intersect_gd_bto_tbl
(db, tbl)[source]¶ Create a new intersection table from an intersection database.
- Parameters
db (str) – Input Intersection Database name
tbl (str) – Output intersection TBL
New in version 7.1.
License: Geosoft End-User License
Note: If the TBL exists, it is overwritten.
-
classmethod
intersect_old
(db, x_chan, y_chan, z_chan, in_file, out_file)[source]¶ Use existing intersection table and re-calculate miss-ties.
- Parameters
db (GXDB) – Database
x_chan (int) – X Channel [
DB_LOCK_READONLY
]y_chan (int) – Y Channel [
DB_LOCK_READONLY
]z_chan (int) – Z Channel [
DB_LOCK_READONLY
]in_file (str) – Input Table file name
out_file (str) – Output Table file Name
New in version 5.1.4.
License: Geosoft End-User License
Note: Reads intersection information from an existing intersect table and looks up the values at the intersections for the input Z channel. This makes it unnecessary to re-calculate the intersections every time if you want to determine miss-ties using different Z channels, or the same Z channel after processing levelling corrections. Existing intersections whose locations do not exist in the database are ignored.
-
classmethod
intersect_tb_lto_gdb
(tbl, db)[source]¶ Create a new intersection database from an intersection table.
- Parameters
tbl (str) – Input intersection TBL
db (str) – Output Intersection Database name
New in version 7.1.
License: Geosoft End-User License
Note: If the GDB exists, it is deleted, so it should not be loaded. The database is split by Tie lines (or whatever lines are found in column 3 of the TBL file.
-
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
-
classmethod
lab_template
(data, templ, type, delimit, name_off, unit_off, data_off, sample_type, data_type)[source]¶ Makes a default template from a lab assay file.
- Parameters
data (str) – Data file name
templ (str) – New template name
type (int) – DU_LAB_TYPE constants
delimit (str) – Delimiter string
name_off (int) – Offset to column labels line (0 for first line)
unit_off (int) – Offset to unit labels line, -1 if none
data_off (int) – Offset to first line that contains data
sample_type (int) – Sample channel element type, recommend -10 for 10-character ASCII, or
GS_LONG
for numbers.data_type (int) – Default channel element type, recommend
GS_FLOAT
New in version 5.0.
License: Geosoft Open License
Note: The template can be used to import the file using sImportBIN_DU.
The first column is assumed to be the sample number.
If the unit label line is the same as the column label line, column labels are assummed to be followed by unit labels using the format “Au-ppm”, “Au ppm” or “Au(ppm)”.
The number of channels is determined from the number of columns in the data channel. If there are more column labels or unit labels, the last labels are assumed to be correct. If there are fewer line labels, default labels “Col_n”, where n is the column number, will be created and no unit labels will be defined.
See also
-
classmethod
load_gravity
(db, reg, line, data)[source]¶ Load a gravity survey file
- Parameters
New in version 5.0.
License: Geosoft End-User License
Note: See GRAVITY.`GXDAT <geosoft.gxapi.GXDAT>` for a description of the file format.
Existing data in the line will be replaced.
The following
GXREG
parameters will be set if they appear in the data file: default OPERATOR “” DATE none INSTRUMENT “” INSTRUMENT_SCALE “1.0” BASE_GRAVITY “0.0” FORMULA “1967” GMT_DIFF “0.0” DISTANCE_UNITS “m” DENSITY_EARTH “2.67” DENSITY_WATER “1.0” DENSITY_ICE “0.95” MAP_PROJECTION “”If the corresponding constant is not specified and the
GXREG
already has the constant defined, it is not changed. If the constant is not defined and it is not already in theGXREG
, the indicated default will be set.
-
classmethod
load_gravity_cg6
(db, data)[source]¶ Load a CG-6 gravity survey file.
- Parameters
db (GXDB) – Database
data (str) – Gravity data file
New in version 9.3.1.
License: Geosoft End-User License
Note: Has its own format - space-delimited columns of data
-
classmethod
load_gravity_cg6_to_line
(db, data, line)[source]¶ Load a CG-6 gravity survey file. Specify the name of the output line
- Parameters
db (GXDB) – Database
data (str) – Gravity data file
line (str) – line name - can be empty in which case it will create a line name from the input file name
New in version 9.7.
License: Geosoft End-User License
Note: Has its own format - space-delimited columns of data
-
classmethod
load_ltb
(db, line, ltb, mode)[source]¶ Load
GXLTB
into a database line.- Parameters
db (GXDB) – Database
line (int) – Line
ltb (GXLTB) – Table
mode (int) – DU_LOADLTB constants
New in version 5.0.
License: Geosoft End-User License
Note: A new channel will be created for all
GXLTB
fields that do not already exist. TheGXLTB
field type will be double if all entries can be converted to double, otherwise it will be a string type set to the larger of 16 characters or the longest string in the field.For _APPEND, the
GXLTB
data is simply added the end of each channel.re_fid_all_ch
can be used to re-fid data to match a specifc channel and there-by case all channels to be the same length before appending data.
-
classmethod
make_fid
(db, line, i_ch, o_ch)[source]¶ Make a fiducial channel based on an existing channel.
- Parameters
db (GXDB) – Database object
line (int) – Line Symbol
i_ch (int) – Base channel [
DB_LOCK_READONLY
]o_ch (int) – New fiducial channel [
DB_LOCK_READWRITE
]
New in version 5.0.
License: Geosoft Open License
-
classmethod
mask
(db, line, i_ch, m_ch)[source]¶ Mask dummies in one channel against another.
- Parameters
db (GXDB) – Database
line (int) – Line handle
i_ch (int) – Channel to mask [
DB_LOCK_READWRITE
]m_ch (int) – Mask channel [
DB_LOCK_READONLY
]
New in version 5.0.
License: Geosoft End-User License
-
classmethod
math
(db, line, exp)[source]¶ Apply an expression to the database
- Parameters
New in version 5.0.
License: Geosoft End-User License
Note: The MATH_DU method will READWRITE lock channels on the left side of expressions and READONLY lock channels on the right side of expressions. Channels are unlocked before returning. Therefore, channels on the left side of an expression cannot be locked READONLY because the
math
attempt to lock the channel READWRITE will fail. Similarly, channels on the right side of an expression cannot be locked READWRITE becausemath
’s attempt to lock the channels READONLY will fail.If this is confusing, just make sure no channels used in the expression are locked before calling
math
.See also
-
classmethod
merge_line
(db, i_line, m_line, o_line, mode)[source]¶ Merge a line a the fiducial and copies any data past that fiducial into the new line.
- Parameters
db (GXDB) – Database
i_line (int) – Input Line1 [
DB_LOCK_READONLY
]m_line (int) – Input Line2 [
DB_LOCK_READONLY
]o_line (int) – Output Line [
DB_LOCK_READWRITE
]mode (int) – DU_MERGE constants
New in version 5.0.
License: Geosoft End-User License
-
classmethod
mod_fid_range
(db, ln, fid_start, incr, start_index, num, opt)[source]¶ Insert/Append/Delete a range of fids.
- Parameters
db (GXDB) – Database
ln (int) – Line
fid_start (float) – Base fid start
incr (float) – Base fid increment
start_index (int) – Start index (can be negative)
num (int) – Number of fids
opt (int) – DU_MODFID constants
New in version 5.0.
License: Geosoft End-User License
Note: Channels that do not have the same fid start or fid increment are not processed.
Protected channels are modified automatically.
-
classmethod
move
(db, line, i_ch, c_ch, o_ch, mode)[source]¶ Move/correct a channel to a control channel.
- Parameters
db (GXDB) – Database
line (int) – Line Handle to Apply this to
i_ch (int) – Input channel [
DB_LOCK_READONLY
]c_ch (int) – Control channel [
DB_LOCK_READONLY
]o_ch (int) – Result channel [
DB_LOCK_READWRITE
]mode (int) – DU_MOVE constants
New in version 5.0.
License: Geosoft End-User License
Note: The input channel is moved to the absolute location of the control channel.
-
classmethod
nl_filt
(db, line, i_ch, o_ch, width, tol)[source]¶ This method applies a non-linear filter to the specified line/channel and places the output in the output channel.
- Parameters
db (GXDB) – Database
line (int) – Line handle
i_ch (int) – Channel to filter [
DB_LOCK_READONLY
]o_ch (int) – Output filtered channel [
DB_LOCK_READWRITE
]width (int) – Filter Width
tol (float) – Filter Tolerance, 0 for 10% of Std. Dev.
New in version 5.0.
License: Geosoft End-User License
-
classmethod
normal
(db, ch, ignore)[source]¶ Set fid of all channels to match a specified channel.
- Parameters
db (GXDB) – Database handle
ch (int) – Base Channel for normalization. [
DB_LOCK_READONLY
]ignore (bool) – Ignore write protection on channels?
New in version 5.0.
License: Geosoft Open License
See also
-
classmethod
poly_fill
(db, line, x_chan, y_chan, r_chan, pply, dummy)[source]¶ Fill using a polygon with a value of 1.
- Parameters
db (GXDB) – Database
line (int) – Line Handle
x_chan (int) – X Channel [
DB_LOCK_READONLY
]y_chan (int) – Y Channel [
DB_LOCK_READONLY
]r_chan (int) – Channel to fill [
DB_LOCK_READWRITE
]pply (GXPLY) – Polygon Object to use
dummy (int) – DU_FILL constants
New in version 5.0.
License: Geosoft End-User License
-
classmethod
poly_mask
(db, line, x_chan, y_chan, r_chan, pply, dummy)[source]¶ Mask against a polygon.
- Parameters
db (GXDB) – Database
line (int) – Line Handle
x_chan (int) – X Channel [
DB_LOCK_READONLY
]y_chan (int) – Y Channel [
DB_LOCK_READONLY
]r_chan (int) – Channel to mask [
DB_LOCK_READWRITE
]pply (GXPLY) – Polygon Object to use
dummy (int) – DU_MASK constants
New in version 5.0.
License: Geosoft End-User License
-
classmethod
proj_points
(db, line, ix_ch, iy_ch, iz_ch, ox_ch, oy_ch, oz_ch, i_name_chan, i_datum_chan, i_method_chan, i_unit_chan, il_datum_chan, o_name_chan, o_datum_chan, o_method_chan, o_unit_chan, ol_datum_chan, error_chan, force_local_datum)[source]¶ Project X,Y(Z) channels with different projections
- Parameters
db (GXDB) – Database
line (int) – Line Handle to project
ix_ch (int) – X Input Channel [
DB_LOCK_READONLY
]iy_ch (int) – Y Input Channel [
DB_LOCK_READONLY
]iz_ch (int) – Z Input Channel [
DB_LOCK_READONLY
] (can be DB_NULL_SYMB)ox_ch (int) – X Output Channel [
DB_LOCK_READWRITE
]oy_ch (int) – Y Output Channel [
DB_LOCK_READWRITE
]oz_ch (int) – Z Output Channel [
DB_LOCK_READWRITE
] (can be DB_NULL_SYMB)i_name_chan (int) – Input Name Channel [
DB_LOCK_READONLY
]i_datum_chan (int) – Input Datum Channel [
DB_LOCK_READONLY
]i_method_chan (int) – Input Method Channel [
DB_LOCK_READONLY
]i_unit_chan (int) – Input Unit Channel [
DB_LOCK_READONLY
]il_datum_chan (int) – Input Local Datum Channel [
DB_LOCK_READONLY
]o_name_chan (int) – Output Name Channel [
DB_LOCK_READONLY
]o_datum_chan (int) – Output Datum Channel [
DB_LOCK_READONLY
]o_method_chan (int) – Output Method Channel [
DB_LOCK_READONLY
]o_unit_chan (int) – Output Unit Channel [
DB_LOCK_READONLY
]ol_datum_chan (int) – Output Local Datum Channel [
DB_LOCK_READONLY
]error_chan (int) – Error Channel [
DB_LOCK_READWRITE
]force_local_datum (int) – Force Local Datum Shifts?
New in version 6.3.
License: Geosoft End-User License
Note: Output channels can be the same as input channels
-
classmethod
project_data
(db, line, ix_ch, iy_ch, ox_ch, oy_ch, pj)[source]¶ Project X,Y channels
- Parameters
db (GXDB) – Database
line (int) – Line Handle to project
ix_ch (int) – X Input Channel [
DB_LOCK_READONLY
]iy_ch (int) – Y Input Channel [
DB_LOCK_READONLY
]ox_ch (int) – X Output Channel [
DB_LOCK_READWRITE
]oy_ch (int) – Y Output Channel [
DB_LOCK_READWRITE
]pj (GXPJ) – Projection object to Apply
New in version 5.0.
License: Geosoft End-User License
Note: Output channels can be the same as input channels
-
classmethod
project_xyz
(db, line, ix_ch, iy_ch, iz_ch, ox_ch, oy_ch, oz_ch, pj)[source]¶ Project X,Y,Z channels from one system to another.
- Parameters
db (GXDB) – Database
line (int) – Line Handle to project
ix_ch (int) – X Input Channel [
DB_LOCK_READONLY
]iy_ch (int) – Y Input Channel [
DB_LOCK_READONLY
]iz_ch (int) – Z Input Channel [
DB_LOCK_READONLY
]ox_ch (int) – X Output Channel [
DB_LOCK_READWRITE
]oy_ch (int) – Y Output Channel [
DB_LOCK_READWRITE
]oz_ch (int) – Z Output Channel [
DB_LOCK_READWRITE
]pj (GXPJ) – Projection object to Apply
New in version 5.0.
License: Geosoft End-User License
Note: Output channels can be the same as input channels
-
classmethod
qc_init_separation
(db, sep, dir)[source]¶ Creates the nearest line channels for line separation QC.
- Parameters
db (GXDB) – Database
sep (float) – Nominal Line separation
dir (float) – Nominal Line direction
New in version 5.0.
License: Geosoft End-User License
Note: This must be called before QCSeparation_DU. It uses a pager to establish the relative positions of the selected lines, then, for every point determines the closest point in another line to the left and to the right (as determined by looking in the direction of the line.) These distances are stored to two new channels in the database, “Closest_Left” and “Closest_Right”
-
classmethod
qc_survey_plan
(db, wa, pply, sl_spa, sl_azi, slx, sly, sl_sta, sl_inc, tl_spa, tl_azi, tlx, tly, tl_sta, tl_inc, type, sample_spacing, extend_outside)[source]¶ Create a database containing proposed survey plan in a
GXPLY
- Parameters
db (GXDB) – Database to save proposed survey plan
sl_spa (float) – Survey line spacing
sl_azi (float) – Survey line azimuth
slx (float) – Survey line reference X coordinate
sly (float) – Survey line reference Y coordinate
sl_sta (int) – Survey line starting number of LINES
sl_inc (int) – Line number increment for survey line
tl_spa (float) – Tie line spacing
tl_azi (float) – Tie line azimuth
tlx (float) – Tie line reference X coordinate
tly (float) – Tie line reference Y coordinate
tl_sta (int) – Tie line starting number of LINES
tl_inc (int) – Line number increment for Tie line
type (int) – QC_PLAN_TYPE constants
sample_spacing (float) – Sample spacing (spacing between points in lines)
extend_outside (float) – Spacing to extend lines outside polygon
- Return type
int
New in version 5.0.
License: Geosoft End-User License
Note: The LINE on which has the reference (X,Y) will have the starting Line number The lines on the right hand side of the reference line (while looking into azimuth of ref. line) have increasing line numbers. The lines on the left hand side have the decreasing line numbers from the starting number. Returns an error code or 0 (if successful)
-
classmethod
qc_survey_plan2
(db, wa, pply, sl_spa, sl_azi, slx, sly, sl_sta, sl_inc, tl_spa, tl_azi, tlx, tly, tl_sta, tl_inc, type, sample_spacing, extend_outside)[source]¶ Same as QCSurveyPlan_DU, but lines split by the polygon increment version numbers and keep the line number the same.
- Parameters
db (GXDB) – Database to save proposed survey plan
sl_spa (float) – Survey line spacing
sl_azi (float) – Survey line azimuth
slx (float) – Survey line reference X coordinate
sly (float) – Survey line reference Y coordinate
sl_sta (int) – Survey line starting number of LINES
sl_inc (int) – Line number increment for survey line
tl_spa (float) – Tie line spacing
tl_azi (float) – Tie line azimuth
tlx (float) – Tie line reference X coordinate
tly (float) – Tie line reference Y coordinate
tl_sta (int) – Tie line starting number of LINES
tl_inc (int) – Line number increment for Tie line
type (int) – QC_PLAN_TYPE constants
sample_spacing (float) – Sample spacing (spacing between points in lines)
extend_outside (float) – Spacing to extend lines outside polygon
- Return type
int
New in version 9.6.
License: Geosoft End-User License
Note: The LINE on which has the reference (X,Y) will have the starting Line number The lines on the right hand side of the reference line (while looking into azimuth of ref. line) have increasing line numbers. The lines on the left hand side have the decreasing line numbers from the starting number. Returns an error code or 0 (if successful)
-
classmethod
range_xy
(db, x_min, y_min, x_max, y_max)[source]¶ Find the range of X, and Y in the selected lines.
- Parameters
New in version 8.5.
License: Geosoft End-User License
Note: Returns the range in X and Y of the current X and Y channels. Returned values are dummy if no valid items are found.
-
classmethod
range_xyz
(db, x_ch, y_ch, z_ch, x_min, y_min, z_min, x_max, y_max, z_max, n_tot)[source]¶ Find the range of X, Y and Z in selected lines.
- Parameters
db (GXDB) – Database
x_ch (int) – X Channel [
DB_LOCK_READONLY
]y_ch (int) – Y Channel [
DB_LOCK_READONLY
]z_ch (int) – Z Channel [
DB_LOCK_READONLY
]x_min (float_ref) – Minimum X (returned)
y_min (float_ref) – Minimum Y (returned)
z_min (float_ref) – Minimum Z (returned)
x_max (float_ref) – Maximum X (returned)
y_max (float_ref) – Maximum Y (returned)
z_max (float_ref) – Maximum Z (returned)
n_tot (int_ref) – Number of data values (returned)
New in version 8.5.
License: Geosoft End-User License
Note: The X, Y and Z channels should be normal (not array) channels. Only locations where all values are non-dummy are included in the calculation. If no non-dummy values are found, Dummy values are returned.
-
classmethod
range_xyz_data
(db, x_ch, y_ch, z_ch, d_ch, x_min, y_min, z_min, d_min, x_max, y_max, z_max, d_max, n_tot)[source]¶ Find the range of X, Y, Z and Data values in selected lines.
- Parameters
db (GXDB) – Database
x_ch (int) – X Channel [
DB_LOCK_READONLY
]y_ch (int) – Y Channel [
DB_LOCK_READONLY
]z_ch (int) – Z Channel [
DB_LOCK_READONLY
]d_ch (int) – Data Channel [
DB_LOCK_READONLY
]x_min (float_ref) – Minimum X (returned)
y_min (float_ref) – Minimum Y (returned)
z_min (float_ref) – Minimum Z (returned)
d_min (float_ref) – Minimum Data value (returned)
x_max (float_ref) – Maximum X (returned)
y_max (float_ref) – Maximum Y (returned)
z_max (float_ref) – Maximum Z (returned)
d_max (float_ref) – Maximum Data value (returned)
n_tot (int_ref) – Number of data values (returned)
New in version 8.1.
License: Geosoft End-User License
Note: The Z and Data channels may be array channels, but both must have the same number of columns. Only values where all channels are non-dummy (or, for
GXVA
channels, where the Z or Data value are defined) are included in the calculation. If no non-dummy values are found, Dummy values are returned. This function is optimized for cases where Z and Data are array channels with many columns (e.g. 32 or more columns).
-
classmethod
re_fid
(db, line, in_ch, ref_ch, out_ch, mode, start, incr, gap)[source]¶ Re-fid a channel based on a reference channel
- Parameters
db (GXDB) – Database Object
line (int) – Line Symbol
in_ch (int) – Original Channel [
DB_LOCK_READONLY
] “Y” valuesref_ch (int) – Reference Channel [
DB_LOCK_READONLY
] “X” locationsout_ch (int) – Output Channel [
DB_LOCK_READWRITE
]mode (int) – DU_REFID constants
start (float) – Start Fid, if
GS_R8DM
, use ref channel minimumincr (float) – Fid increment, if
GS_R8DM
use nominal spacing of the reference channel.gap (float) – Maximum gap to interpolate across
New in version 5.0.
License: Geosoft Open License
Note: The original channel can be an array channel, in which case the columns (up to the number of columns available in the output) are individually interpolated. If the number of columns in the output channel is more than the input channel, the remaining columns are dummied.
This function is fundamentally different in behaviour from
re_fid_ch
. The values in the Reference channel inre_fid
are the “X” locations corresponding to the “Y” locations in the “Original Channel”. Output Channel values are calculated at the new “X” locations specified by the Start Fid and the Fid Increment.
-
classmethod
re_fid_all_ch
(db, line, ref_ch)[source]¶ Simple re-fid of all channels based on a reference channel
- Parameters
db (GXDB) – Database Object
line (int) – Line Symbol
ref_ch (int) – Reference Channel [
DB_LOCK_READONLY
]
New in version 5.0.
License: Geosoft Open License
Note: Channels can be array channels, in which case the columns are individually re-fidded.
See also
-
classmethod
re_fid_ch
(db, line, ref_ch, ch)[source]¶ Simple re-fid of a channel based on a reference channel
- Parameters
db (GXDB) – Database Object
line (int) – Line Symbol
ref_ch (int) – Reference Channel [
DB_LOCK_READONLY
]ch (int) – Channel to refid [
DB_LOCK_READWRITE
]
New in version 5.0.
License: Geosoft Open License
Note: The original channel can be an array channel, in which case the columns are individually re-fidded.
re_fid_ch
resamples the “Channel to refid” to the “Reference Channel” Fid range and increment.
-
classmethod
rotate
(db, line, in_x_ch, in_y_ch, out_x_ch, out_y_ch, x0, y0, deg)[source]¶ Rotate coordinates.
- Parameters
db (GXDB) – Database
line (int) – Line symbol
in_x_ch (int) – Input X channel [
DB_LOCK_READONLY
]in_y_ch (int) – Input Y channel [
DB_LOCK_READONLY
]out_x_ch (int) – Output X channel [
DB_LOCK_READWRITE
]out_y_ch (int) – Output Y channel [
DB_LOCK_READWRITE
]x0 (float) – X point about which to rotate
y0 (float) – Y of point about which to rotate
deg (float) – Angle in degrees CCW
New in version 5.0.
License: Geosoft End-User License
-
classmethod
sample_gd
(db, line, ix_ch, iy_ch, o_ch, img)[source]¶ Sample a
GXGD
at a specified X and Y.- Parameters
db (GXDB) – Database
line (int) – Line Handle to sample
ix_ch (int) – X Input Channel [
DB_LOCK_READONLY
]iy_ch (int) – Y Input Channel [
DB_LOCK_READONLY
]o_ch (int) – Z Output Channel sampled from
GXGD
[DB_LOCK_READWRITE
]img (GXGD) – Grid handle
New in version 5.0.
License: Geosoft End-User License
Note: Values in result channel
-
classmethod
sample_img
(db, line, ix_ch, iy_ch, o_ch, img)[source]¶ Sample a
GXIMG
at a specified X and Y.- Parameters
db (GXDB) – Database
line (int) – Line Handle to sample
ix_ch (int) – X Input Channel [
DB_LOCK_READONLY
]iy_ch (int) – Y Input Channel [
DB_LOCK_READONLY
]o_ch (int) – Z Output Channel sampled from
GXIMG
[DB_LOCK_READWRITE
]
New in version 5.0.
License: Geosoft End-User License
Note: Values in result channel
-
classmethod
sample_img_line_lst
(db, lst, ix_ch, iy_ch, o_ch, img)[source]¶ Sample an
GXIMG
at a specified X and Y, for aGXLST
of lines.- Parameters
db (GXDB) – Database
lst (GXLST) –
GXLST
of (Line Name, Line Handle) values to sampleix_ch (int) – X Input Channel [
DB_LOCK_READONLY
]iy_ch (int) – Y Input Channel [
DB_LOCK_READONLY
]o_ch (int) – Z Output Channel sampled from
GXIMG
[DB_LOCK_READWRITE
]
New in version 8.3.
License: Geosoft End-User License
Note: Values in result channel
-
classmethod
scan_ado
(connect, table, templ)[source]¶ Scans an external ADO database and generates a default template.
- Parameters
connect (str) – Database connection string
table (str) – Database Table Name
templ (str) – Template file name to Create
New in version 5.0.8.
License: Geosoft End-User License
Note: All the channels are listed
-
classmethod
scan_aseg
(file, data, flc, templ)[source]¶ This method scans an ASEG-GDF file and generates a default template listing all the channels and all the ALIAS lines.
- Parameters
file (str) – Header file name
data (str) – Data file name
flc (str) – Flight Line Channel name
templ (str) – Template file name to Create
New in version 5.0.
License: Geosoft Open License
-
classmethod
scan_dao
(file, type, table, templ)[source]¶ Scans an external DAO database and generates a default template.
- Parameters
file (str) – Database file name
type (str) – Database Type
table (str) – Database Table Name
templ (str) – Template file name to Create
New in version 5.0.
License: Geosoft Open License
Note: All the channels are listed
-
classmethod
scan_pico
(data, templ)[source]¶ This method scans a picodas file and generates a default template listing all the channels and all the ALIAS lines.
- Parameters
data (str) – Data file Name
templ (str) – Template file name to Create
New in version 5.0.
License: Geosoft End-User License
-
classmethod
sort
(db, line, ch, sort)[source]¶ Sort the contents of a channel.
- Parameters
db (GXDB) – Database
line (int) – Line symbol
ch (int) – Channel to sort [
DB_LOCK_READONLY
]sort (int) – DU_SORT constants
New in version 5.0.
License: Geosoft End-User License
-
classmethod
sort_index
(db, line, ch, in_ch, sort)[source]¶ Create an ordered index of the contents of a channel. The order of rows where compared items are the same is preserved.
- Parameters
db (GXDB) – Database
line (int) – Line symbol
ch (int) – Channel to sort [
DB_LOCK_READONLY
]in_ch (int) – Output index channel (should be int) [
DB_LOCK_READWRITE
]sort (int) – DU_SORT constants
New in version 5.0.
License: Geosoft End-User License
-
classmethod
sort_index2
(db, line, ch1, sort1, ch2, sort2, in_ch)[source]¶ Create an ordered index from two channels. The order of rows where compared items are the same is preserved.
- Parameters
db (GXDB) – Database
line (int) – Line symbol
ch1 (int) – Sort by this channel [
DB_LOCK_READONLY
]sort1 (int) – DU_SORT constants
ch2 (int) – Then by this channel [
DB_LOCK_READONLY
]sort2 (int) – DU_SORT constants
in_ch (int) – Output index channel (should be int) [
DB_LOCK_READWRITE
]
New in version 5.0.
License: Geosoft End-User License
-
classmethod
sort_index_n
(db, line, chVV, orderVV, in_ch)[source]¶ Create an ordered index from any number of channels. The order of rows where compared items are the same is preserved.
- Parameters
db (GXDB) – Database
line (int) – Line symbol
chVV (GXVV) – VV of channel symbols (INT). Sort by these channels [
DB_LOCK_READONLY
]orderVV (GXVV) – VV of sort order values (INT, one for each channel) DU_SORT constants
in_ch (int) – Output index channel (should be int) [
DB_LOCK_READWRITE
]
New in version 9.10.
License: Geosoft End-User License
-
classmethod
split_line
(db, i_line, o_line, fid)[source]¶ Splits a line a the fiducial and copies any data past that fiducial into the new line.
- Parameters
db (GXDB) – Database
i_line (int) – Input Line, will be reduced at fid [
DB_LOCK_READWRITE
]o_line (int) – Output Line, will take data above fid [
DB_LOCK_READWRITE
]fid (float) – Fid number of split
New in version 5.0.
License: Geosoft End-User License
-
classmethod
split_line2
(db, i_line, o_line, fid, reset_fi_ds)[source]¶ Splits a line a the fiducial and copies any data past that fiducial into the new line.
- Parameters
db (GXDB) – Database
i_line (int) – Input Line, will be reduced at fid [
DB_LOCK_READWRITE
]o_line (int) – Output Line, will take data above fid [
DB_LOCK_READWRITE
]fid (float) – Fid number of split
reset_fi_ds (int) – Reset starting fiducials to zero (0: No, 1: Yes)
New in version 8.4.
License: Geosoft End-User License
Note: The same as SplitLine, but with an option to reset each line’s starting fiducial to zero.
-
classmethod
split_line_by_direction
(db, line, x_ch, y_ch, angular_change, over_a_distance_of, minimum_line_length, break_on_separation_distance, save_discards, method, first_line, line_inc, reset_fi_ds)[source]¶ The line is split when the heading (calculated from the current X and Y channels) changes by more than a specified amount over a specified distance. Additional options to discard too-short lines
- Parameters
db (GXDB) – Database
line (int) – Line to be broken up [
DB_LOCK_READONLY
]x_ch (int) – X Channel [
DB_LOCK_READWRITE
].y_ch (int) – Y Channel [
DB_LOCK_READWRITE
].angular_change (float) – Maximum angular change allowed (degrees)…
over_a_distance_of (float) – …over a distance of
minimum_line_length (float) – Delete lines shorter than (can be
rDUMMY
)break_on_separation_distance (float) – Break on data XY separation greater than (can be
rDUMMY
)save_discards (int) – Whether to save too-short segments as special lines or to discard them
method (int) – DU_SPLITLINE constants ONLY DU_SPLITLINEXY_SEQUENTIAL and DU_SPLITLINEXY_VERSIONS
first_line (int_ref) – First line in the sequence, for
DU_SPLITLINE_SEQUENTIAL
. On return, the next line in the sequence.line_inc (int) – Increment in the line number sequence, for
DU_SPLITLINE_SEQUENTIAL
reset_fi_ds (int) – Reset starting fiducials to zero (0: No, 1: Yes)
New in version 8.5.
License: Geosoft End-User License
Note: Split a line based on changes in heading.
-
classmethod
split_line_by_direction2
(db, line, x_ch, y_ch, angular_change, over_a_distance_of, minimum_line_length, break_on_separation_distance, save_discards, method, first_line, line_inc, retain_line_type, reset_fi_ds)[source]¶ The same as SplitLineByDirection, but with the option to maintain line types when outputting sequentially numbered lines.
- Parameters
db (GXDB) – Database
line (int) – Line to be broken up [
DB_LOCK_READONLY
]x_ch (int) – X Channel [
DB_LOCK_READWRITE
].y_ch (int) – Y Channel [
DB_LOCK_READWRITE
].angular_change (float) – Maximum angular change allowed (degrees)…
over_a_distance_of (float) – …over a distance of
minimum_line_length (float) – Delete lines shorter than (can be
rDUMMY
)break_on_separation_distance (float) – Break on data XY separation greater than (can be
rDUMMY
)save_discards (int) – Whether to save too-short segments as special lines or to discard them
method (int) – DU_SPLITLINE constants ONLY DU_SPLITLINEXY_SEQUENTIAL and DU_SPLITLINEXY_VERSIONS
first_line (int_ref) – First line in the sequence, for
DU_SPLITLINE_SEQUENTIAL
. On return, the next line in the sequence.line_inc (int) – Increment in the line number sequence, for
DU_SPLITLINE_SEQUENTIAL
retain_line_type (int) – Maintain line types for
DU_SPLITLINE_SEQUENTIAL
(0: No, 1: Yes)reset_fi_ds (int) – Reset starting fiducials to zero (0: No, 1: Yes)
New in version 9.0.
License: Geosoft End-User License
Note: Split a line based on changes in heading.
-
classmethod
split_line_xy
(db, line, x_ch, y_ch, dirctn, tolrnc, down_tol, method, first_line, line_inc)[source]¶ Break up a line based on tolerance of lateral and horizontal distance, with options for the output line names.
- Parameters
db (GXDB) – Database
line (int) – Line to be broken up [
DB_LOCK_READONLY
]x_ch (int) – Channel X [
DB_LOCK_READWRITE
]y_ch (int) – Channel Y [
DB_LOCK_READWRITE
]dirctn (int) – Line direction, 0-any, 1-X, 2-Y.
tolrnc (float) – Lateral tolerance, DUMMY for the default (10% of the separation between the first two points.
down_tol (float) – Downline Tolerance, DUMMY for none
method (int) – DU_SPLITLINE constants
first_line (int_ref) – First line in the sequence, for
DU_SPLITLINE_SEQUENTIAL
. On return, the next line in the sequence.line_inc (int) – Increment in the line number sequence, for
DU_SPLITLINE_SEQUENTIAL
New in version 8.3.
License: Geosoft End-User License
Note: The original line will be deleted.
-
classmethod
split_line_xy2
(db, line, x_ch, y_ch, dirctn, tolrnc, down_tol, method, first_line, line_inc, reset_fi_ds)[source]¶ Break up a line based on tolerance of lateral and horizontal distance, with options for the output line names.
- Parameters
db (GXDB) – Database
line (int) – Line to be broken up [
DB_LOCK_READONLY
]x_ch (int) – Channel X [
DB_LOCK_READWRITE
]y_ch (int) – Channel Y [
DB_LOCK_READWRITE
]dirctn (int) – Line direction, 0-any, 1-X, 2-Y.
tolrnc (float) – Lateral tolerance, DUMMY for the default (10% of the separation between the first two points.
down_tol (float) – Downline Tolerance, DUMMY for none
method (int) – DU_SPLITLINE constants
first_line (int_ref) – First line in the sequence, for
DU_SPLITLINE_SEQUENTIAL
. On return, the next line in the sequence.line_inc (int) – Increment in the line number sequence, for
DU_SPLITLINE_SEQUENTIAL
reset_fi_ds (int) – Reset starting fiducials to zero (0: No, 1: Yes)
New in version 8.4.
License: Geosoft End-User License
Note: The same as SplitLineXY, but with an option to reset each line’s starting fiducial to zero.
-
classmethod
split_line_xy3
(db, line, x_ch, y_ch, dirctn, tolrnc, down_tol, method, first_line, line_inc, retain_line_type, reset_fi_ds)[source]¶ Break up a line based on tolerance of lateral and horizontal distance, with options for the output line names.
- Parameters
db (GXDB) – Database
line (int) – Line to be broken up [
DB_LOCK_READONLY
]x_ch (int) – Channel X [
DB_LOCK_READWRITE
]y_ch (int) – Channel Y [
DB_LOCK_READWRITE
]dirctn (int) – Line direction, 0-any, 1-X, 2-Y.
tolrnc (float) – Lateral tolerance, DUMMY for the default (10% of the separation between the first two points.
down_tol (float) – Downline Tolerance, DUMMY for none
method (int) – DU_SPLITLINE constants
first_line (int_ref) – First line in the sequence, for
DU_SPLITLINE_SEQUENTIAL
. On return, the next line in the sequence.line_inc (int) – Increment in the line number sequence, for
DU_SPLITLINE_SEQUENTIAL
retain_line_type (int) – Maintain line types for
DU_SPLITLINE_SEQUENTIAL
(0: No, 1: Yes)reset_fi_ds (int) – Reset starting fiducials to zero (0: No, 1: Yes)
New in version 9.0.
License: Geosoft End-User License
Note: The same as SplitLineXY2, but with the option to maintain line types when outputting sequentially numbered lines.
-
classmethod
stat
(db, line, i_ch, st)[source]¶ Add a data channel to a statistics object.
- Parameters
db (GXDB) – Database
line (int) – Line handle
i_ch (int) – Channel handle [
DB_LOCK_READONLY
]st (GXST) – Statistics handle
New in version 5.0.
License: Geosoft End-User License
Note: If the input channel is a
GXVA
(array) channel, then the columns set usingGXDB.set_va_windows
are used in the statistics; all columns are used by default.See also
-
classmethod
table_line_fid
(db, chan, ref, tb, field)[source]¶ Place a Line/Fid information into a Channel.
- Parameters
db (GXDB) – Database
chan (int) – Output channel [
DB_LOCK_READWRITE
]ref (int) – Reference channel [
DB_LOCK_READONLY
]tb (GXTB) – Table to Use
field (int) – Table field wanted
New in version 5.0.
License: Geosoft End-User License
-
classmethod
table_look1
(db, line, i_ch, o_ch, ref_field, l_field, mode, close, tb)[source]¶ Create a new channel using a single reference table
- Parameters
db (GXDB) – Database
line (int) – Line Handle
i_ch (int) – Lookup reference channel [
DB_LOCK_READONLY
]o_ch (int) – Output Channel Token [
DB_LOCK_READWRITE
]ref_field (str) – Reference field name in table
l_field (str) – Lookup output name in table
mode (int) – DU_LOOKUP constants
close (float) – CLOSE lookup distance. If 0.0, distance is calculated from lookup reference channel.
New in version 5.0.
License: Geosoft End-User License
Note: Fails if table does not contain requested fields. The nominal data sample spacing for the CLOSE options is calculated by finding the fiducial increment the - primary index channel for Lookup1C_DU; - secondary index channel for Lookup2C_DU, LookupIValC_DU and LookupRValC_DU
-
classmethod
table_look2
(db, line, r1_ch, r2_ch, o_ch, r1_field, r2_field, l_field, mode, close, tb)[source]¶ Create a new channel using a double reference table.
- Parameters
db (GXDB) – Database
line (int) – Line Handle
r1_ch (int) – Primary reference channel [
DB_LOCK_READONLY
]r2_ch (int) – Secondary reference channel [
DB_LOCK_READONLY
]o_ch (int) – Output channel [
DB_LOCK_READWRITE
]r1_field (str) – Primary reference field name in table
r2_field (str) – Secondary reference field name in table
l_field (str) – Lookup result field name in table
mode (int) – DU_LOOKUP constants
close (float) – CLOSE lookup distance. If 0.0, distance is calculated from secondary reference channel.
tb (GXTB) – Table Object
New in version 5.0.
License: Geosoft End-User License
Note: Fails if table does not contain requested fields. The nominal data sample spacing for the CLOSE options is calculated by finding the fiducial increment the - primary index channel for Lookup1C_DU; - secondary index channel for Lookup2C_DU, LookupIValC_DU and LookupRValC_DU
-
classmethod
table_look_i2
(db, line, val, i_ch, o_ch, r1, r2, field, mode, dist, tb)[source]¶ Create a new channel using constant integer primary reference and a secondary reference table.
- Parameters
db (GXDB) – Database
line (int) – Line Handle
val (int) – Lookup primary reference value
i_ch (int) – Lookup secondary reference channel [
DB_LOCK_READONLY
]o_ch (int) – Output Channel Token [
DB_LOCK_READWRITE
]r1 (str) – Primary reference field name in table
r2 (str) – Secondary reference field name in table
field (str) – Lookup result field name in table
mode (int) – DU_LOOKUP constants
dist (float) – CLOSE lookup distance. If 0.0, distance calculated from secondary reference channel.
tb (GXTB) – Table Object
New in version 5.0.
License: Geosoft End-User License
Note: Fails if table does not contain requested fields. The nominal data sample spacing for the CLOSE options is calculated by finding the fiducial increment the - primary index channel for Lookup1C_DU; - secondary index channel for Lookup2C_DU, LookupIValC_DU and LookupRValC_DU
-
classmethod
table_look_r2
(db, line, val, i_ch, o_ch, r1, r2, field, mode, dist, tb)[source]¶ Create a new channel using a constant real primary reference and a secondary reference table.
- Parameters
db (GXDB) – Database
line (int) – Line Handle
val (float) – Primary reference value
i_ch (int) – Secondary reference value [
DB_LOCK_READONLY
]o_ch (int) – Output Channel Token [
DB_LOCK_READWRITE
]r1 (str) – Primary reference field name in table
r2 (str) – Secondary reference field name in table
field (str) – Lookup result field name in table
mode (int) – DU_LOOKUP constants
dist (float) – CLOSE lookup distance. If 0.0, distance calculated from secondary reference channel.
tb (GXTB) – Table Object
New in version 5.0.
License: Geosoft End-User License
Note: Fails if table does not contain requested fields. The nominal data sample spacing for the CLOSE options is calculated by finding the fiducial increment the - primary index channel for Lookup1C_DU; - secondary index channel for Lookup2C_DU, LookupIValC_DU and LookupRValC_DU
-
classmethod
table_selected_lines_fid
(db, chan, ref, tb, field)[source]¶ Place a Line/Fid information into a Channel for the selected lines in the database.
- Parameters
db (GXDB) – Database
chan (int) – Output channel [
DB_LOCK_READWRITE
]ref (int) – Reference channel [
DB_LOCK_READONLY
]tb (GXTB) – Table to Use
field (int) – Table field wanted
New in version 9.1.
License: Geosoft End-User License
-
classmethod
time_constant
(db, line, resp_chan, time_chan, tau_chan, intercept_chan, fit_chan, log_opt)[source]¶ Calculate TEM time constant (Tau)
- Parameters
db (GXDB) – Database, required
line (int) – Line Handle, required
resp_chan (int) – Response channel, required [
DB_LOCK_READONLY
]time_chan (int) – Time channel, required [
DB_LOCK_READONLY
]tau_chan (int) – Output Time constant (Tau) channel, required [
DB_LOCK_READWRITE
]intercept_chan (int) – Output Intercept channel, no output if
NULLSYMB
[DB_LOCK_READWRITE
]fit_chan (int) – Output predicted response channel, no output if
NULLSYMB
[DB_LOCK_READWRITE
] Result is based on least square fit from Tau and Interceptlog_opt (int) – Log option applied to time channel: 0 - linear, 1 - log10
New in version 5.0.
License: Geosoft End-User License
Note: When DU_TIME_LOG option is used, Time channel will be converted with logarithmic before calculating time constant. Logarthmic conversion is always applied to the response channel.
-
classmethod
trend
(db, line, i_ch, o_ch, order)[source]¶ Calculates an n’th order trend of a data channel.
- Parameters
db (GXDB) – Database
line (int) – Line Handle to Apply this to
i_ch (int) – Input channel [
DB_LOCK_READONLY
]o_ch (int) – Result channel [
DB_LOCK_READWRITE
]order (int) – Trend Order, 0 to 9
New in version 5.0.
License: Geosoft End-User License
See also
-
classmethod
update_intersect_db
(db, x_chan, z_chan, int_db)[source]¶ Update the Z and DZ values in an intersection database, using the current database.
- Parameters
db (GXDB) – Flight Database Object
x_chan (int) – X Channel [
DB_LOCK_READONLY
] (for location info)z_chan (int) – Z Channel [
DB_LOCK_READONLY
]int_db (GXDB) – Intersection database to update
New in version 7.1.
License: Geosoft End-User License
Note: Updates the TZ, TDZ, LZ and LDZ channels at the intersections, using the current flight database.
-
classmethod
voxel_section
(db, line, x_ch, y_ch, vox, grid, cell_x, cell_y, interp)[source]¶ Slice a voxel to a grid under a database line.
- Parameters
db (GXDB) – Database Object
line (int) – Input Line Symbol [READWRITE]
x_ch (int) – X Channel (DB_NO_SYMB if LineDir==0)
y_ch (int) – Y Channel (DB_NO_SYMB if LineDir==0)
vox (GXVOX) – Voxel to slice
grid (str) – Output grid name
cell_x (float) – X cell size (horizontal)
cell_y (float) – Y cell size (vertical)
interp (int) – Interp: 1 - linear, 0 - nearest
New in version 6.4.
License: Geosoft End-User License
Note: Takes the first and XY locations in a line (using the current X and Y channels) and defines a section grid as a slice through a voxel file. The grid cell sizes can be left as
GS_R8DM
, in which case an attempt will be made to match the voxel cell size, based on the line azimuth, voxel rotation, etc.If the slice does NOT intersect the voxel, or if there are fewer than 2 valid locations in the line, then no grid file is created, but there is no error. (This is to simplify creating multiple grids from at once, where not all may intersect).
-
classmethod
write_wa
(db, line, lst, wa)[source]¶ Write data to an ASCII file.
- Parameters
New in version 5.0.
License: Geosoft Open License
Note: Channels to be written should be placed in a
GXLST
object.Channels are written in the order of the list. Only the channel names in the list are used.
Data is formated as in the channel definition and channels are separated by a single space character.
-
classmethod
xyz_line
(db, line, x_ch, y_ch, dirctn, tolrnc)[source]¶ Break up a line based on tolerance of lateral distance.
- Parameters
db (GXDB) – Database
line (int) – Line to be broken up
x_ch (int) – Channel X
y_ch (int) – Channel Y
dirctn (int) – Line direction, 0-any, 1-X, 2-Y.
tolrnc (float) – Tolerance, DUMMY for the default (10% of the separation between the first two points.
New in version 5.0.
License: Geosoft End-User License
Note: The original line will be deleted.
-
classmethod
xyz_line2
(db, line, x_ch, y_ch, dirctn, tolrnc, down_tol)[source]¶ Break up a line based on tolerance of lateral and horizontal distance.
- Parameters
db (GXDB) – Database
line (int) – Line to be broken up [
DB_LOCK_READONLY
]x_ch (int) – Channel X [
DB_LOCK_READWRITE
]y_ch (int) – Channel Y [
DB_LOCK_READWRITE
]dirctn (int) – Line direction, 0-any, 1-X, 2-Y.
tolrnc (float) – Tolerance, DUMMY for the default (10% of the separation between the first two points.
down_tol (float) – Downline Tolerance, DUMMY for none
New in version 5.0.
License: Geosoft End-User License
Note: The original line will be deleted.
-
classmethod
xyz_line3
(db, line, x_ch, y_ch, dirctn, tolrnc, down_tol, reset_fi_ds)[source]¶ Break up a line based on tolerance of lateral and horizontal distance.
- Parameters
db (GXDB) – Database
line (int) – Line to be broken up [
DB_LOCK_READONLY
]x_ch (int) – Channel X [
DB_LOCK_READWRITE
]y_ch (int) – Channel Y [
DB_LOCK_READWRITE
]dirctn (int) – Line direction, 0-any, 1-X, 2-Y.
tolrnc (float) – Tolerance, DUMMY for the default (10% of the separation between the first two points.
down_tol (float) – Downline Tolerance, DUMMY for none
reset_fi_ds (int) – Reset starting fiducials to zero (0: No, 1: Yes)
New in version 8.4.
License: Geosoft End-User License
Note: The same as XyzLine2, but with an option to reset each line’s starting fiducial to zero.
-
classmethod
z_mask
(db, line, chan, z_chan, zmin, zmax)[source]¶ Mask dummies in one channel against another(Z) with the range Zmin/Zmax.
- Parameters
db (GXDB) – Database
line (int) – Line Handle
chan (int) – Channel to mask [
DB_LOCK_READWRITE
]z_chan (int) – Mask Channel [
DB_LOCK_READONLY
]zmin (float) – Min value of mask range
zmax (float) – Max value of mask range
New in version 5.0.
License: Geosoft End-User License
-
classmethod
DB_DUP constants¶
Duplicate Types
DB_DUPEDIT constants¶
Duplicate Edit Flags
DU_CHANNELS constants¶
Channels to Display
DU_EXPORT constants¶
Export Type
DU_FILL constants¶
Filling Options
DU_IMPORT constants¶
Import Mode
DU_INTERP constants¶
Inside Interpolation Method
DU_INTERP_EDGE constants¶
Edge Interpolation Method
DU_LAB_TYPE constants¶
File Types
DU_LEVEL constants¶
Leveling Options
DU_LINEOUT constants¶
Lineout Options (du.h)
DU_FEATURE_TYPE_OUTPUT constants¶
Export to geodatabase feature type (du.h)
DU_GEODATABASE_EXPORT_TYPE constants¶
Export to geodatabase overwrite mode(du.h)
-
DU_GEODATABASE_EXPORT_TYPE_OVERWRITE_GEODATABASE
¶ Overwrite geodatabase
-
gxapi.
DU_GEODATABASE_EXPORT_TYPE_OVERWRITE_GEODATABASE
= 0¶
-
DU_LINES constants¶
Lines to display
DU_LOADLTB constants¶
Load table options
DU_LOOKUP constants¶
Lookup Mode
-
DU_LOOKUP_EXACT
¶ Requires an exact match in all indexes. Results will dummy if Indexes are not found.
-
gxapi.
DU_LOOKUP_EXACT
= 0¶
-
-
DU_LOOKUP_NEAREST
¶ Requires that the first index match exactly. The nearest second index will be used for the finding the lookup value. The results will be dummy only if the first index does not have a match.
-
gxapi.
DU_LOOKUP_NEAREST
= 1¶
-
-
DU_LOOKUP_INTERPOLATE
¶ The same as _NEAREST, except that the value will be interpolated between the two nearest framing values in the table.
-
gxapi.
DU_LOOKUP_INTERPOLATE
= 2¶
-
-
DU_LOOKUP_NEARESTCLOSE
¶ Same as _NEAREST mode except that the target value must be within the CLOSE distance to a table value. a) the primary index channel for single index lookups; b) the secondary index channel for double index lookups. Values not in data spacing are dummy.
-
gxapi.
DU_LOOKUP_NEARESTCLOSE
= 3¶
-
-
DU_LOOKUP_INTERPCLOSE
¶ Same as _INTERPOLATE mode except that the target value must be within the CLOSE distance to a table value. a) the primary index channel for single index lookups; b) the secondary index channel for double index lookups. Values not in data spacing are dummy.
-
gxapi.
DU_LOOKUP_INTERPCLOSE
= 4¶
-
-
DU_LOOKUP_INTERPOLATE_DUMMYOUTSIDE
¶ Interpolate between values, dummy beyond two ends
-
gxapi.
DU_LOOKUP_INTERPOLATE_DUMMYOUTSIDE
= 5¶
-
-
DU_LOOKUP_INTERPOLATE_CONSTOUTSIDE
¶ Interpolate between values, constant end values beyond two ends
-
gxapi.
DU_LOOKUP_INTERPOLATE_CONSTOUTSIDE
= 6¶
-
DU_MASK constants¶
Masking Options
DU_MODFID constants¶
Fid Update Options
DU_MOVE constants¶
Move Style
DU_REFID constants¶
Interpolation mode
DU_SORT constants¶
Sort Direction
DU_SPLITLINE constants¶
Sort Direction
DU_STORAGE constants¶
Storage Type
QC_PLAN_TYPE constants¶
Type Plan