GXIP class¶
- class GXIP(handle=0)[source]¶
GXIP class.
This class is used in the
GXIP
System for the import, export and processing of Induced Polarization data.Note:
The following defines are used in GX code but are not part of any functions:
IP_ARRAY constants IP_CHANNELS constants IP_LINES constants
- a_spacing(db, line)[source]¶
Return the A-Spacing for the input line. If necessary, first imports the specified line into the
GXIP
object.- Parameters:
db (GXDB) – Database
line (str) – Line name
- Returns:
The A-Spacing value. If there are multiple A-Spacings, the base or smallest value. This value could be
rDUMMY
for some arrays (such as 3D) where no A-Spacing is explicitly defined.- Return type:
float
New in version 8.1.
License: Geosoft Extended End-User License
- average_duplicates_qc(db, chan, qc_chan, out)[source]¶
Average duplicate samples in a database.
- Parameters:
db (GXDB) – Database to export from
chan (str) – Mask or reference channel (required)
qc_chan (str) – QC channel (can be left blank)
out (int) – IP_DUPLICATE constants
New in version 7.3.
License: Geosoft Extended End-User License
Note: Averages all values with shared station and N values, as long as the mask channel is defined at that FID. Previous averaged values (IP_DATA_AVG) are overwritten according to the overwrite flag. If the QC channel is selected, only those rows of data where the QC channel value is “1” will be included in the average.
- classmethod convert_ubcip_2d_to_grid(file, pg, vv_x, vv_z, x, z, cx, cz, reciprocal)[source]¶
Convert a UBC 2D model to a regular grid.
- Parameters:
file (str) – Output grid file name
pg (GXPG) – Model data
vv_x (GXVV) – Model cells sizes (input)
vv_z (GXVV) – Model cells sizes (input)
x (float) – Top-left corner X
z (float) – Top-left corner Z
cx (float) – Output grid cell size in X
cz (float) – Output grid cell size in Z
reciprocal (int) – Output reciprocal of values (0:No, 1:Yes) for resistivity?
New in version 7.1.
License: Geosoft Extended End-User License
Note: Uses
GXTIN
gridding to sample the model. By setting the final value, a resistivity grid can be created from conductivity data.
- classmethod create()[source]¶
Create
GXIP
.New in version 5.0.
License: Geosoft Extended End-User License
- create_default_job(ini, type)[source]¶
Create a default job from scratch.
- Parameters:
ini (str) – File name of the INI file to create (forces correct suffix)
type (int) – IP_PLOT constants
New in version 6.1.
License: Geosoft Extended End-User License
- export_data_to_ubc_3d(db, line_lst, locations_only, include_z, chan, error_chan, mask_chan, ip_type, comments, obs)[source]¶
Export of
GXIP
data to UBC 3DGXIP
format.- Parameters:
line_lst (GXLST) – Lines to export (Name, Symbol)
locations_only (int) – Locations only (0: No, 1: Yes)?
include_z (int) – Include Z values (0: No, 1: Yes)?
chan (str) –
GXIP
channel name (can be “” if exporting locations only)error_chan (str) – Error channel name (can be “” if exporting locations only)
mask_chan (str) – Mask channel name (can be “”)
ip_type (int) – IPTYPE (1: Vp, 2: Chargeability)
comments (str) – Comments (can be “”)
obs (str) – Output OBS file name
New in version 9.2.
License: Geosoft Extended End-User License
Note: Outputs a
*.DAT
file of the survey data for use in the UBCGXIP
3D inversion programs.
- export_i2_x(db, file, line, res_data, ip_data, res_model, ip_model, res_synth, ip_synth, res_poly, ip_poly)[source]¶
Export line(s) to an Interpex RESIX I2X format file.
- Parameters:
db (GXDB) – Database to export from
file (str) – Name of the file
line (str) – Name of the line
res_data (str) – Resistivity (data) channel
ip_data (str) –
GXIP
(data) channel (can be “”)res_model (str) – Image model resistivity channel (can be “”)
ip_model (str) – Image model
GXIP
channel (can be “”)res_synth (str) – Image model synthetic resistivity channel (can be “”)
ip_synth (str) – Image model synthetic
GXIP
channel (can be “”)res_poly (str) – Resistivity (polygon) channel (can be “”)
ip_poly (str) –
GXIP
(polygon) channel (can be “”)
New in version 5.0.
License: Geosoft Extended End-User License
Note: Exports a line to an “.I2X” file.
- export_ipdata(db, chan, title)[source]¶
Exports data in the Geosoft IPDATA format.
- Parameters:
db (GXDB) – Database to export from
chan (str) – Channel to export
title (str) – Title for IPDATA files
New in version 5.0.
License: Geosoft Extended End-User License
- export_ipdata_dir(db, chan, title, dir)[source]¶
Exports data in the Geosoft IPDATA format in the specified directory
- Parameters:
db (GXDB) – Database to export from
chan (str) – Channel to export
title (str) – Title for IPDATA files
dir (str) – Directory for IPDATA files
New in version 6.4.
License: Geosoft Extended End-User License
- export_ipred(db, title, chan, suffix, filter, wts, stn1, stn2, max_n)[source]¶
Exports pseudo-section in the Geosoft IPRED format.
- Parameters:
db (GXDB) – Database to export from
title (str) – Title for first line of file
chan (str) – Channel to process
suffix (str) – File suffix (type)
filter (int) – IP_FILTER constants
wts (str) – The Fraser Filter weights
stn1 (float) – First Station position (
rDUMMY
for default)stn2 (float) – Last Station position (
rDUMMY
for default)max_n (int) – Maximum n spacing
New in version 5.0.
License: Geosoft Extended End-User License
Note: The Fraser Filter weights apply to each N expansion above, and are listed as w1,w2,w3,… Unspecified values beyond the list’s end are set to 1.0.
- export_ipred_dir(db, title, chan, suffix, filter, wts, stn1, stn2, max_n, dir)[source]¶
Exports pseudo-section in the Geosoft IPRED format in the specified directory
- Parameters:
db (GXDB) – Database to export from
title (str) – Title for first line of file
chan (str) – Channel to process
suffix (str) – File suffix (type)
filter (int) – IP_FILTER constants
wts (str) – The Fraser Filter weights
stn1 (float) – First Station position (
rDUMMY
for default)stn2 (float) – Last Station position (
rDUMMY
for default)max_n (int) – Maximum n spacing
dir (str) – Directory to export to
New in version 6.4.
License: Geosoft Extended End-User License
Note: The Fraser Filter weights apply to each N expansion above, and are listed as w1,w2,w3,… Unspecified values beyond the list’s end are set to 1.0.
- export_line_ipdata(db, line, chan, title)[source]¶
Exports one line of data in the Geosoft IPDATA format.
- Parameters:
db (GXDB) – Database to export from
line (str) – Line to export
chan (str) – Channel to export
title (str) – Title for IPDATA files
New in version 5.1.8.
License: Geosoft Extended End-User License
- export_sgdf(db, file, chan, chan2)[source]¶
Exports data to a Scintrex Geophysical Data Format file.
- Parameters:
db (GXDB) – Database to export from
file (str) – SGDF file to create
chan (str) – Time Domain channel or Frequency Amplitude Channel
chan2 (str) – Frequency Domain Phase channel (optional)
New in version 5.0.
License: Geosoft Extended End-User License
- export_ubc_res3(db, line, voltage_chan, current_chan, error_chan, obs, topo, version)[source]¶
Export of
GXIP
Resistivity data to UBC format.- Parameters:
line (str) – Output line name
voltage_chan (str) – Output voltage channel name
current_chan (str) – Output current channel name
error_chan (str) – Output error channel name (”” for none)
obs (str) – Output OBS file name
topo (str) – Output TOPO file name
version (float) – Version number (3 or 5)
New in version 8.1.
License: Geosoft Extended End-User License
Note: Outputs a
*.DAT
file of the survey data for use in the UBC 2D inversion program DCINV2D. Voltage and current channels should be in units such that V/I gives volts/amp (or mV/mA).
- classmethod export_ubc_res_control(control, n_iter, i_rest, chi_factor, obs, mesh, topo, initial, ref_cond, alphas, wts)[source]¶
Export a control file for using in the UBC DCINV2D program.
- Parameters:
control (str) – Output control file name
n_iter (int) – niter
i_rest (int) – irest
chi_factor (float) – chifact
obs (str) – RES obs file
mesh (str) – Mesh file
topo (str) – Topography file (required)
initial (str) – Initial model file (can be “” or “NULL”)
ref_cond (float) – Reference model conductivity
alphas (str) – Alphas
wts (str) – Weights file
New in version 6.4.
License: Geosoft Extended End-User License
Note: UBC Version 3. Outputs a control file for use in the UBC 2D resistivity inversion program DCINV2D.
- classmethod export_ubc_res_control_v5(control, n_iter, chi_factor, obs, topo, mesh_selection, mesh, initial_selection, initial, reference_selection, ref_cond, alphas_selection, alphas, wts)[source]¶
Export a control file for using in the UBC DCINV2D program.
- Parameters:
control (str) – Output control file name
n_iter (int) – niter
chi_factor (float) – chifact
obs (str) – RES obs file
topo (str) – Topography file (required)
mesh_selection (int) – Mesh type IP_UBC_CONTROL constants FILE, VALUE or DEFAULT
mesh (str) – Mesh file (can be “”) or value
initial_selection (int) – Initial model type IP_UBC_CONTROL constants FILE, VALUE or DEFAULT
initial (str) – Initial model file (can be “”) or value
reference_selection (int) – Reference model type IP_UBC_CONTROL constants FILE, VALUE or DEFAULT
ref_cond (str) – Reference model file (can be “”) or value(
alphas_selection (int) – Alphas type IP_UBC_CONTROL constants FILE, VALUE, LENGTH or DEFAULT
alphas (str) – Alphas file (can be “”), value or length
wts (str) – Weights file
New in version 8.1.
License: Geosoft Extended End-User License
Note: UBC Version 5. Outputs a control file for use in the UBC 2D resistivity inversion program DCINV2D.
- export_ubcip3(db, line, chan, error_chan, obs, topo, version)[source]¶
Export of
GXIP
data to UBC format.- Parameters:
New in version 8.1.
License: Geosoft Extended End-User License
Note: Outputs a
*.DAT
file of the survey data for use in the UBC 2D inversion program IPINV2D. Include error channel output and version-specific formatting.
- classmethod export_ubcip_control(control, n_iter, i_rest, chi_factor, obs, cond, mesh, topo, initial, ref_mod, alphas, wts)[source]¶
Export a control file for using in the UBC IPINV2D program.
- Parameters:
control (str) – Output control file name
n_iter (int) – niter
i_rest (int) – irest
chi_factor (float) – chifact
obs (str) –
GXIP
obs filecond (str) – Conductivity file
mesh (str) – Mesh file
topo (str) – Topography file
initial (str) – Initial model file
ref_mod (str) – Reference model
alphas (str) – Alphas
wts (str) – Weights file
New in version 6.4.
License: Geosoft Extended End-User License
Note: UBC Version 3 Control file. Outputs a control file for use in the UBC 2D
GXIP
inversion program IPINV2D.
- classmethod export_ubcip_control_v5(control, n_iter, chi_factor, obs, topo, cond_selection, cond, mesh_selection, mesh, initial_selection, initial, reference_selection, ref_cond, alphas_selection, alphas, wts)[source]¶
Export a control file for using in the UBC IPINV2D program.
- Parameters:
control (str) – Output control file name
n_iter (int) – niter
chi_factor (float) – chifact
obs (str) – RES obs file
topo (str) – Topography file (required)
cond_selection (int) – Conductivity type IP_UBC_CONTROL constants FILE or VALUE
cond (str) – Conductivity file (can be “”) or value
mesh_selection (int) – Mesh type IP_UBC_CONTROL constants FILE, VALUE or DEFAULT
mesh (str) – Mesh file (can be “”) or value
initial_selection (int) – Initial model type IP_UBC_CONTROL constants FILE, VALUE or DEFAULT
initial (str) – Initial model file (can be “”) or value
reference_selection (int) – Reference model type IP_UBC_CONTROL constants FILE, VALUE or DEFAULT
ref_cond (str) – Reference model file (can be “”) or value(
alphas_selection (int) – Alphas type IP_UBC_CONTROL constants FILE, VALUE, LENGTH or DEFAULT
alphas (str) – Alphas file (can be “”), value or length
wts (str) – Weights file
New in version 8.1.
License: Geosoft Extended End-User License
Note: UBC Version 5 Control file.
- get_chan_domain(db, chan)[source]¶
Is this channel registered as a Time or Frequency domain channel?
- Parameters:
db (GXDB) – Database
chan (str) – Channel to check
- Returns:
- Return type:
int
New in version 5.1.8.
License: Geosoft Extended End-User License
- classmethod get_chan_label(chan, label, units)[source]¶
Get the default label and units for a given channel.
- Parameters:
New in version 5.0.
License: Geosoft Extended End-User License
- get_channel_info(db, chan, domain, delay, n_windows, vv)[source]¶
Time Windows or Frequency info from a channel.
- Parameters:
New in version 8.1.
License: Geosoft Extended End-User License
- get_electrode_locations_and_mask_values(db, line, tx_rx, v_vx, v_vy, v_vm1, v_vm2)[source]¶
Get unique electrodes, along with current mask info.
- Parameters:
New in version 9.0.
License: Geosoft Extended End-User License
Note: The mask values are determined from the first row where a given electrode is found. Values returned for all currently selected lines.
- get_electrode_locations_and_mask_values2(db, line, tx_rx, v_vx, v_vy, v_vm1, v_vm2, v_vlines)[source]¶
Get unique electrodes, along with current mask info.
- Parameters:
New in version 9.2.
License: Geosoft Extended End-User License
Note: The mask values are determined from the first row where a given electrode is found. Values returned for all currently selected lines.
- get_grids_vv()[source]¶
Get a VV populated with grids created making pseudosections by this IP object
New in version 9.7.
License: Geosoft Extended End-User License
Note: You can use this list (for instance) to add the created grids to the project list.
- get_line_data(db, line, vv_R1X, vv_R1Y, vv_R2X, vv_R2Y, vv_T1X, vv_T1Y, vv_T2X, vv_T2Y, vv_QC_IP, vv_QC_Res, data, vv_data)[source]¶
Get electrodes, data and mask values for a single line.
- Parameters:
line (str) – Line name (”” for all selected lines)
vv_R1X (GXVV) – RX1 x locations (returned)
vv_R1Y (GXVV) – RX1 y locations (returned)
vv_R2X (GXVV) – RX2 x locations (returned)
vv_R2Y (GXVV) – RX2 y locations (returned)
vv_T1X (GXVV) – TX1 x locations (returned)
vv_T1Y (GXVV) – TX1 y locations (returned)
vv_T2X (GXVV) – TX2 x locations (returned)
vv_T2Y (GXVV) – TX2 y locations (returned)
vv_QC_IP (GXVV) –
GXIP
QC channel values (“QC” or “QC_IP”) (returned)vv_QC_Res (GXVV) – Resistivity QC channel values (“QC_RES”) (returned)
data (str) – data channel (optional)
vv_data (GXVV) – data channel values (returned)
New in version 9.10.
License: Geosoft Extended End-User License
Note: True XY locations are returned for 2D arrays. Distant Electrode locations may be dummies.
- get_n_value_lst(db, lst)[source]¶
Fill a list with unique N values in selected lines.
New in version 6.1.
License: Geosoft Extended End-User License
- classmethod get_qc_channel(db, qc_type, chan)[source]¶
Get the QC channel handle, if it exists.
- Parameters:
qc_type (int) – QC channel type. IP_QCTYPE constants
chan (str_ref) – String to place name into
- Returns:
Channel handle,
NULLSYMB
if not found- Return type:
int
New in version 9.2.
License: Geosoft Extended End-User License
Note: For
GXIP
, looks for “QC_IP”, then “QC_OffTime”, then “QC”. For Resistivity, looks for “QC_Res”, then “QC_OnTime” (case insensitive).
- get_topo_line(db, line, x_min, x_max, x_inc, vv)[source]¶
Get topography values for a line.
- Parameters:
db (GXDB) – Database to import data to
line (str) – Line name
x_min (float) – Starting “X” (station) value (
rDUMMY
for default)x_max (float) – Ending “X” (station) value (
rDUMMY
for default)x_inc (float) – “X” increment along the line (
rDUMMY
for default = half “A” separation)vv (GXVV) – Returned topography values
New in version 6.4.2.
License: Geosoft Extended End-User License
Note: If topography info is available, returns values calculated for the input line. If no topography is available, returned values will be dummies. Values between actual data are interpolated using the Akima spline. Ends are extrapolated using the end data points.
- import_dump(ip_sys, db, dump_file)[source]¶
Imports data from an
GXIP
instrument dump file.- Parameters:
ip_sys (int) – IP_SYS constants
dump_file (str) – Dump file name
New in version 5.0.
License: Geosoft Extended End-User License
- import_grid(db, grid, chan)[source]¶
Imports data from a grid
- Parameters:
db (GXDB) – Database to import data to
grid (str) – The name of the grid file, with decorations
chan (str) – The name of the channel to import to
New in version 5.0.
License: Geosoft Extended End-User License
Note: Data is imported to the specified channel. The values are interpolated at each row’s X and Y positions.
- import_i2_x(db, file, line, res_data, ip_data, res_model, ip_model, res_synth, ip_synth, res_poly, ip_poly, mode)[source]¶
Imports an Interpex RESIX I2X format file to a line.
- Parameters:
db (GXDB) – Database to import to
file (str) – Name of file to import
line (str) – Line to import to
res_data (str) – Resistivity (data) channel
ip_data (str) –
GXIP
(data) channel (can be “”)res_model (str) – Image model resistivity channel (can be “”)
ip_model (str) – Image model
GXIP
channel (can be “”)res_synth (str) – Image model synthetic resistivity channel (can be “”)
ip_synth (str) – Image model synthetic
GXIP
channel (can be “”)res_poly (str) – Resistivity (polygon) channel (can be “”)
ip_poly (str) –
GXIP
(polygon) channel (can be “”)mode (int) – IP_I2XIMPMODE constants
New in version 5.0.
License: Geosoft Extended End-User License
Note: Imports a single “.I2X” file to a specified line. If the line does not exist, it will be created.
- import_i2_x_ex(db, file, line, res_data, ip_data, res_model, ip_model, res_synth, ip_synth, res_poly, ip_poly, res_zonge, ip_zonge, mode)[source]¶
Same as
import_i2_x
, with Zonge data imported as well.- Parameters:
db (GXDB) – Database to import to
file (str) – Name of file to import
line (str) – Line to import to
res_data (str) – Resistivity (data) channel
ip_data (str) –
GXIP
(data) channel (can be “”)res_model (str) – Image model resistivity channel (can be “”)
ip_model (str) – Image model
GXIP
channel (can be “”)res_synth (str) – Image model synthetic resistivity channel (can be “”)
ip_synth (str) – Image model synthetic
GXIP
channel (can be “”)res_poly (str) – Resistivity (polygon) channel (can be “”)
ip_poly (str) –
GXIP
(polygon) channel (can be “”)res_zonge (str) – Zonge Resistivity channel (can be “”)
ip_zonge (str) – Zonge
GXIP
channel (can be “”)mode (int) – IP_I2XIMPMODE constants
New in version 6.1.
License: Geosoft Extended End-User License
Note: Imports a single “.I2X” file to a specified line. If the line does not exist, it will be created.
- import_instrumentation_gdd(db, file)[source]¶
Imports an Instrumentation GDD format file.
- Parameters:
db (GXDB) – Database to import to
file (str) – GDD file name
New in version 8.0.
License: Geosoft Extended End-User License
- import_ipdata(db, file, chan)[source]¶
Imports data in the Geosoft IPDATA format.
- Parameters:
db (GXDB) – Database to import to
file (str) – IPDATA file name
chan (str) – Channel to import to
New in version 5.0.
License: Geosoft Extended End-User License
- import_ipdata2(db, file, chan, chan2)[source]¶
Imports data in the Geosoft IPDATA format - up to two arrays.
- Parameters:
New in version 5.1.
License: Geosoft Extended End-User License
Note: The second channel may be specified for frequency domain data sets with two array channels; e.g. amplitude and phase, or real and imaginary parts. If the second channel is specified, and no time or frequncy information is specified in the header (using the T= or F= fields) then the import is assumed to be frequency domain.
- import_ipred(db, file, chan)[source]¶
Imports data from the Geosoft IPRED format.
- Parameters:
db (GXDB) – Database to import to
file (str) – File to import from
chan (str) – Channel to import
New in version 5.1.
License: Geosoft Extended End-User License
Note: This import produces a limited
GXIP
data set with no Current “I”, Voltage “Vp” or Apparent Resistivity “ResApp” values.
- import_merge_ipred(db, file, chan)[source]¶
Imports IPRED data to an existing line.
- Parameters:
db (GXDB) – Database to import to
file (str) – File to import from
chan (str) – Channel to import
New in version 5.1.8.
License: Geosoft Extended End-User License
Note: Exits with error if the line does not exist. Data is merged on basis of Stn and N value.
- import_sgdf(db, file)[source]¶
Imports data from a Scintrex Geophysical Data Format file.
- Parameters:
db (GXDB) – Database to import to
file (str) – SGDF file name
New in version 5.0.
License: Geosoft Extended End-User License
- import_topo_csv(db, csv)[source]¶
Imports topography data from a CSV line-station file
- Parameters:
db (GXDB) – Database to calculate topography for
csv (str) – The name of CSV file
New in version 5.0.
License: Geosoft Extended End-User License
Note: The elevation of each point in the current database is interpolated from the input topography values.
- import_topo_grid(db, grid)[source]¶
Imports topography data from a grid
- Parameters:
db (GXDB) – Database to calculate topography for
grid (str) – The name of the grid file, with decorations
New in version 5.0.
License: Geosoft Extended End-User License
Note: The elevation of each point in the current database is interpolated from the input topography grid.
- classmethod import_ubc2_dmod(file, type)[source]¶
Import a MOD file from the UBC IPINV2D program.
- Parameters:
file (str) – UBC MOD file name to import
type (int) – 0 - CON, 1 - CHG
- Returns:
GXPG
Object- Return type:
New in version 7.1.
License: Geosoft Extended End-User License
Note: Imports the MOD file values to a
GXPG
object. The CON/CHG selection is necessary because the import sets padding values to dummies based on the type of file.
- classmethod import_ubc2_dmsh(file, x, z, vv_x, vv_z)[source]¶
Import a MSH file from the UBC IPINV2D program.
- Parameters:
New in version 7.1.
License: Geosoft Extended End-User License
Note: Imports the MSH file geometry.
- classmethod import_ubc_2d_topo(file, elev0, vv_x, vv_z)[source]¶
Import a Topography file from the UBC IPINV2D program.
- Parameters:
New in version 7.1.
License: Geosoft Extended End-User License
Note: Imports the maximum elevation (top of mesh) as well as the topo (X, Z) values.
- import_zonge_avg(db, file, line, scale, mult)[source]¶
Imports a Zonge AVG format file.
- Parameters:
db (GXDB) – Database to import to
file (str) – FLD file name
line (float) – Line number (will be scaled if applicable)
scale (int) – IP_STNSCALE constants
mult (float) – Line, station multiplier (for
IP_STNSCALE_VALUE
)
New in version 5.0.
License: Geosoft Extended End-User License
Note: See
import_zonge_fld
- import_zonge_fld(db, file, scale, mult)[source]¶
Imports a Zonge FLD format file.
- Parameters:
db (GXDB) – Database to import to
file (str) – FLD file name
scale (int) – IP_STNSCALE constants
mult (float) – Line, station multiplier (for
IP_STNSCALE_VALUE
)
New in version 5.0.
License: Geosoft Extended End-User License
Note: The Zonge Line and Station numbers may not be the X or Y position values, and a conversion is required. The line direction is taken from the
GXIP
setup values.
- 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
- is_valid_line(db, line)[source]¶
See if a given database line is registered for the
GXIP
system- Parameters:
db (GXDB) – Database
line (str) – Line name
- Returns:
1 if the line is a valid
GXIP
line, 0 if not- Return type:
int
New in version 8.1.
License: Geosoft Extended End-User License
- line_array_type(db, line)[source]¶
Return the type of
GXIP
array for the input line. If necessary, first imports the specified line into theGXIP
object- Parameters:
db (GXDB) – Database
line (str) – Line name
- Returns:
- Return type:
int
New in version 8.1.
License: Geosoft Extended End-User License
- classmethod locate_contributing_electrodes(db, map, rx1x, rx1y, rx2x, rx2y, tx1x, tx1y, tx2x, tx2y, sym_size)[source]¶
Locate on a map electrodes selected in a database row.
- Parameters:
map (str) – The current map
rx1x (str) – Rx1 X channel
rx1y (str) – Rx1 Y channel
rx2x (str) – Rx2 X channel
rx2y (str) – Rx2 Y channel
tx1x (str) – Tx1 X channel
tx1y (str) – Tx1 Y channel
tx2x (str) – Tx2 X channel
tx2y (str) – Tx2 Y channel
sym_size (float) – Symbol size (mm)
New in version 9.4.
License: Geosoft Extended End-User License
Note: Sets up an EXT object in the database that captures row/line change events and plots the electrodes for the selected row on an accompanying map. The EXT object is removed by running LaunchRemoveContributingElectrodesEXTTool_IPGUI. This EXT is not serialized, so it is also removed if the database is closed (since this is not the normal behaviour expected from a database).
- classmethod locate_contributing_electrodes_3d(db, map, rx1x, rx1y, rx1z, rx2x, rx2y, rx2z, tx1x, tx1y, tx1z, tx2x, tx2y, tx2z, sym_size)[source]¶
Locate on a 3D view electrodes selected in a database row.
- Parameters:
map (str) – The current map
rx1x (str) – Rx1 X channel (required)
rx1y (str) – Rx1 Y channel (required)
rx1z (str) – Rx1 Z channel (assume zero elevation if not specified)
rx2x (str) – Rx2 X channel
rx2y (str) – Rx2 Y channel
rx2z (str) – Rx2 Z channel (assume zero elevation if not specified)
tx1x (str) – Tx1 X channel
tx1y (str) – Tx1 Y channel
tx1z (str) – Tx1 Z channel (assume zero elevation if not specified)
tx2x (str) – Tx2 X channel
tx2y (str) – Tx2 Y channel
tx2z (str) – Tx2 Z channel (assume zero elevation if not specified)
sym_size (float) – Symbol size (ground units)
New in version 9.7.
License: Geosoft Extended End-User License
Note: Sets up an EXT object in the database that captures row/line change events and plots the electrodes for the selected row on an accompanying 3D view. The EXT object is removed by running LaunchRemoveContributingElectrodesEXTTool_IPGUI. This EXT is not serialized, so it is also removed if the database is closed (since this is not the normal behaviour expected from a database).
- new_xy_database(db, new_db, chan_vv, mask, pr_n_val)[source]¶
Create a subset database using a mask channel, “N” value
- Parameters:
New in version 5.0.
License: Geosoft Extended End-User License
Note: A mask channel can be used to select a subset of the data. A single N value can also be selected (Dummy for all).
- open_job(job, type)[source]¶
Open a
GXIP
plotting job- Parameters:
job (str) – Job file name
type (int) – Job type IP_PLOT constants
New in version 6.1.
License: Geosoft Extended End-User License
- pldp_convention()[source]¶
Return the user’s plot point convention for pole-dipole arrays.
- Returns:
The user’s PLDP plot point convention IP_PLDP_CONV constants
- Return type:
int
New in version 8.1.
License: Geosoft Extended End-User License
- ps_stack(db, chan, con_file, map)[source]¶
Create a stacked pseudo-section plot using a control file.
- Parameters:
New in version 5.0.
License: Geosoft Extended End-User License
Note: The control file is created using the IPSTAKCON GX. It may then be modified by hand as required.
- ps_stack2(db, chan, con_file, type, map)[source]¶
As
ps_stack
, but select section spacing option.- Parameters:
chan (str) – Channel to plot
con_file (str) – “IPPLOT” INI file name
type (int) – IP_STACK_TYPE constants
map (str) – Map name to create
New in version 5.1.
License: Geosoft Extended End-User License
- ps_stack2_dir(db, chan, con_file, type, map, dir)[source]¶
Same as
pseudo_plot2
, but with directory specified.- Parameters:
chan (str) – Channel to plot
con_file (str) – “IPPLOT” INI file name
type (int) – IP_STACK_TYPE constants
map (str) – Map name to create
dir (str) – Directory to create files
New in version 6.4.
License: Geosoft Extended End-User License
- pseudo_plot(db, ini_file, cur_line, map)[source]¶
Create pseudo-sections of a single line using a control file.
- Parameters:
db (GXDB) – Database
ini_file (str) – “IPPLOT” INI file name
cur_line (str) – Current line name
map (str) – Map name to create
New in version 5.0.
License: Geosoft Extended End-User License
Note: The control file is created using the IPPLTCON GX. It may then be modified by hand as required.
- pseudo_plot2(db, ini_file, cur_line, tag, map)[source]¶
Same as
pseudo_plot
, but specify a tag for grids created.- Parameters:
db (GXDB) – Database
ini_file (str) – “IPPLOT” INI file name
cur_line (str) – Current line name
tag (str) – Tag for created grids
map (str) – Map name to create
New in version 5.1.8.
License: Geosoft Extended End-User License
Note: The control file is created using the IPPLTCON GX. It may then be modified by hand as required.
- pseudo_plot2_dir(db, ini_file, cur_line, tag, map, dir)[source]¶
Same as
pseudo_plot2
, but with directory specified.- Parameters:
db (GXDB) – Database
ini_file (str) – “IPPLOT” INI file name
cur_line (str) – Current line name
tag (str) – Tag for created grids
map (str) – Map name to create
dir (str) – Directory to create files
New in version 6.4.
License: Geosoft Extended End-User License
Note: The control file is created using the IPPLTCON GX. It may then be modified by hand as required.
- qc_chan_lst(db, lst)[source]¶
Fill a list with QC channels.
New in version 7.3.
License: Geosoft Extended End-User License
Note: Searches for the following QC channels existing in a database: QC, QC_RES.
- recalculate(db)[source]¶
Recalculate derived channel values.
- Parameters:
db (GXDB) – Database
New in version 5.0.
License: Geosoft Extended End-User License
Note: This function recalculates “derived” channel values from “core” data.
Recalculates the “STN” and “N” channels, using the TX1, TX2, RX1 and RX2 channels (depending on the system).
Recalculates the apparent resistivity “ResCalc”, average “IP_Avg” and metal factor “MF” channels
Recalculates the “X” and “Y” channels. One of these will be equal to “STN”, the other to the internally stored line number for the current line.
Recalculate the “Z” channel, based on the current “Topo” channel, and the “N” values.
Warning: If you make a change to an electrode location, you would have to call
recalculate
, then recalculate “Topo” (since the X and Y values would have changed), then callrecalculate_z
, since “Z” values are based on “Topo” values.
- recalculate_derived_data(db, line_handle, channel_list, recalculate_xyz)[source]¶
Recalculate derived channel values.
- Parameters:
db (GXDB) – Database
line_handle (int) – line handle [
DB_LOCK_READWRITE
]channel_list (GXLST) –
GXLST
object - channel name overridesrecalculate_xyz (int) – Recalculate XYZ locations (TRUE or FALSE)?
New in version 9.10.
License: Geosoft Extended End-User License
Note: This function recalculates “derived” channel values from “core” data. It duplicates and extends the functionality of RecalateEx_IP by allowing for the input/output channel names to be overridden, with extra control on what is calculated.
Recalculates the “STN” and “N” channels (depending on the system).
Recalculates the apparent resistivity “ResCalc”, average “IP_Avg” and metal factor “MF” channels
Recalculates the “X” and “Y” channels. One of these will be equal to “STN”, the other to the internally stored line number for the current line.
Recalculate the “Z” channel, based on the current “Topo” channel, and the “N” values.
Channel overrides are passed via a LST object, with the channel key (type) passed in the LST_ITEM_NAME part, and the channel name passed in the LST_ITEM_VALUE part.
The following channel overrides supported (NOTE: Different behaviours for 2D and 3D arrays)
- 3D Electrode location channels (IP_ARRAY_3D_XXX):
“R1X”, “R1Y”, “R1Z”, “R2X”, “R2Y”, “R2Z”, “T1X”, “T1Y”, “T1Z”, “T2X”, “T2Y”, “T2Z” (electrodes not included or set to “” are not read)
- or IN-LINE arrays (DPDP, PLDP, PLPL, GRAD)
“R1X”, “R2X”, “T1X”, “T2X” (In-line locations) “R1Y”, “R2Y”, “T1Y”, “T2Y” (Across-line locations) “R1Z”, “R2Z”, “T1Z”, “T2Z” (Z) (for any electrode not include or set to “” the default channel name For
the array line direction, or the defined distant electrode location is used)
- Other input channels overridden if defined:
“Vp” (primary voltage - must be in mV) “I” (current - must be in A)
Other output channels overridden if defined (if you DON’T want the various output channels modified, then set the override values to “”):
“MF” (metal factor) - formulation defined in settings, “AvgIP” (average IP) “AppRes” (apparent resistivity) “N” (Pseudo-section pseudo-depth) “Stn” (Station value) “X” (Station “X” value) “Y” (Station “Y” value) “Z” (Station “Z” value) “Topo” (Ground elevation at station location)
Recalculating XYZ will result in any channel grid makers from the IPIMPGRID.GX being re-run, then if a maker exists for the Topo channel it is re-run, and finally the Z channel is recalculated (see “RecalculateZ_IP”).
- recalculate_ex(db, recalculate_xyz)[source]¶
Recalculate derived channel values, with option for including/excluding location calculations.
- Parameters:
db (GXDB) – Database
recalculate_xyz (int) – Recalculate XYZ locations (TRUE or FALSE)?
New in version 8.0.
License: Geosoft Extended End-User License
Note: See
recalculate
. This version allows you to suppress the recalculation of the current X, Y and Z channel values from the station locations.
- recalculate_z(db)[source]¶
Recalculate Z channel values.
- Parameters:
db (GXDB) – Database
New in version 5.1.1.
License: Geosoft Extended End-User License
Note: The “Z” channel values are calculated as follows: If the “Topo” value is defined, then Z = Topo - 0.5*N*A, where “N” is the N-spacing, and A is the A-spacing. If the Topography is not defined, then it is assumed to be equal to 0.
See also
- save_job(job, type)[source]¶
Save a
GXIP
plotting job- Parameters:
job (str) – Job file name
type (int) – Job type IP_PLOT constants
New in version 6.1.
License: Geosoft Extended End-User License
- set_channel_info(db, chan, domain, delay, n_windows, vv)[source]¶
Set Time Windows or Frequency info for a channel.
- Parameters:
db (GXDB) – Database
chan (str) – Channel to check
domain (int) – IP_DOMAIN constants
delay (float) – Delay or Base Frequency
n_windows (int) – Number of time windows or frequencies
vv (GXVV) – Time windows or frequencies
New in version 8.1.
License: Geosoft Extended End-User License
- set_electrode_mask_values(db, line, tx_rx, v_vx, v_vy, v_vm1, v_vm2)[source]¶
Set unique electrodes, along with current mask info.
- Parameters:
New in version 9.0.
License: Geosoft Extended End-User License
Note: Mask values are set for all included electrode locations, currently selected lines.
- set_electrode_mask_values_single_qc_channel(db, line, tx_rx, qc_type, v_vx, v_vy, v_vm)[source]¶
Set unique electrodes, along with current mask info.
- Parameters:
New in version 9.2.
License: Geosoft Extended End-User License
Note: Mask values are set for all included electrode locations, currently selected lines.
- set_import_line(line)[source]¶
Set the line name for some imports.
- Parameters:
line (str) – Line name
New in version 9.3.
License: Geosoft Extended End-User License
Note: For some imports, no line name is derivable from the import itself.
- set_import_mode(append)[source]¶
When importing data to a line, set append/overwrite mode.
- Parameters:
append (int) – 0: Overwrite, 1: Append
New in version 6.3.
License: Geosoft Extended End-User License
Note: By default, importing data overwrites existing data. Call this function before doing the import in order to append imported data to existing data. “Short” data channels will be dummied to the existing data length before the new data is appended.
- classmethod trim_ubc_2d_model(pg, trim_xl, trim_xr, trim_z, vv_x, vv_z, x)[source]¶
Trim the padding cells from the UBC IPINV2D Model.
- Parameters:
- Returns:
GXPG
Object- Return type:
New in version 7.1.
License: Geosoft Extended End-User License
Note: The cells are removed from the left, right and bottom. The returned
GXPG
is the trimmed version. The input cell size VVs are also trimmed to match, and the origin is updated (still upper left corner).
- window(db, va_chan, chan, windows)[source]¶
Window an
GXIP
array channel to produce a normal channel.- Parameters:
New in version 5.0.
License: Geosoft Extended End-User License
Note: The array channels cannot be used directly to produce sections.
window
allows the user to select one or more of the windows and create a new channel. In time domain, if more than one channel is selected a weighted sum is performed, according to window widths. In frequency domain a simple sum is performed. Window List Syntax:
- classmethod winnow_chan_list(lst)[source]¶
Removes obviously non-pseudo-section type channels from list.
- Parameters:
lst (GXLST) – List of channels
New in version 5.0.
License: Geosoft Extended End-User License
- classmethod winnow_chan_list2(lst, db)[source]¶
Same as
winnow_chan_list
, but removes current X,Y,Z.New in version 5.1.3.
License: Geosoft Extended End-User License
- write_distant_electrodes(db)[source]¶
Write distant electrode locations to channels
New in version 6.3.
License: Geosoft Extended End-User License
Note: Writes values for ALL lines.
IP_ARRAY constants¶
GXIP
Array options
IP_CHANNELS constants¶
Channels to display
IP_DOMAIN constants¶
Types of Domains
IP_DUPLICATE constants¶
How to handle duplicates
IP_FILTER constants¶
Fraser Filters
- IP_FILTER_PANTLEG¶
Regular pant-leg filter:
_!_ /*_*\\ n1 /*/ \\*\\ n2`
- // \\ n3
: :
- gxapi.IP_FILTER_PANTLEG = 1¶
- IP_FILTER_PANTLEGP¶
Regular pant-leg filter with top at first point:
! nscp: /*\\ n1 /*_*\\ n2
- // \\ n3
: :
- gxapi.IP_FILTER_PANTLEGP = 2¶
IP_I2XIMPMODE constants¶
Interpext Import Mode
IP_I2XINV constants¶
Type of Inversion
IP_LINES constants¶
Lines to display
IP_PLOT constants¶
Type of Plot
IP_QCTYPE constants¶
Type of Measurement
IP_STACK_TYPE constants¶
Spacing Types
- IP_STACK_TYPE_MAP¶
Use map-based spacing, and preserve the directions of the original lines by rotating the sections as desired to their true locations. (At present only N-S and E-W sections are supported).
- gxapi.IP_STACK_TYPE_MAP = 0¶
IP_STNSCALE constants¶
Station Scaling
IP_SYS constants¶
Instrument
IP_UBC_CONTROL constants¶
Types of Domains
IP_PLDP_CONV constants¶
Types of Domains